/* Responsive CSS for ChurnInsight SaaS Template */
/* Mobile-first approach following Bootstrap 5 breakpoints */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    h1 {
        font-size: 1.83rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.55rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.34rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1.27rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 1.08rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        margin-bottom: 1rem;
    padding-top: 225px;
}
    
    .hero-section .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.66rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Team */
    .team img {
        width: 80px;
        height: 80px;
    }
    
    /* Process Steps */
    .process-step::after {
        display: none;
    }
    
    /* Contact Form */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Gallery */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Services */
    .services-grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Pricing */
    .pricing .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Blog */
    #blog_grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* FAQ */
    .faq .col-lg-6 {
        margin-bottom: 1.71rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.90rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 85vh;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Team */
    .team img {
        width: 100px;
        height: 100px;
    }
    
    /* Process Steps - Show connection lines on small screens */
    .process-step::after {
        right: -25%;
        width: 50%;
    }
    
    /* Cards in two columns */
    .services-grid .col-md-6:nth-child(odd) {
        padding-right: 0.75rem;
    }
    
    .services-grid .col-md-6:nth-child(even) {
        padding-left: 0.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 {
        font-size: 2.29rem;
    }
    
    h2 {
        font-size: 1.96rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 90vh;
    }
    
    /* Sections */
    section {
        padding: 4rem 0;
    }
    
    /* Team */
    .team img {
        width: 110px;
        height: 110px;
    }
    
    /* About Features - 2 columns on tablets */
    .about .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Services - 2 columns on tablets */
    .services-grid .col-lg-4:nth-child(3n+1) {
        clear: none;
    }
    
    .services-grid .col-lg-4:nth-child(2n+1) {
        clear: left;
    }
    
    /* Features - Stack properly */
    .features .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* Pricing - Stack in single column */
    .pricing .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* FAQ - Keep 2 columns */
    .faq .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* Core Info - 2 columns */
    .core-info .col-lg-4:nth-child(3n+1) {
        clear: none;
    }
    
    .core-info .col-lg-4:nth-child(2n+1) {
        clear: left;
    }
}

/* Large devices (desktops, 997px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Typography */
    h1 {
        font-size: 2.65rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 95vh;
    }
    
    /* Sections */
    section {
        padding: 5rem 0;
    }
    
    /* Team */
    .team img {
        width: 120px;
        height: 120px;
    }
    
    /* Process Steps - Adjust spacing */
    .process-step::after {
        right: -40%;
        width: 80%;
    }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Typography */
    h1 {
        font-size: 2.85rem;
    }
    
    h2 {
        font-size: 2.39rem;
    }
    
    /* Container max-width adjustment */
    .container {
        max-width: 1140px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Sections */
    section {
        padding: 6rem 0;
    }
    
    /* Team */
    .team img {
        width: 140px;
        height: 140px;
    }
    
    /* Enhanced spacing */
    .hero-section .col-lg-6:first-child {
        padding-right: 3rem;
    }
    
    /* Gallery - Better spacing */
    #gallery .col-lg-3 {
        padding: 0.5rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Adjust for retina displays */
    .navbar {
        border-bottom-width: 0.5px;
    }
    
    .card {
        box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
    }
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    #gallery {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #dfdfdf;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    section {
        padding: 1rem 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Dark mode support */

/* Container queries for enhanced responsiveness */
@container (max-width: 400px) {
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        font-size: 1.00rem;
        padding: 0.5rem 1rem;
    }
}

/* Focus management for keyboard navigation */
@media (hover: none) and (pointer: coarse) {
    /* Touch device adjustments */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Animation adjustments for different screen sizes */
@media (max-width: 767.98px) {
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Sticky navbar adjustments */
@media (min-width: 992px) {
    body {
        padding-top: 76px; /* Account for fixed navbar */
    }
    
    .hero-section {
        margin-top: -76px;
        padding-top: 76px;
    }
}

/* Gallery responsive grid */
@media (max-width: 575.98px) {
    #gallery .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #gallery .col-lg-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Team responsive grid */
@media (max-width: 575.98px) {
    .team .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .team .col-lg-2 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        margin-bottom: 2rem;
    }
}

/* Process steps responsive */
@media (max-width: 991.98px) {
    .process .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
    
    .process-step::after {
        display: none;
    }
}

/* Timeline responsive */
@media (max-width: 991.98px) {
    .timeline .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
} 