/* ChurnAnalytics SaaS Template - Responsive CSS */
/* Mobile-first responsive design with Bootstrap 5 breakpoints */

/* Base mobile styles (default) */
@media (max-width: 575.98px) {
    /* Extra small devices (phones, less than 576px) */
    
    /* Conservative typography for mobile */
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    p.lead {
        font-size: 1rem;
    }
    
    /* Hero section adjustments */
    .hero-section {
        min-height: 80vh;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Section padding reduction */
    section {
        padding: 3rem 0;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Button sizing */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Team member images */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Form adjustments */
    .form-control {
        padding: 0.65rem 0.85rem;
    }
    
    /* Timeline adjustments */
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    /* Footer text size */
    footer small {
        font-size: 0.75rem;
    }
    
    /* NO ANIMATIONS ON MOBILE as per rules */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Disable scroll animations */
    .sal-animate {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.15rem !important;
    }
    
    h1, .h1 {
        font-size: 1.85rem;
    }
    
    .hero-section {
        min-height: 90vh;
    }
    
    section {
        padding: 3.5rem 0;
    }
    
    /* NO ANIMATIONS ON MOBILE */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero-section {
        min-height: 100vh;
    }
    
    /* Enable animations on tablets and larger */
    [data-sal] {
        transition-duration: 0.8s;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    section {
        padding: 4.5rem 0;
    }
    
    /* Full hero height on desktop */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Team spacing */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Card hover effects */
    .card:hover {
        transform: translateY(-8px);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    section {
        padding: 5rem 0;
    }
    
    /* Larger spacing for XL screens */
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced hover effects */
    .card:hover {
        transform: translateY(-10px);
    }
}

/* XXL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    section {
        padding: 5.5rem 0;
    }
    
    /* Maximum container width */
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced spacing */
    .hero-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    footer .btn,
    [data-sal] {
        display: none !important;
    }
    
    /* Ensure good contrast for printing */
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    /* Optimize text for print */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    .card:hover {
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0c11f0;
        --secondary-color: #000000;
        --accent-color: #0c7a10;
        --text-color: #000000;
        --background-color: #ffffff;
    }
    
    .card {
        border: 2px solid #000000;
    }
    
    .btn {
        border: 2px solid #000000;
    }
}

/* Dark mode preference support */

/* Focus improvements for keyboard navigation */
@media (any-hover: none) {
    /* Touch devices - improve tap targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Container queries support (where available) */
@container (min-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
}

/* Responsive font scaling */
@media (min-width: 320px) and (max-width: 1200px) {
    html {
        font-size: calc(16px + 6 * ((100vw - 320px) / 880));
    }
}

/* Ensure no Bootstrap grid overrides */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* NO CUSTOM GRID MODIFICATIONS - Bootstrap 5 grid used as-is */ 

.hero-section h1 {
    padding-top: 150px;
}