/* ============================================
   RANK BOOSTER INFOTECH - RESPONSIVE CSS
   Mobile First Approach
   Breakpoints:
   xs: 480px
   sm: 640px
   md: 768px
   lg: 1024px
   xl: 1280px
   2xl: 1440px
   ============================================ */

/* ============================================
   LARGE SCREENS (1280px+)
   ============================================ */

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-8);
    }

    .hero-title {
        font-size: clamp(3.5rem, 5vw, 5rem);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* ============================================
   DESKTOP (1024px - 1279px)
   ============================================ */

@media (max-width: 1279px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: var(--space-10);
    }

    .nav-menu {
        gap: 0;
    }

    .nav-link {
        padding: var(--space-2) var(--space-2);
        font-size: var(--text-xs);
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps::before {
        display: none;
    }
}

/* ============================================
   TABLET LANDSCAPE (1024px)
   ============================================ */

@media (max-width: 1024px) {

    /* Navigation */
    .nav-menu {
        display: none;
    }

    .btn-whatsapp span {
        display: none;
    }

    .btn-whatsapp {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: var(--radius-lg);
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-10);
    }

    /* Grid adjustments */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hero */
    .hero-title {
        font-size: var(--text-6xl);
    }

    /* Process */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps::before {
        display: none;
    }
}

/* ============================================
   TABLET PORTRAIT (768px)
   ============================================ */

@media (max-width: 768px) {

    /* Typography Scale Down */
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-xl); }

    /* Container */
    .container {
        padding: 0 var(--space-5);
    }

    /* Section */
    .section {
        padding: var(--space-16) 0;
    }

    .section-title {
        font-size: var(--text-4xl);
    }

    /* Hero */
    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-subtitle {
        font-size: var(--text-base);
    }

    .hero-ctas {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-stats-row {
        gap: var(--space-6);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    /* Grid */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* CTA Section */
    .cta-section {
        padding: var(--space-12) var(--space-6);
    }

    .cta-title {
        font-size: var(--text-3xl);
    }

    /* Nav */
    .btn-primary.nav-cta {
        display: none;
    }

    /* Testimonial */
    .testimonial-card {
        padding: var(--space-6);
    }

    /* Stats */
    .hero-stat-number {
        font-size: var(--text-2xl);
    }

    /* Announcement */
    .announcement-bar {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-8);
    }
}

/* ============================================
   MOBILE (640px)
   ============================================ */

@media (max-width: 640px) {

    /* Typography */
    .hero-title {
        font-size: var(--text-4xl);
        letter-spacing: -0.02em;
    }

    .section-title {
        font-size: var(--text-3xl);
    }

    /* Container */
    .container {
        padding: 0 var(--space-4);
    }

    /* Section */
    .section {
        padding: var(--space-12) 0;
    }

    /* Buttons */
    .btn-xl {
        padding: 0.875rem 1.75rem;
        font-size: var(--text-base);
    }

    .hero-ctas {
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    /* Nav */
    .nav-container {
        height: 60px;
    }

    .logo-text {
        display: none;
    }

    /* Card */
    .card {
        padding: var(--space-6);
    }

    /* Section Header */
    .section-header {
        margin-bottom: var(--space-10);
    }

    /* Hero Stats */
    .hero-stats-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Testimonials */
    .slider-btn {
        width: 40px;
        height: 40px;
    }

    /* Footer */
    .footer-main {
        padding: var(--space-12) 0 var(--space-10);
    }

    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-input-group .btn {
        width: 100%;
    }

    /* Mobile Menu */
    .mobile-menu {
        width: 100vw;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        bottom: var(--space-6);
        left: var(--space-4);
        width: 48px;
        height: 48px;
    }

    .scroll-top {
        bottom: var(--space-6);
        right: var(--space-4);
        width: 40px;
        height: 40px;
    }

    /* Process */
    .process-step-num {
        width: 52px;
        height: 52px;
        font-size: var(--text-lg);
    }

    /* Announcement */
    .announcement-bar p {
        font-size: 11px;
    }
}

/* ============================================
   EXTRA SMALL (480px)
   ============================================ */

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--text-3xl);
    }

    .section-title {
        font-size: var(--text-2xl);
    }

    .section-label {
        font-size: 10px;
    }

    .hero-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .hero-stat-number {
        font-size: var(--text-xl);
    }

    .stat-number {
        font-size: var(--text-4xl);
    }

    .marquee-item {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .footer-certs {
        justify-content: center;
    }

    .social-links {
        justify-content: flex-start;
    }

    .cta-title {
        font-size: var(--text-2xl);
    }

    .cta-section {
        padding: var(--space-10) var(--space-5);
    }

    /* Industry Cards */
    .industry-card {
        aspect-ratio: 4/3;
    }

    /* Flash Messages */
    .flash-message {
        left: var(--space-4);
        right: var(--space-4);
        max-width: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .footer,
    .whatsapp-float,
    .scroll-top,
    .announcement-bar,
    .preloader,
    .mobile-menu,
    .mobile-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a { text-decoration: underline; }

    .card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(108, 99, 255, 0.5);
        --text-secondary: var(--text-primary);
    }

    .btn-secondary {
        border-width: 2px;
    }

    .card {
        border-width: 2px;
    }
}

/* ============================================
   TOUCH DEVICES
   ============================================ */

@media (hover: none) {
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .nav-item:hover .dropdown-menu {
        display: none;
    }

    .dropdown-menu.mobile-open {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .whatsapp-float:hover {
        transform: none;
    }

    .social-link:hover {
        transform: none;
    }
}

/* ============================================
   DARK MODE SPECIFIC RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    [data-theme="dark"] .mobile-menu {
        background: #0D0D14;
    }

    [data-theme="light"] .mobile-menu {
        background: #FFFFFF;
    }
}