/* ================================
   MOBILE RESPONSIVENESS ADDITIONS
   ================================ */

/* Reset body margin & Apply Box Sizing on mobile */
@media (max-width: 900px) {

    *,
    *::before,
    *::after {
        box-sizing: border-box !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }

    body.no-scroll {
        overflow: hidden !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none !important;
    }
}

/* Registration/Enrollment Forms - Mobile */
@media (max-width: 900px) {

    .contact-section-v3,
    .contact-header-v3 {
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    .contact-grid-v3 {
        grid-template-columns: 1fr !important;
        gap: 40px;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .course-info-display {
        padding: 16px !important;
    }

    .details-col {
        display: none !important;
    }

    .form-col-v3 {
        order: 2;
        padding: 24px 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .phones-v3,
    .phones-v3 a,
    .info-text-v3 {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        min-width: 0 !important;
        /* Forces flex child to shrink properly */
    }

    .premium-reg-form,
    .whatsapp-form {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .premium-reg-form input,
    .premium-reg-form select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .info-vertical-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: left;
    }

    .info-row {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding-left: 20px;
    }

    .info-icon-v3 {
        margin: 0 16px 0 0;
    }

    .form-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .form-group-v3 label {
        font-size: 0.95rem;
    }

    .social-links-v3 {
        justify-content: center !important;
        margin-top: 24px !important;
    }
}

@media (max-width: 480px) {
    .contact-header-v3 {
        padding: 40px 20px !important;
    }

    .header-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    .header-subtitle {
        font-size: 0.95rem !important;
    }

    .info-vertical-list {
        grid-template-columns: 1fr;
    }

    .form-title {
        font-size: 1.5rem !important;
    }

    .form-group-v3 input,
    .form-group-v3 select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }

    .wa-submit-btn {
        font-size: 1rem !important;
        padding: 14px 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

/* Hero Section & Floating Badges - Mobile */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        padding: 60px 20px 40px !important;
        text-align: center;
        gap: 40px;
    }

    .hero-left,
    .hero-right {
        width: 100%;
        max-width: 100%;
    }

    .hero-label {
        margin: 0 auto 16px;
    }

    .hero-subtitle {
        margin: 16px auto 32px !important;
    }

    .hero-buttons {
        justify-content: center !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100%;
    }

    .hero-btn {
        width: 100% !important;
        justify-content: center;
    }

    .hero-right {
        height: 300px;
        /* Shorter on mobile */
    }

    /* Hide floating badges completely on mobile */
    .float-badge {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero-heading {
        font-size: 2.25rem !important;
        /* ~36px */
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-right {
        height: 250px;
    }
}

/* Course Section Header - Make Horizontal on Mobile */
@media (max-width: 900px) {
    .courses-header {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 32px !important;
        text-align: center !important;
    }

    .section-title,
    .courses-header .section-title {
        font-size: 2rem !important;
        margin-bottom: 16px !important;
        line-height: 1.2 !important;
    }

    .courses-nav {
        display: flex !important;
        gap: 12px !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .courses-nav-btn {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
    }
}

@media (max-width: 480px) {

    .section-title,
    .courses-header .section-title {
        font-size: 1.75rem !important;
    }

    .courses-nav-btn {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Course Grid - Mobile */
@media (max-width: 1024px) {

    .courses-grid,
    .courses-track {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

@media (max-width: 680px) {

    .courses-grid,
    .courses-track {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 0 16px !important;
    }

    .course-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .course-title {
        font-size: 1.25rem !important;
    }
}

/* Navigation - Mobile Improvements */
@media (max-width: 900px) {
    .nav-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000;
        margin: 0 !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: 70px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 16px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .nav-container {
        display: flex !important;
        width: 100% !important;
        justify-content: space-between !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        backdrop-filter: none !important;
    }

    .nav-segment {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        height: auto !important;
    }

    body {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }

    .logo-img {
        height: 36px !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        width: 44px !important;
        height: 44px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        color: #0f172a !important;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
        transition: all 0.2s ease !important;
    }

    .mobile-menu-btn:active {
        transform: scale(0.95) !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Mobile Full Screen Menu - Redesign */
    .mobile-drawer {
        position: fixed !important;
        top: 0 !important;
        /* Cover full screen */
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        z-index: 2000 !important;
        /* Above everything */
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding-top: 20px !important;
    }

    .mobile-drawer[data-state="open"] {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .drawer-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 60px 20px 40px !important;
        text-align: center !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Close Button - Optimized Placement */
    .drawer-close-btn {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        width: 44px !important;
        height: 44px !important;
        background: #f8fafc !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
        z-index: 2200 !important;
    }

    .drawer-close-btn:active {
        transform: scale(0.95) !important;
        background: #e2e8f0 !important;
    }

    .drawer-header {
        margin-bottom: 24px !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .drawer-header .logo-img {
        height: 40px !important;
    }

    .drawer-links {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 32px !important;
        align-items: center !important;
        padding: 0 !important;
    }

    .drawer-links li {
        width: 100% !important;
        list-style: none !important;
    }

    .drawer-links a {
        font-size: 1.35rem !important;
        font-weight: 600 !important;
        padding: 14px 24px !important;
        display: block !important;
        width: 100% !important;
        background: #f8fafc !important;
        border-radius: 16px !important;
        color: #1e293b !important;
        transition: all 0.2s ease !important;
        text-align: center !important;
        text-decoration: none !important;
    }

    .drawer-links a:active,
    .drawer-links a.active {
        background: rgba(37, 99, 235, 0.1) !important;
        color: #2563eb !important;
        transform: scale(0.98) !important;
    }

    /* Footer / Actions Section */
    .drawer-footer {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        margin-top: auto !important;
        /* Push to bottom */
        padding-bottom: 20px !important;
    }

    .drawer-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    /* Language Switcher - 3 Buttons Side by Side */
    .lang-row {
        display: flex !important;
        gap: 10px !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .lang-btn {
        flex: 1 !important;
        padding: 12px 0 !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        font-size: 0.95rem !important;
        color: #64748b !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
        text-align: center !important;
        text-decoration: none !important;
    }

    .lang-btn.active,
    .lang-btn:active {
        background: #2563eb !important;
        color: white !important;
        border-color: #2563eb !important;
    }

    /* Register Button */
    .btn-register.drawer-btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        border-radius: 100px !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        padding: 16px !important;
        text-align: center !important;
        display: inline-flex !important;
        background-image: linear-gradient(#ffffff, #ffffff),
            linear-gradient(90deg, #f09433, #e3165b, #d82d7e, #8a3ab9, #4c5fd7, #f09433) !important;
        background-origin: border-box !important;
        background-clip: padding-box, border-box !important;
        border: 2px solid transparent !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Social Icons Fix - Perfect Circles */
    .social-group {
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .drawer-social .icon-box {
        width: 44px !important;
        height: 44px !important;
        border-radius: 100px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #1e293b !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        transition: transform 0.2s !important;
    }

    .drawer-social .icon-box:active {
        transform: scale(0.9) !important;
    }

    .drawer-social .icon-box i,
    .drawer-social .icon-box svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    .nav-wrapper {
        height: 60px !important;
        padding: 0 12px !important;
    }

    body {
        padding-top: 60px !important;
    }

    .logo-img {
        height: 30px !important;
    }

    .mobile-menu-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .drawer-content {
        padding: 60px 20px 30px !important;
    }

    .drawer-links a {
        font-size: 1.2rem !important;
        padding: 12px 20px !important;
    }

    .btn-register.drawer-btn {
        padding: 14px !important;
        font-size: 1rem !important;
    }

    .lang-btn {
        font-size: 0.85rem !important;
        padding: 10px 0 !important;
    }
}

/* Footer - Mobile */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: center;
        padding: 40px 20px !important;
    }

    .footer-brand {
        margin: 0 auto;
        align-items: center !important;
    }

    .footer-logo {
        height: 60px !important;
        margin-bottom: 20px !important;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px !important;
    }

    .footer-socials {
        justify-content: center !important;
        gap: 16px !important;
    }
}

/* Contact Page - Improved Mobile Layout */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding: 0 16px;
    }

    .contact-info-card {
        padding: 32px 16px !important;
        text-align: center;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .contact-form {
        padding: 32px 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .info-item {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .info-item .icon-box {
        margin: 0 auto 16px auto !important;
    }
}

/* About Page - Improved Mobile Sections */
@media (max-width: 900px) {
    .story-section {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding: 0 16px;
    }

    .story-content {
        padding: 32px 20px !important;
        text-align: center;
    }

    .story-content h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .story-content p {
        font-size: 1rem !important;
        line-height: 1.7;
    }

    .instructors-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 0 16px;
    }

    .instructor-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {

    .gallery-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .story-content h2 {
        font-size: 1.75rem !important;
    }
}

/* Testimonials Scroller - Mobile */
@media (max-width: 900px) {
    .testimonial-card {
        min-width: 300px !important;
        /* Slightly wider on mobile for better text fit */
        padding: 24px !important;
    }

    .testimonial-text {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .testimonial-author {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        min-width: 280px !important;
        padding: 20px !important;
    }
}

/* Section Spacing - Mobile */
@media (max-width: 900px) {
    section:not(.about-hero-banner):not(.infinite-gallery-section):not(.home-gallery-banner) {
        padding: 60px 20px !important;
    }

    .section-header h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .section-header .subtitle {
        font-size: 1rem !important;
        margin-top: 12px !important;
    }

    /* Additional Strict Scroller Masks */
    .about-hero-banner,
    .infinite-gallery-section,
    .home-gallery-banner {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* Course Details Page - Mobile */
@media (max-width: 900px) {
    .course-hero-content {
        padding: 40px 20px !important;
    }

    .course-hero-title {
        font-size: 1.75rem !important;
    }

    .course-details-container {
        grid-template-columns: 1fr !important;
    }

    .course-details-content {
        padding: 20px !important;
    }

    .curriculum-item {
        padding: 14px !important;
    }

    /* Prevent horizontal scroll */
    body {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .hero-wrapper,
    .courses-section,
    .text-marquee,
    section,
    .site-footer {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

img,
video {
    max-width: 100% !important;
    height: auto;
}

/* Touch-friendly buttons & Form text sizing (Prevents iOS zoom) */
@media (max-width: 900px) {

    button,
    .btn,
    .cta-btn,
    a.cta-btn,
    .hero-btn {
        min-height: 48px !important;
        min-width: 48px !important;
        border-radius: 12px !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
        /* Critical to prevent iOS Safari auto-zoom */
        padding: 14px 16px !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .form-group-v3 {
        margin-bottom: 20px !important;
    }
}