/* ========================================
   MICROBOTSS - RESPONSIVE DESIGN
   Mobile-First Responsive Styles
   ======================================== */

/* ===== BASE MOBILE STYLES (< 576px) ===== */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: 1.5rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 2rem;
    }

    .section-tag {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
    }

    /* Counter */
    .counter-number {
        font-size: 2.5rem;
    }

    /* Hide large decorative elements on mobile */
    .floating-element.desktop-only {
        display: none;
    }
}

/* ===== SMALL MOBILE (576px - 767px) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLET (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    html {
        font-size: 15px;
    }

    .container {
        max-width: 720px;
    }

    .section {
        padding: 4rem 0;
    }

    /* Grids */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Cards */
    .card {
        padding: 1.75rem;
    }
}

/* ===== SMALL DESKTOP (992px - 1199px) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== EXTRA LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ========================================
   HEADER RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {

    /* Fix mobile overflow */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Fix header on mobile */
    .header {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: visible !important;
    }

    .header .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
        gap: 1rem !important;
    }

    /* Mobile Navigation Panel - Premium Design */
    .nav-links,
    .header .nav-links,
    ul.nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: linear-gradient(180deg, #0a0a1a 0%, #12122a 50%, #0a0a1a 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 80px 0 2rem 0 !important;
        margin: 0 !important;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        z-index: 9999 !important;
        border-left: 1px solid rgba(254, 182, 0, 0.2) !important;
        overflow-y: auto !important;
        list-style: none !important;
        box-sizing: border-box !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5),
            -2px 0 10px rgba(24, 0, 173, 0.3) !important;
    }

    .nav-links.active,
    .header .nav-links.active,
    ul.nav-links.active {
        right: 0 !important;
    }

    .nav-links li,
    .header .nav-links li {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
        list-style: none !important;
    }

    .nav-links li a,
    .nav-links a,
    .header .nav-links li a,
    .header .nav-links a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 18px 28px !important;
        margin: 0 !important;
        font-size: 17px !important;
        font-weight: 500 !important;
        letter-spacing: 0.5px !important;
        color: #e0e0e0 !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10000 !important;
        background: transparent !important;
        -webkit-tap-highlight-color: rgba(254, 182, 0, 0.3) !important;
        touch-action: manipulation !important;
        transition: all 0.3s ease !important;
    }

    /* Hover indicator line */
    .nav-links li a::before,
    .nav-links a::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 3px !important;
        height: 0 !important;
        background: linear-gradient(180deg, #FEB600 0%, #1800AD 100%) !important;
        border-radius: 0 3px 3px 0 !important;
        transition: height 0.3s ease !important;
    }

    .nav-links li a:hover::before,
    .nav-links a:hover::before,
    .nav-links li a.active::before {
        height: 60% !important;
    }

    .nav-links li a:hover,
    .nav-links a:hover,
    .nav-links li a:focus,
    .nav-links a:focus,
    .nav-links li a:active,
    .nav-links a:active {
        color: #FEB600 !important;
        background: rgba(254, 182, 0, 0.05) !important;
        padding-left: 36px !important;
    }

    .nav-links li a.active {
        color: #FEB600 !important;
        background: rgba(254, 182, 0, 0.08) !important;
    }

    .nav-links a::after,
    .header .nav-links a::after {
        display: none !important;
    }

    /* Hamburger Button - Premium Design */
    .hamburger,
    .header .hamburger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        width: 48px !important;
        height: 48px !important;
        padding: 12px !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
        flex-shrink: 0 !important;
        /* Don't shrink */
    }

    .hamburger span,
    .header .hamburger span {
        display: block !important;
        width: 24px !important;
        height: 2px !important;
        background: linear-gradient(90deg, #FEB600 0%, #ffffff 100%) !important;
        border-radius: 2px !important;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
        transform-origin: center !important;
    }

    .hamburger:hover span,
    .header .hamburger:hover span {
        background: #FEB600 !important;
    }

    .hamburger.active span,
    .header .hamburger.active span {
        background: #FEB600 !important;
    }

    .hamburger.active span:nth-child(1),
    .header .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }

    .hamburger.active span:nth-child(2),
    .header .hamburger.active span:nth-child(2) {
        opacity: 0 !important;
        transform: scaleX(0) !important;
    }

    .hamburger.active span:nth-child(3),
    .header .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px) !important;
    }

    /* Hide desktop CTA */
    .nav-cta,
    .header .nav-cta,
    .hide-mobile {
        display: none !important;
    }

    /* Mobile Overlay - MUST be below nav-links */
    .mobile-nav-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9000 !important;
        /* LOWER than nav-links (9999) */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease !important;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Body lock when nav open */
    body.nav-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
}


