/* Responsive Styles - Kadence Theme Match */

/* Large Desktop (1200px+) */
@media screen and (min-width: 1200px) {
    .site-container,
    .container {
        max-width: 1170px;
    }
}

/* Desktop (1025px - 1199px) */
@media screen and (min-width: 1025px) and (max-width: 1199px) {
    .site-container,
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }
}

/* Tablet and below (1024px and smaller) */
@media screen and (max-width: 1024px) {
    :root {
        --global-content-edge-padding: 1.5rem;
    }

    /* Header */
    #main-header {
        display: none;
    }

    #mobile-header {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .site-branding .custom-logo {
        height: 50px;
        width: auto;
    }

    /* Kadence Hero Row */
    .kb-row-layout-wrap.hero-row {
        margin: 15px;
        border-radius: 15px;
        min-height: auto;
        background-attachment: scroll;
    }

    .hero-row .kt-row-column-wrap {
        flex-direction: column;
        padding: var(--global-content-edge-padding);
        min-height: auto;
        align-items: center;
    }

    .hero-row .kt-row-column-wrap > .inner-column-1,
    .hero-row .kt-row-layout-equal > .wp-block-kadence-column.inner-column-2 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
    }

    .hero-row .inner-column-1 .kt-inside-inner-col {
        padding: var(--global-md-spacing) 0;
        text-align: center;
    }

    .hero-row .inner-column-2 .kt-inside-inner-col {
        padding: var(--global-md-spacing) 0 0 0;
    }

    .hero-row h1.wp-block-kadence-advancedheading {
        font-size: 2.5rem;
        left: 0;
        top: 0;
        text-align: center;
    }

    .hero-row h2.wp-block-kadence-advancedheading,
    .hero-row p.wp-block-kadence-advancedheading {
        left: 0;
        top: 0;
    }

    .hero-row .kb-buttons-wrap {
        left: 0;
        top: 0;
        justify-content: center;
    }

    .kb-gallery-wrap {
        width: 100%;
        height: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .kb-gallery-ul,
    .kb-gallery-ul li {
        height: auto;
    }

    .kb-gallery-ul img {
        height: auto;
        aspect-ratio: 1/1;
    }

    /* Hero */
    .hero-content,
    .course-hero-content,
    .all-courses-hero-content {
        grid-template-columns: 1fr;
        gap: var(--global-lg-spacing);
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 80%;
        margin: 0 auto;
    }

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

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Courses */
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--global-lg-spacing);
    }

    .about-grid:nth-child(even) {
        direction: ltr;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Plans */
    .plans-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .plan-card.featured {
        transform: scale(1);
    }

    .plan-card.featured:hover {
        transform: translateY(-5px);
    }

    /* Course Details */
    .course-details-grid {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        position: static;
        order: -1;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .site-footer-row-columns-5,
    .site-top-footer-inner-wrap {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer-top-section-3,
    .site-footer-top-section-4 {
        display: none;
    }

    /* About Stats */
    .stats-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Solutions */
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .solution-card.featured {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Mobile Landscape & Tablet Portrait (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .hero-text h1 {
        font-size: 2.4rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }
}

/* Mobile (767px and smaller) */
@media screen and (max-width: 767px) {
    :root {
        --global-content-edge-padding: 1rem;
        --global-xxl-spacing: 3rem;
        --global-xl-spacing: 2.5rem;
        --global-lg-spacing: 2rem;
    }

    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    /* Header */
    .site-main-header-inner-wrap {
        min-height: 60px;
    }

    .site-branding .custom-logo {
        height: 45px;
        width: auto;
    }

    /* Kadence Hero Row - Mobile */
    .kb-row-layout-wrap.hero-row {
        margin: 10px;
        border-radius: 12px;
    }

    .hero-row h1.wp-block-kadence-advancedheading {
        font-size: 1.8rem;
    }

    .hero-row h2.wp-block-kadence-advancedheading {
        font-size: 1.2rem;
    }

    .hero-row p.wp-block-kadence-advancedheading {
        font-size: 1rem;
    }

    .kb-gallery-wrap {
        max-width: 300px;
    }

    /* Hero */
    .hero-section {
        padding: var(--global-xl-spacing) 0;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text h2,
    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-image img {
        max-width: 100%;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--global-sm-spacing);
    }

    .stat-item {
        padding: var(--global-xs-spacing);
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: var(--global-md-spacing);
    }

    /* Courses */
    .courses-grid {
        grid-template-columns: 1fr;
    }

    /* Plans */
    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
    }

    /* Course Hero */
    .course-hero h1 {
        font-size: 1.6rem;
    }

    .course-subtitle {
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--global-md-spacing);
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand img {
        margin: 0 auto var(--global-sm-spacing);
    }

    .footer-col {
        text-align: center;
    }

    #footer-menu {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: var(--global-sm-spacing);
    }

    .site-footer-row-columns-5,
    .site-top-footer-inner-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer-section figure {
        margin: 0 auto;
    }

    .site-footer-section .kb-img {
        margin: 0 auto;
    }

    /* Buttons */
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .hero-btns .btn {
        width: 100%;
        max-width: 280px;
    }

    /* About Stats */
    .stats-info-grid {
        grid-template-columns: 1fr;
    }

    .stat-info-card h3 {
        font-size: 2rem;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid img {
        height: 150px;
    }

    /* Solutions */
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solution-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .solution-card.featured {
        max-width: 400px;
    }

    /* Course Features */
    .course-features-section .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (480px and smaller) */
@media screen and (max-width: 480px) {
    :root {
        --global-content-edge-padding: 0.75rem;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }

    .hero-text h1 {
        font-size: 1.6rem;
    }

    .hero-text h2,
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 1.35rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .page-hero h1 {
        font-size: 1.6rem;
    }

    .btn {
        padding: 0.5em 1em;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 0.7em 1.3em;
        font-size: 1rem;
    }
}

/* Mobile Navigation Drawer */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--global-palette9);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.mobile-nav-drawer.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--global-sm-spacing);
    border-bottom: 1px solid var(--global-palette7);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--global-palette3);
    padding: 0.5rem;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--global-palette7);
}

