/**
 * MEV Shield - Universal Responsive Styles
 * Include this in all pages for consistent responsive behavior
 */

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE FIRST BASE STYLES
   ═══════════════════════════════════════════════════════════════════════ */

/* Ensure viewport meta is respected */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Responsive images */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    nav {
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.2rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   TYPOGRAPHY RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    h1, .hero h1 {
        font-size: 2.5rem !important;
    }

    h2, .section h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 768px) {
    h1, .hero h1 {
        font-size: 2rem !important;
    }

    h2, .section h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    p, .hero p {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    h1, .hero h1 {
        font-size: 1.75rem !important;
    }

    h2, .section h2 {
        font-size: 1.25rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .hero {
        padding: 80px 20px 40px !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 15px 30px !important;
    }

    .hero p {
        max-width: 100% !important;
        padding: 0 10px;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }

    .hero-buttons a, .hero-buttons button {
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   GRID LAYOUTS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .stats-grid,
    .features-grid,
    .mission-grid,
    .team-grid,
    .values-grid,
    .price-grid,
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .stats-grid,
    .stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 20px !important;
    }

    .features-grid,
    .mission-grid,
    .team-grid,
    .values-grid,
    .price-grid,
    .card-grid,
    .partner-grid,
    .benefit-grid,
    .perf-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .stats {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .stat-card,
    .feature-card,
    .mission-card,
    .price-card,
    .benefit-card,
    .value-item {
        padding: 20px 15px !important;
    }

    .stat-value {
        font-size: 28px !important;
    }

    .stat-label {
        font-size: 11px !important;
    }

    .stat-icon {
        font-size: 24px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   SECTIONS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .section,
    .gnn-section,
    .exchanges,
    .features,
    .cta,
    .benefits,
    .performance,
    .carbon-section,
    .trader-benefits {
        padding: 60px 30px !important;
    }
}

@media (max-width: 768px) {
    .section,
    .gnn-section,
    .exchanges,
    .features,
    .cta,
    .benefits,
    .performance,
    .carbon-section,
    .trader-benefits {
        padding: 40px 20px !important;
    }

    .container {
        padding: 0 15px !important;
    }
}

@media (max-width: 480px) {
    .section,
    .gnn-section,
    .exchanges,
    .features,
    .cta,
    .benefits,
    .performance,
    .carbon-section,
    .trader-benefits {
        padding: 30px 15px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   FORMS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    form {
        padding: 20px !important;
    }

    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    .form-row,
    .input-group {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .form-row > *,
    .input-group > * {
        width: 100% !important;
    }

    button[type="submit"],
    .btn-primary,
    .btn-secondary {
        width: 100% !important;
        padding: 15px 20px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   TABLES RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 10px 8px !important;
        font-size: 13px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   TIMELINE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .timeline-date {
        width: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    footer .footer-grid,
    footer .container > div {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px !important;
    }

    footer .footer-links {
        flex-direction: column !important;
        gap: 15px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL/POPUP RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .modal-content,
    .popup-content {
        width: 95% !important;
        max-width: none !important;
        margin: 10px !important;
        padding: 20px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   SPECIFIC PAGE FIXES
   ═══════════════════════════════════════════════════════════════════════ */

/* Pricing page */
@media (max-width: 768px) {
    .pricing-toggle {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Exchange partners */
@media (max-width: 768px) {
    .exchange-logo {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Carbon section */
@media (max-width: 768px) {
    .carbon-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    .carbon-flow {
        flex-direction: column !important;
    }

    .carbon-flow-arrow {
        transform: rotate(90deg) !important;
    }
}

@media (max-width: 480px) {
    .carbon-stats {
        grid-template-columns: 1fr !important;
    }
}

/* Trader benefits */
@media (max-width: 768px) {
    .trader-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════ */

.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}