/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .hero {
        min-height: 100vh;
        padding-top: 100px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-visual {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-tagline {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    /* Reduce animations on mobile */
    .floating-robot,
    .floating-drone,
    .floating-chip {
        transform: scale(0.6);
    }

    /* Hero Certifications - Mobile */
    .hero-certifications {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin: 1rem auto !important;
        width: 100% !important;
    }

    .hero-certifications .cert-badge {
        height: 60px !important;
    }

    .hero-certifications .cert-badge-iso {
        height: 80px !important;
    }

    /* Hero Stats Badges - Mobile 2x2 Grid */
    .hero-stats-badges {
        position: static !important;
        transform: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 1rem auto !important;
        padding: 0 1rem !important;
    }

    .hero-stat-card {
        justify-content: center !important;
        padding: 0.5rem !important;
    }

    .hero-stat-card .stat-icon-wrap {
        width: 24px !important;
        height: 24px !important;
    }

    .hero-stat-card .stat-icon-wrap svg {
        width: 14px !important;
        height: 14px !important;
    }

    .hero-stat-card .hero-stat-num {
        font-size: 0.75rem !important;
    }

    .hero-stat-card .stat-label {
        font-size: 0.5rem !important;
    }

    /* Hero Text Section - Remove padding */
    .hero-text-section {
        padding: 0 1rem !important;
    }

    .hero-content-inner {
        flex-direction: column !important;
        align-items: center !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero {
        min-height: 100vh;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-visual {
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* Hero Certifications - Tablet */
    .hero-certifications {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.75rem !important;
        margin: 1.5rem auto !important;
        width: 100% !important;
    }

    .hero-certifications .cert-badge {
        height: 70px !important;
    }

    .hero-certifications .cert-badge-iso {
        height: 100px !important;
    }

    /* Hero Stats Badges - Tablet Horizontal Row */
    .hero-stats-badges {
        position: static !important;
        transform: none !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        margin: 1rem auto !important;
    }

    .hero-stat-card {
        padding: 0.5rem 0.75rem !important;
    }

    /* Hero Text Section - Adjust padding */
    .hero-text-section {
        padding: 0 2rem !important;
    }

    .hero-content-inner {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* ========================================
   PROGRAMS SECTION RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .program-card {
        padding: 1.5rem;
    }

    .program-card .tier-badge {
        font-size: 0.7rem;
    }

    .program-details {
        flex-direction: column;
    }

    .program-topics,
    .program-projects {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .programs-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* ========================================
   CERTIFICATES SECTION RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .certificate-carousel {
        padding: 1rem;
    }

    .certificate-card {
        width: 280px;
        height: 200px;
    }

    .badge-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .badge-item {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
   GALLERY SECTION RESPONSIVE
   ======================================== */
@media (max-width: 575.98px) {
    .gallery-grid {
        columns: 1;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .gallery-grid {
        columns: 2;
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        columns: 3;
    }
}

/* ========================================
   CONTACT SECTION RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
    }
}

/* ========================================
   FOOTER RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
        text-align: center;
    }

    .footer-brand {
        margin: 0 auto;
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   ABOUT PAGE RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {
    .about-split {
        flex-direction: column;
        gap: 2rem;
    }

    .about-image,
    .about-content {
        width: 100%;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item::before {
        left: -1.5rem;
    }
}

/* ========================================
   EVENTS PAGE RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .prize-cards {
        flex-direction: column;
    }

    .prize-card {
        width: 100%;
    }

    .prize-amount {
        font-size: 2rem;
    }
}

/* ========================================
   STATS SECTION RESPONSIVE
   ======================================== */
@media (max-width: 767.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .counter-number {
        font-size: 2rem;
    }

    .counter-label {
        font-size: 0.8rem;
    }
}

/* ========================================
   ANIMATION ADJUSTMENTS FOR MOBILE
   ======================================== */
@media (max-width: 767.98px) {

    /* Reduce animation intensity */
    .animate-float {
        animation-duration: 6s;
    }

    .animate-drone {
        animation-duration: 12s;
    }

    /* Disable complex animations on mobile for performance */
    .parallax-element {
        transform: none !important;
    }

    /* Simplify hover effects */
    .hover-tilt:hover {
        transform: none;
    }

    /* Reduce glow effects */
    .glow-pulse {
        animation: none;
        box-shadow: 0 0 15px rgba(77, 124, 255, 0.3);
    }
}

/* ========================================
   PRELOADER RESPONSIVE
   ======================================== */
@media (max-width: 575.98px) {
    .preloader-robot {
        width: 80px;
        height: 80px;
    }

    .preloader-text {
        font-size: 1.2rem;
    }
}

/* ========================================
   UTILITY RESPONSIVE CLASSES
   ======================================== */
/* Hide on mobile */
@media (max-width: 767.98px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 992px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Show only on mobile */
@media (min-width: 768px) {
    .show-mobile-only {
        display: none !important;
    }
}

/* Show only on tablet */
@media (max-width: 767.98px),
(min-width: 992px) {
    .show-tablet-only {
        display: none !important;
    }
}

/* Show only on desktop */
@media (max-width: 991.98px) {
    .show-desktop-only {
        display: none !important;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) {

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    .card:hover {
        transform: none;
    }

    .hover-lift:hover {
        transform: none;
    }

    /* Make touch targets larger */
    .btn {
        min-height: 48px;
    }

    input,
    select,
    textarea {
        min-height: 48px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .header,
    .footer,
    .preloader {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 1rem 0;
    }
}