.mobile-nav-menu li a {
    display: block;
    padding: var(--global-sm-spacing);
    color: var(--global-palette4);
    font-size: 1rem;
    font-weight: 500;
}

.mobile-nav-menu li a:hover {
    background: var(--global-palette8);
    color: var(--global-palette1);
}

/* Drawer navigation drop wrap */
.drawer-nav-drop-wrap {
    display: flex;
    align-items: center;
    padding: var(--global-sm-spacing);
    border-bottom: 1px solid var(--global-palette7);
}

.drawer-nav-drop-wrap a {
    flex: 1;
    padding: 0 !important;
    border-bottom: none !important;
}

.drawer-sub-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--global-palette4);
    transition: transform 0.3s ease;
}

.drawer-sub-toggle .kadence-svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.drawer-sub-toggle[aria-expanded="true"] .kadence-svg-icon {
    transform: rotate(180deg);
}

.mobile-nav-menu .has-dropdown > .drawer-nav-drop-wrap {
    border-bottom: 1px solid var(--global-palette7);
}

.mobile-nav-menu li.has-dropdown {
    border-bottom: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-nav-menu .dropdown-menu,
.mobile-nav-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: none;
    background: var(--global-palette8);
    min-width: 100%;
}

.mobile-nav-menu .has-dropdown.open > .dropdown-menu,
.mobile-nav-menu .has-dropdown.open > .sub-menu {
    display: block;
}

.mobile-nav-menu .dropdown-menu li,
.mobile-nav-menu .sub-menu li {
    border-bottom: none;
}

.mobile-nav-menu .dropdown-menu li a,
.mobile-nav-menu .sub-menu li a {
    padding-left: var(--global-lg-spacing);
    font-size: 0.95rem;
}

.mobile-nav-menu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: var(--global-palette7);
}

.mobile-nav-menu .has-submenu.open > .submenu {
    display: block;
}

.mobile-nav-menu .submenu li a {
    padding-left: calc(var(--global-lg-spacing) + 1rem);
}

.mobile-nav-menu .has-submenu .drawer-nav-drop-wrap {
    padding: var(--global-sm-spacing);
    padding-left: var(--global-lg-spacing);
    background: var(--global-palette8);
}

.mobile-nav-menu .learndash-wrapper {
    padding: var(--global-sm-spacing);
}

.mobile-nav-menu .learndash-wrapper .ld-button {
    width: 100%;
    justify-content: center;
}

/* Hide on desktop */
@media screen and (min-width: 1025px) {
    .mobile-nav-drawer,
    .nav-overlay {
        display: none;
    }
}

/* Visibility utilities for responsive */
.vs-sm-false {
    display: none !important;
}

@media screen and (min-width: 768px) {
    .vs-sm-false {
        display: block !important;
    }
}

.vs-md-false {
    display: block;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .vs-md-false {
        display: none !important;
    }
}

.vs-lg-false {
    display: block;
}

@media screen and (min-width: 1025px) {
    .vs-lg-false {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .nav-overlay,
    .mobile-nav-drawer {
        display: none !important;
    }

    .hero-section,
    .cta-section {
        background: none !important;
        color: #000 !important;
    }

    .hero-section *,
    .cta-section * {
        color: #000 !important;
    }

    a {
        text-decoration: underline;
    }
}
