/* ========================================
   RESPONSIVE ENHANCEMENTS
   Mobile-first responsive design system
   ======================================== */

/* =========================
   BASE & MOBILE STYLES
   ========================= */

/* Ensure all interactive elements are touch-friendly */
@media (max-width: 768px) {
    /* Touch-friendly button sizing */
    button, .btn, a.btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* Tab buttons for mobile */
    #startups-tab, #consultants-tab {
        padding: 14px 20px !important;
        font-size: 15px !important;
        white-space: nowrap;
    }
    
    /* Pricing tabs - stack on very small screens */
    #startup-pricing-tab, #consultant-pricing-tab {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    
    /* Hide icons on very small screens to save space */
    @media (max-width: 480px) {
        .fa-rocket, .fa-briefcase {
            display: none;
        }
    }
    
    /* Hero section adjustments */
    .hero-logo {
        height: 60px !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Reduce padding on mobile */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Form inputs - mobile friendly */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 14px !important;
    }
    
    /* Modal on mobile - full screen */
    #bookingModal > div {
        max-width: 100% !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto;
    }
    
    /* Pricing cards - better spacing on mobile */
    .pricing-content .grid {
        gap: 1.5rem !important;
        padding: 0 1rem;
    }
    
    /* Value props - stack vertically */
    .flex.flex-col.sm\:flex-row {
        gap: 1rem !important;
    }
}

/* =========================
   TABLET STYLES (768px - 1024px)
   ========================= */

@media (min-width: 768px) and (max-width: 1024px) {
    /* Optimal button sizing for tablets */
    button, .btn {
        padding: 14px 28px;
        font-size: 17px;
    }
    
    /* Tab navigation - comfortable size */
    #startups-tab, #consultants-tab {
        padding: 16px 32px !important;
    }
    
    /* Hero section */
    h1 {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }
    
    /* Pricing cards - 2 column layout works best */
    .pricing-content .grid.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Modal - nice centered size */
    #bookingModal > div {
        max-width: 90% !important;
        margin: 2rem auto !important;
    }
}

/* =========================
   LAPTOP STYLES (1024px - 1440px)
   ========================= */

@media (min-width: 1024px) and (max-width: 1440px) {
    /* Container max width for readability */
    .max-w-7xl {
        max-width: 1200px !important;
    }
    
    /* Hero headline - optimal size */
    h1 {
        font-size: 4.5rem !important;
    }
    
    /* Button sizing - desktop appropriate */
    button, .btn {
        padding: 16px 32px;
        font-size: 18px;
    }
    
    /* Pricing cards - show 4 columns */
    .pricing-content .grid {
        gap: 2rem !important;
    }
    
    /* Features grid - 3 columns */
    .grid.md\:grid-cols-3 {
        gap: 2.5rem !important;
    }
}

/* =========================
   DESKTOP STYLES (1440px+)
   ========================= */

@media (min-width: 1440px) {
    /* Larger containers for big screens */
    .max-w-7xl {
        max-width: 1400px !important;
    }
    
    /* Hero - maximum impact */
    h1 {
        font-size: 5.5rem !important;
        letter-spacing: -0.02em;
    }
    
    /* Generous spacing */
    section {
        padding-top: 6rem !important;
        padding-bottom: 6rem !important;
    }
    
    /* Pricing cards - optimal width with gaps */
    .pricing-content .grid {
        gap: 2.5rem !important;
    }
}

/* =========================
   NAVIGATION RESPONSIVE
   ========================= */

/* Mobile menu improvements */
@media (max-width: 768px) {
    nav {
        padding: 1rem !important;
    }
    
    nav a {
        font-size: 15px !important;
        padding: 10px 12px !important;
    }
    
    /* Hide some nav items on small screens */
    @media (max-width: 640px) {
        nav .hidden-mobile {
            display: none !important;
        }
    }
}

/* =========================
   FEATURES GRID RESPONSIVE
   ========================= */

/* Feature cards stacking */
@media (max-width: 768px) {
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* Tablet - 2 columns for features */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid.md\:grid-cols-3,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =========================
   TYPOGRAPHY RESPONSIVE
   ========================= */

/* Mobile typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Reduce padding for text blocks */
    .text-center p {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* =========================
   FORMS & MODALS RESPONSIVE
   ========================= */

/* Mobile form improvements */
@media (max-width: 768px) {
    /* Form fields full width */
    form input,
    form select,
    form textarea {
        width: 100% !important;
    }
    
    /* Form grid - single column */
    form .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Modal padding */
    #bookingModal .bg-gray-800 {
        padding: 1.5rem !important;
    }
    
    /* Close button - easier to tap */
    #bookingModal button[type="button"] {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

/* =========================
   FAQ SECTION RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    /* FAQ buttons - full width tap area */
    [id^="faq-"] button {
        width: 100%;
        text-align: left;
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* FAQ content - better spacing */
    [id^="faq-content-"] {
        padding: 1rem !important;
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

/* =========================
   PRICING CARDS RESPONSIVE
   ========================= */

/* Mobile pricing */
@media (max-width: 768px) {
    .pricing-content > div > div {
        padding: 1.5rem !important;
    }
    
    /* Pricing amount - smaller on mobile */
    .pricing-content .text-4xl {
        font-size: 2.5rem !important;
    }
}

/* Tablet pricing - 2 columns */
@media (min-width: 768px) and (max-width: 1024px) {
    .pricing-content .grid.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =========================
   AI ASSISTANT WIDGET RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    /* Position bubble better on mobile */
    .public-assistant-bubble {
        bottom: 20px !important;
        right: 20px !important;
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
    }
    
    /* Full screen chat on mobile */
    .public-assistant-window {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
    }
    
    /* Chat messages - better mobile padding */
    .public-assistant-messages {
        padding: 1rem !important;
    }
}

/* =========================
   UTILITY CLASSES
   ========================= */

/* Smooth scrolling for all devices */
html {
    scroll-behavior: smooth;
}

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

/* Better focus states for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #3B82F6;
    outline-offset: 2px;
}

/* Improve readability */
p, li {
    max-width: 75ch;
}

/* =========================
   PRINT STYLES
   ========================= */

@media print {
    /* Hide interactive elements when printing */
    .public-assistant-widget,
    nav,
    button,
    #bookingModal {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        background: white !important;
        color: black !important;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
    }
}

/* =========================
   ACCESSIBILITY ENHANCEMENTS
   ========================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button,
    .btn {
        border: 2px solid currentColor;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Dark mode optimization (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
    /* Ensure text is readable */
    body {
        color: #E5E7EB;
    }
}

/* =========================
   MOBILE MENU ANIMATIONS
   ========================= */

/* Mobile menu button touch target */
#mobile-menu-button {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-center;
    touch-action: manipulation;
}

/* Mobile menu slide animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

#mobile-menu.show {
    max-height: 100vh;
    opacity: 1;
    overflow-y: auto;
}

/* Icon rotation animation */
#mobile-menu-icon {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu-icon.rotate {
    transform: rotate(90deg);
}

/* Mobile menu backdrop blur */
@media (max-width: 1024px) {
    nav {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Smooth scrolling for mobile menu */
#mobile-menu {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Mobile menu link active states */
#mobile-menu a:active {
    background-color: rgba(55, 65, 81, 0.5) !important;
    transform: scale(0.98);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    body.mobile-menu-open {
        position: fixed;
        width: 100%;
    }
}
