/* ========================================
   MiCalls - Comprehensive Responsive Styles
   Ensures full responsiveness across all screen sizes
   ======================================== */

/* ========================================
   Mobile First Base (< 576px)
   ======================================== */

/* Typography scaling for mobile */
html {
    font-size: 14px;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* Container padding */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Section spacing */
.section {
    padding: 3rem 0;
}

/* Header mobile */
.site-header .navbar-brand img {
    height: 32px;
}

.nav-cta .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* Hero section mobile */
.hero-section,
.industry-hero,
.solutions-hero,
.product-hero {
    padding-top: 80px;
    padding-bottom: 3rem;
}

.hero-section h1,
.industry-hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
}

.hero-section .lead,
.industry-hero .lead {
    font-size: 1rem;
}

.hero-ctas {
    flex-direction: column;
    gap: 0.75rem;
}

.hero-ctas .btn {
    width: 100%;
    justify-content: center;
}

.hero-benefits li {
    font-size: 0.875rem;
}

/* Channel switcher mobile */
.channel-switcher {
    flex-wrap: wrap;
}

.channel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.channel-chip {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* Conversation preview mobile */
.hero-visual .conversation-preview {
    margin-top: 2rem;
}

.preview-transcript {
    max-height: 300px;
    overflow-y: auto;
}

/* Trust strip mobile */
.trust-strip {
    padding: 1.5rem 0;
}

.trust-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

.proof-chips {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.proof-chip {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* Pain points mobile */
.pain-toggle {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pain-toggle .toggle-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.pain-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.pain-card {
    padding: 1.25rem;
}

.pain-card h4 {
    font-size: 1rem;
}

.pain-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
}

/* Use case tabs mobile */
.use-case-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.use-case-tab {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.use-case-content h3 {
    font-size: 1.25rem;
}

.use-case-features li {
    font-size: 0.875rem;
}

/* Workflow section - styles moved to media query below */

.scenario-selector select {
    width: 100%;
}

/* Workflow styles moved to solutions.css */

.step-number {
    flex-shrink: 0;
}

.step-card {
    flex: 1;
    text-align: left;
}

/* Channels section mobile */
.channels-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.channel-select-btn {
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
    padding: 0.75rem 0.5rem;
}

.channel-select-btn span {
    font-size: 0.75rem;
}

.channel-icon-wrap {
    width: 36px;
    height: 36px;
}

.channel-detail h3 {
    font-size: 1.25rem;
}

.channel-features li {
    font-size: 0.875rem;
}

/* CRM section mobile */
.crm-columns {
    flex-direction: column;
    gap: 1.5rem;
}

.crm-column {
    width: 100%;
}

.crm-sync-visual {
    order: -1;
}

/* Case study mobile */
.case-study-featured {
    padding: 1.5rem;
}

.case-results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.case-result .result-number {
    font-size: 1.5rem;
}

.testimonial-card {
    margin-top: 2rem;
    padding: 1.5rem;
}

/* ROI tiles mobile */
.roi-tiles {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.roi-tile {
    padding: 1.5rem;
}

/* Implementation accordion mobile */
.accordion-button {
    padding: 1rem;
    font-size: 0.875rem;
}

.accordion-body {
    padding: 1rem;
}

.accordion-body li {
    font-size: 0.875rem;
}

/* FAQ mobile */
.faq-grid {
    gap: 0.75rem;
}

/* Final CTA mobile */
.final-cta-section {
    padding: 3rem 0;
}

.final-cta-section h2 {
    font-size: 1.5rem;
}

.cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
}

.cta-buttons .btn {
    width: 100%;
}

.cta-trust {
    flex-direction: column;
    gap: 0.5rem;
}

/* Footer mobile */
.site-footer {
    padding: 3rem 0 1.5rem;
}

.site-footer .row > div {
    margin-bottom: 2rem;
}

.footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

/* Cards mobile */
.card,
.solution-card,
.pain-card {
    padding: 1.25rem;
}

/* Buttons mobile */
.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
}

/* Grids mobile */
.solutions-grid,
.features-grid,
.industry-grid {
    grid-template-columns: 1fr;
}

/* Drawers mobile */
.drawer {
    max-width: 100%;
    width: 100%;
}

/* ========================================
   Small devices (576px and up)
   ======================================== */
@media (min-width: 576px) {
    html {
        font-size: 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-section h1,
    .industry-hero h1 {
        font-size: 2rem;
    }

    .hero-ctas {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-ctas .btn {
        width: auto;
    }

    .pain-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .roi-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-results-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .cta-buttons .btn {
        width: auto;
    }

    .cta-trust {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ========================================
   Medium devices (768px and up)
   ======================================== */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .section {
        padding: 4rem 0;
    }

    .site-header .navbar-brand img {
        height: 40px;
    }

    .hero-section,
    .industry-hero,
    .solutions-hero,
    .product-hero {
        padding-top: 100px;
        padding-bottom: 4rem;
    }

    .hero-section h1,
    .industry-hero h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead,
    .industry-hero .lead {
        font-size: 1.125rem;
    }

    .trust-content {
        flex-direction: row;
        text-align: left;
    }

    .pain-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .use-case-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }

    .workflow-controls {
        flex-direction: row;
        justify-content: center;
    }

    .workflow-toggle {
        width: auto;
    }

    .scenario-selector {
        width: auto;
    }

    .scenario-selector select {
        width: auto;
        min-width: 200px;
    }

    .channels-selector {
        justify-content: center;
    }

    .channel-select-btn {
        flex: none;
        min-width: auto;
    }

    .crm-columns {
        flex-direction: row;
    }

    .crm-sync-visual {
        order: 0;
    }

    .case-study-featured {
        padding: 2rem;
    }

    .final-cta-section {
        padding: 4rem 0;
    }

    .final-cta-section h2 {
        font-size: 2rem;
    }

    .footer-bottom {
        flex-direction: row;
        text-align: left;
    }

    /* Navigation dropdown */
    .dropdown-menu.mega-menu {
        min-width: 500px;
    }
}

/* ========================================
   Large devices (992px and up)
   ======================================== */
@media (min-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }

    .section {
        padding: 5rem 0;
    }

    .hero-section,
    .industry-hero,
    .solutions-hero,
    .product-hero {
        padding-top: 120px;
        padding-bottom: 5rem;
    }

    .hero-section h1,
    .industry-hero h1 {
        font-size: 3rem;
    }

    .hero-section .lead,
    .industry-hero .lead {
        font-size: 1.25rem;
    }

    .pain-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .use-case-tabs {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }

    .use-case-tab {
        flex-shrink: 1;
    }

    .workflow-steps {
        flex-direction: row;
        justify-content: space-between;
    }

    .workflow-step {
        flex-direction: column;
        text-align: center;
        padding: 0;
    }

    .workflow-connector {
        display: block;
    }

    .step-card {
        text-align: center;
    }

    .roi-tiles {
        grid-template-columns: repeat(4, 1fr);
    }

    .final-cta-section h2 {
        font-size: 2.5rem;
    }

    /* Full navigation visible */
    .navbar-collapse {
        display: flex !important;
    }

    .navbar-toggler {
        display: none;
    }

    /* Dropdown menus */
    .dropdown-menu.mega-menu {
        min-width: 700px;
    }
}

/* ========================================
   Extra large devices (1200px and up)
   ======================================== */
@media (min-width: 1200px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .container {
        max-width: 1140px;
    }

    .hero-section h1,
    .industry-hero h1 {
        font-size: 3.5rem;
    }

    .dropdown-menu.mega-menu {
        min-width: 800px;
    }
}

/* ========================================
   Extra extra large devices (1400px and up)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ========================================
   Landscape orientation adjustments
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section,
    .industry-hero {
        padding-top: 70px;
        padding-bottom: 2rem;
    }

    .hero-section h1,
    .industry-hero h1 {
        font-size: 1.75rem;
    }

    .hero-visual {
        max-height: 250px;
        overflow: hidden;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    .site-header,
    .site-footer,
    .sticky-demo-cta,
    .channel-switcher,
    .workflow-toggle,
    .btn {
        display: none !important;
    }

    .section {
        padding: 1rem 0;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }
    body { font-size: 12pt; }
}

/* ========================================
   Touch device optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }

    .nav-link,
    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    .channel-chip,
    .use-case-tab,
    .toggle-btn {
        min-height: 44px;
    }

    /* Remove hover effects on touch */
    .card:hover,
    .solution-card:hover,
    .pain-card:hover {
        transform: none;
    }
}

/* ========================================
   Reduced motion preferences
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   High contrast mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --gray-200: #666;
        --gray-300: #555;
        --gray-400: #444;
        --gray-500: #333;
    }

    .btn-outline-light,
    .btn-outline-primary {
        border-width: 2px;
    }
}

/* ========================================
   Dark mode support
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ========================================
   Fix for iOS Safari 100vh issue
   ======================================== */
@supports (-webkit-touch-callout: none) {
    .mobile-menu,
    .drawer {
        height: -webkit-fill-available;
    }
}

/* ========================================
   Sticky elements mobile adjustments
   ======================================== */
@media (max-width: 991.98px) {
    .sticky-demo-cta {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        padding: 1rem;
    }

    .sticky-demo-cta .btn {
        width: 100%;
    }

    .solutions-nav {
        display: none;
    }
}

/* ========================================
   Table responsiveness
   ======================================== */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   Image responsiveness
   ======================================== */
img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Video responsiveness
   ======================================== */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   Form responsiveness
   ======================================== */
@media (max-width: 575.98px) {
    .form-row {
        flex-direction: column;
    }

    .form-row > .form-group {
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* ========================================
   Utility classes for responsive hiding
   ======================================== */
.hide-mobile {
    display: none !important;
}

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

    .hide-desktop {
        display: none !important;
    }
}

.hide-tablet {
    display: block !important;
}

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