/* Critical Style Fixes for K12Buddy */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Container Fix */
.container {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

/* Navigation Fixes */
nav {
    position: sticky !important;
    top: 0 !important;
    background: white !important;
    z-index: 50 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

nav .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem !important;
}

/* Hero Section Fixes */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 6rem 1rem !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Trust Badge Fixes */
.trust-badge {
    background: white !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0.5rem !important;
}

.trust-badge .number {
    font-size: 2rem !important;
    font-weight: bold !important;
    color: #667eea !important;
    line-height: 1 !important;
}

.trust-badge .label {
    color: #4a5568 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
}

/* Button Fixes */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.btn-secondary {
    background: white !important;
    color: #667eea !important;
    padding: 1rem 2.5rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: 2px solid #667eea !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.btn-secondary:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

/* Section Spacing Fixes */
section {
    padding: 4rem 0 !important;
}

/* Grid Fixes */
.grid {
    display: grid !important;
    gap: 1.5rem !important;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Feature Card Fixes */
.feature-card {
    background: white !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e2e8f0 !important;
    height: 100% !important;
}

.feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
}

/* Text and Typography Fixes */
h1 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
}

@media (min-width: 768px) {
    h1 {
        font-size: 4rem !important;
    }
}

h2 {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
}

h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
}

p {
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

/* Animation Fixes */
.glow {
    animation: pulse-glow 2s ease-in-out infinite !important;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5) !important;
    }
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem !important;
    }

    .hero-gradient {
        padding: 3rem 1rem !important;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .trust-badge {
        min-width: 140px !important;
        padding: 0.75rem 1rem !important;
    }

    .trust-badge .number {
        font-size: 1.5rem !important;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 2rem !important;
        font-size: 0.95rem !important;
    }
}

/* Fix overlapping elements */
.ai-buddy-container {
    position: fixed !important;
    bottom: 120px !important;
    right: 30px !important;
    z-index: 9998 !important;
}

#tutor-floating-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 9999 !important;
}

#professional-tutor {
    z-index: 10000 !important;
}

/* Fix text visibility */
.text-white {
    color: white !important;
}

.text-blue-600 {
    color: #3182ce !important;
}

.text-gray-600 {
    color: #718096 !important;
}

/* Background colors */
.bg-white {
    background-color: white !important;
}

.bg-gray-50 {
    background-color: #f9fafb !important;
}

/* Flexbox fixes */
.flex {
    display: flex !important;
}

.flex-col {
    flex-direction: column !important;
}

.items-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

/* Margin and Padding fixes */
.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.mb-10 {
    margin-bottom: 2.5rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mt-6 {
    margin-top: 1.5rem !important;
}

.px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.py-16 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.py-20 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Border radius fixes */
.rounded-lg {
    border-radius: 0.5rem !important;
}

.rounded-xl {
    border-radius: 0.75rem !important;
}

.rounded-full {
    border-radius: 9999px !important;
}

/* Shadow fixes */
.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Max width fixes */
.max-w-3xl {
    max-width: 48rem !important;
}

.max-w-4xl {
    max-width: 56rem !important;
}

.max-w-5xl {
    max-width: 64rem !important;
}

.max-w-6xl {
    max-width: 72rem !important;
}

/* Text alignment */
.text-center {
    text-align: center !important;
}

/* Font weight */
.font-bold {
    font-weight: 700 !important;
}

.font-semibold {
    font-weight: 600 !important;
}

/* Display fixes */
.hidden {
    display: none !important;
}

.block {
    display: block !important;
}

.inline-block {
    display: inline-block !important;
}

/* Opacity */
.opacity-90 {
    opacity: 0.9 !important;
}

.opacity-95 {
    opacity: 0.95 !important;
}