/*
Theme Name: Learn
Author: Custom Development
Version: 1.0
Description: Custom Online Course Website
*/

:root {
    --accent: #b02a30;
    --accent-dark: #005B7F;
    --accent-light: #017DA3;
    --text: #6b7280;
    --text-dark: #111827;
    --border: #eceef1;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
    font-size: 26px;
    font-weight: 700;
}

.site-logo a {
    color: var(--text-dark);
    text-decoration: none;
}

.site-logo img {
    display: block;
    max-width: 180px;
    max-height: 48px;
    width: auto;
    height: auto;
}

/* Navigation wrapper */
.main-navigation {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.nav-menu li {
    position: relative;
    list-style: none;
}

.nav-menu > li {
    padding: 26px 0;
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a {
    color: var(--accent);
}

/* Chevron button (JS add karta hai) */
.submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px 6px 6px;
    display: inline-flex;
    align-items: center;
}

.submenu-toggle::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.menu-item-has-children:hover > .submenu-toggle::before,
.menu-item-has-children.submenu-open > .submenu-toggle::before {
    border-color: var(--accent);
    transform: rotate(-135deg) translateY(-2px);
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 230px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 15px;
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background: #f6f7f9;
    color: var(--accent);
}

/* CTA Button */
.header-cta {
    flex-shrink: 0;
    display: inline-block;
    padding: 14px 26px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(176, 42, 48, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-cta:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(176, 42, 48, 0.35);
}

/* Toggle button (desktop par hidden) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Desktop: hover par dropdown ===== */
@media (min-width: 992px) {
    .menu-item-has-children:hover > .sub-menu,
    .menu-item-has-children:focus-within > .sub-menu,
    .menu-item-has-children.submenu-open > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ===== Mobile / Tablet ===== */
@media (max-width: 991px) {

    .header-container {
        flex-wrap: wrap;
        min-height: 68px;
        gap: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        flex: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .main-navigation.is-open {
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding-top: 8px;
    }

    .nav-menu > li {
        padding: 0;
        flex-wrap: wrap;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li a {
        flex: 1;
        padding: 15px 4px;
        font-size: 16px;
    }

    .submenu-toggle {
        padding: 15px 10px;
    }

    /* Mobile submenu: andar khulta hai */
    .nav-menu .sub-menu {
        position: static;
        width: 100%;
        min-width: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 10px 14px;
        background: transparent;
    }

    .nav-menu li.submenu-open > .sub-menu {
        display: block;
    }

    .nav-menu .sub-menu a {
        padding: 11px 8px;
        white-space: normal;
    }

    .header-cta {
        text-align: center;
        margin: 18px 0 20px;
    }
}


/** hero css **/

/* Hero Section */
.hero-section {
    
    background: #f5fafc;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-subtitle {
    display: inline-block;
    margin-bottom: 18px;
    color: #017DA3;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content h1 {
    margin: 0 0 22px;
    color: #172b3a;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.15;
    font-weight: 700;
}

.hero-content p {
    max-width: 520px;
    margin: 0 0 30px;
    color: #5c6973;
    font-size: 17px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-btn {
    display: inline-block;
    padding: 15px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: 0.3s ease;
}

.hero-btn-primary {
    background: #017DA3;
    color: #ffffff;
}

.hero-btn-primary:hover {
    background: #016482;
    color: #ffffff;
}

.hero-btn-secondary {
    border: 1px solid #017DA3;
    color: #017DA3;
    background: transparent;
}

.hero-btn-secondary:hover {
    background: #017DA3;
    color: #ffffff;
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }
}