/* ---------- VARIABLES ---------- */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --dark: #212529;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --gray: #6c757d;
    --gray-light: #e9ecef;
}

/* ---------- RESET ---------- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7ff;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---------- NAVBAR ---------- */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon { 
    font-size: 1.75rem; 
    color: var(--primary); 
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a, .dropdown-toggle {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    padding: .5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: color .3s;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width .3s;
}

.nav-links a:hover::after, 
.nav-links a.active::after { 
    width: 100%; 
}

.nav-links a.active {
    background: linear-gradient(45deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- DROPDOWN ---------- */
.dropdown { 
    position: relative; 
}

.dropdown-toggle { 
    cursor: pointer; 
}

.dropdown-toggle .fa-chevron-down {
    font-size: .8rem;
    transition: transform .3s;
}

.dropdown:hover .dropdown-toggle .fa-chevron-down { 
    transform: rotate(180deg); 
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all .3s;
    z-index: 1000;
    border: 1px solid var(--gray-light);
    max-height: 400px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

.dropdown-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    background: linear-gradient(45deg, var(--primary), var(--danger));
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 12px 12px 0 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.5rem;
    color: var(--dark);
    text-decoration: none;
    transition: all .3s;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.dropdown-menu a:last-child { 
    border-bottom: none; 
    border-radius: 0 0 12px 12px; 
}

.dropdown-menu a:hover {
    background: rgba(67,97,238,.05);
    color: var(--primary);
    transform: translateX(5px);
}

.dropdown-menu a i { 
    width: 16px; 
    text-align: center; 
    color: var(--primary); 
}

/* ---------- HIDE DROPDOWNS ON LARGE SCREENS ---------- */
@media (min-width: 993px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* ---------- AUTH BUTTONS ---------- */
.auth-buttons { 
    display: flex; 
    gap: .75rem; 
    align-items: center; 
    flex-shrink: 0;
}

.btn-login, .btn-signup {
    padding: .5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: all .3s;
    white-space: nowrap;
}

.btn-login {
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67,97,238,.3);
}

.btn-signup {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(67,97,238,.3);
}

.btn-signup:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67,97,238,.4);
}

/* ---------- SEARCH BUTTON ---------- */
.search-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--dark);
    cursor: pointer;
    padding: .5rem 1rem;
    border-radius: 8px;
    transition: all .3s;
    flex-shrink: 0;
}

.search-btn:hover { 
    background: rgba(67,97,238,.1); 
    color: var(--primary); 
}

/* ---------- MOBILE MENU BUTTON ---------- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: .5rem;
    border-radius: 8px;
    transition: all .3s;
}

.mobile-menu-btn:hover {
    background: rgba(67,97,238,.1);
    color: var(--primary);
}

/* ---------- MOBILE MENU ---------- */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-menu.active { 
    display: flex; 
}

.mobile-menu a, .mobile-dropdown-toggle {
    padding: .75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: background .3s;
}

.mobile-menu a:hover, .mobile-dropdown-toggle:hover {
    background: rgba(67,97,238,.05);
    color: var(--primary);
}

.mobile-dropdown { 
    border-bottom: 1px solid var(--gray-light); 
}

.mobile-dropdown-toggle { 
    justify-content: space-between; 
    cursor: pointer; 
}

.mobile-dropdown-toggle .fa-chevron-down { 
    transition: transform .3s; 
}

.mobile-dropdown.active .mobile-dropdown-toggle .fa-chevron-down { 
    transform: rotate(180deg); 
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s;
    background: rgba(67,97,238,.02);
}

.mobile-dropdown.active .mobile-dropdown-menu { 
    max-height: 500px; 
}

.mobile-dropdown-menu a {
    padding: .5rem 1rem .5rem 2rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid rgba(0,0,0,.05);
    transition: all .3s;
}

.mobile-dropdown-menu a:hover {
    color: var(--primary);
    background: rgba(67,97,238,.05);
    transform: translateX(5px);
}

/* ---------- HERO SECTION ---------- */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(.45);
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    z-index: 2;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
    width: 100%;
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    min-width: 0;
}

.hero-search input::placeholder {
    color: #999;
}

.hero-search button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: background .3s;
    flex-shrink: 0;
}

.hero-search button:hover { 
    background: var(--primary-dark); 
}

/* ---------- FEATURES SECTION ---------- */
.features-section {
    padding: 4rem 2rem;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    transition: transform .3s, box-shadow .3s;
    border: 1px solid var(--gray-light);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,.1);
}

.feature-icon { 
    font-size: 3rem; 
    color: var(--primary); 
    margin-bottom: 1.5rem; 
}

.feature-title { 
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    color: var(--dark); 
}

.feature-description { 
    color: var(--gray); 
    margin-bottom: 1.5rem; 
    line-height: 1.6;
}

.feature-btn {
    display: inline-block;
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: transform .3s;
}

.feature-btn:hover { 
    transform: translateY(-2px); 
}

/* ---------- STATS SECTION ---------- */
.stats-section {
    padding: 4rem 2rem;
    background: #f5f7ff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    transition: transform .3s, box-shadow .3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,.1);
}

.stat-number { 
    font-size: clamp(2rem, 5vw, 3rem); 
    font-weight: 700; 
    color: var(--primary); 
    margin-bottom: .5rem; 
}

.stat-label { 
    color: var(--gray); 
    margin-bottom: 1rem; 
}

.stars { 
    color: var(--warning); 
}

/* ---------- FOOTER ---------- */
.footer {
    background: linear-gradient(135deg, var(--dark), #2a2a2a);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-column h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: .5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color .3s;
}

.footer-links a:hover { 
    color: white; 
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    color: white;
    background: rgba(255,255,255,.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, transform .3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.1);
    color: var(--gray-light);
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .nav-links { 
        display: none; 
    }
    
    .mobile-menu-btn { 
        display: block; 
    }
    
    .navbar {
        padding: .75rem 1rem;
    }
}

@media (max-width: 768px) {
    .hero-search { 
        flex-direction: column; 
        border-radius: 12px; 
        max-width: 100%;
    }
    
    .hero-search input {
        border-radius: 12px 12px 0 0;
        padding: 1rem;
    }
    
    .hero-search button { 
        padding: .75rem; 
        border-radius: 0 0 12px 12px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: .5rem .75rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .features-section,
    .stats-section {
        padding: 3rem 1rem;
    }
    
    .footer {
        padding: 3rem 1rem 2rem;
    }
    
    .feature-card,
    .stat-card {
        padding: 1.5rem;
    }
}

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- FOCUS STYLES ---------- */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- PRINT STYLES ---------- */
@media print {
    .navbar,
    .mobile-menu,
    .hero-search button,
    .auth-buttons,
    .search-btn,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .hero-bg {
        display: none;
    }
    
    .hero-content {
        color: var(--dark);
    }
}
