/**
 * Elneuro Responsive Design System
 * ================================
 *
 * Shared responsive CSS for all marketing pages.
 * Include this in all public-facing templates.
 *
 * Breakpoints:
 * - Mobile: < 480px
 * - Mobile Large: 480px - 767px
 * - Tablet: 768px - 1023px
 * - Desktop: 1024px - 1439px
 * - Large Desktop: >= 1440px
 */

/* =============================================================================
   CSS Variables
   ============================================================================= */
:root {
    --mobile-padding: 16px;
    --tablet-padding: 24px;
    --desktop-padding: 40px;
    --nav-height: 70px;
    --nav-height-mobile: 60px;
}

/* =============================================================================
   Base Mobile-First Reset
   ============================================================================= */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* =============================================================================
   Mobile Navigation
   ============================================================================= */

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile menu open state */
.mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile navigation panel */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 24px 24px;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav a {
    display: block;
    padding: 16px 0;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    transition: color 0.2s ease;
}

.mobile-nav a:hover {
    color: #667eea;
}

.mobile-nav .nav-cta {
    display: block;
    margin-top: 24px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* =============================================================================
   Responsive Typography
   ============================================================================= */

/* Mobile (< 480px) */
@media (max-width: 479px) {
    h1, .hero h1 {
        font-size: 28px !important;
        line-height: 1.2;
    }

    h2, .section-title {
        font-size: 24px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    p, .hero p {
        font-size: 16px !important;
        line-height: 1.6;
    }

    .hero-subtitle {
        font-size: 14px !important;
    }
}

/* Mobile Large (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    h1, .hero h1 {
        font-size: 32px !important;
        line-height: 1.2;
    }

    h2, .section-title {
        font-size: 28px !important;
    }

    h3 {
        font-size: 22px !important;
    }

    p, .hero p {
        font-size: 17px !important;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    h1, .hero h1 {
        font-size: 40px !important;
    }

    h2, .section-title {
        font-size: 32px !important;
    }
}

/* =============================================================================
   Responsive Navigation
   ============================================================================= */

/* Show mobile menu button on mobile/tablet */
@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    .nav-cta {
        display: none !important;
    }

    nav, .navbar {
        padding: 0 var(--mobile-padding);
    }
}

/* Desktop navigation */
@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }

    .nav-links {
        display: flex !important;
    }
}

/* =============================================================================
   Responsive Containers
   ============================================================================= */

/* Mobile */
@media (max-width: 767px) {
    .container,
    .hero,
    section,
    .section {
        padding-left: var(--mobile-padding) !important;
        padding-right: var(--mobile-padding) !important;
    }

    .hero {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
        min-height: auto !important;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .container,
    .hero,
    section,
    .section {
        padding-left: var(--tablet-padding) !important;
        padding-right: var(--tablet-padding) !important;
    }
}

/* =============================================================================
   Responsive Grids
   ============================================================================= */

/* Feature/Card grids */
@media (max-width: 479px) {
    .feature-grid,
    .pricing-grid,
    .card-grid,
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .feature-grid,
    .pricing-grid,
    .card-grid,
    .grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .feature-grid,
    .pricing-grid,
    .card-grid,
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

/* =============================================================================
   Responsive Buttons
   ============================================================================= */

@media (max-width: 767px) {
    .btn,
    .cta-btn,
    .button,
    a.cta-btn {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 48px; /* Touch target */
    }

    .btn-group,
    .cta-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
}

/* =============================================================================
   Responsive Footer
   ============================================================================= */

@media (max-width: 767px) {
    footer {
        padding: 40px var(--mobile-padding) !important;
    }

    .footer-grid,
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .footer-grid,
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =============================================================================
   Responsive Cards
   ============================================================================= */

@media (max-width: 767px) {
    .card,
    .feature-card,
    .pricing-card {
        padding: 24px !important;
    }

    .pricing-card .price {
        font-size: 36px !important;
    }
}

/* =============================================================================
   Responsive Tables
   ============================================================================= */

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

    .table-responsive {
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px;
    }
}

/* =============================================================================
   Touch-Friendly Elements
   ============================================================================= */

@media (max-width: 1023px) {
    /* Ensure minimum touch target size */
    a, button, input[type="submit"], .clickable {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase spacing between interactive elements */
    .nav-links a,
    .footer-links a {
        padding: 12px 16px;
    }
}

/* =============================================================================
   Hide on specific breakpoints
   ============================================================================= */

.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

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

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

.hide-tablet {
    display: block;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hide-tablet {
        display: none !important;
    }
}

/* =============================================================================
   Safe Area for notched devices (iPhone X+)
   ============================================================================= */

@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .mobile-nav {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
    nav, .navbar, .mobile-menu-btn, .mobile-nav, footer {
        display: none !important;
    }

    .hero {
        padding-top: 0 !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
