/* 
   Luvya Ambulance Services - Responsive Design
   Mobile-first approach with breakpoints
*/

/* Mobile Devices (Small) - 320px and up */
@media screen and (max-width: 576px) {
    /* Typography */
    h1, .display-3, .display-4 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Hero Section */
    .hero-section {
        padding: 60px 0 !important;
        min-height: 400px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    /* Navigation */
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        margin: 0.25rem 0;
    }

    /* Forms */
    .form-control,
    .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 0.65rem 1.5rem;
        font-size: 1rem;
    }

    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .service-icon {
        font-size: 35px !important;
    }

    /* Sections */
    section {
        padding: 3rem 0 !important;
    }

    /* Emergency Number */
    .emergency-contact h2 {
        font-size: 1.75rem;
    }

    /* Footer */
    footer {
        padding-top: 2rem !important;
    }

    footer .row {
        margin-bottom: 2rem;
    }

    /* CTA Section */
    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2.25rem;
    }

    /* Stat Cards */
    .stat-card {
        padding: 1.5rem !important;
    }

    .stat-card h3 {
        font-size: 1.75rem;
    }

    /* Contact Info */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }

    /* Accordion */
    .accordion-button {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Text utility adjustments */
    .lead {
        font-size: 1rem;
    }

    /* Margin/Padding fixes */
    .container {
        padding: 0 1rem;
    }

    /* Display utilities */
    .d-lg-none {
        display: block !important;
    }

    .d-lg-block {
        display: none !important;
    }
}

/* Tablets - 576px and up */
@media screen and (min-width: 576px) and (max-width: 768px) {
    h1, .display-4 {
        font-size: 2.5rem;
    }

    .hero-section {
        padding: 80px 0;
        min-height: 500px;
    }

    .service-icon {
        font-size: 45px !important;
    }

    section {
        padding: 4rem 0 !important;
    }

    .stat-card h3 {
        font-size: 2rem;
    }
}

/* Small Devices and Desktops - 768px and up */
@media screen and (min-width: 768px) {
    /* Animations enabled */
    .card,
    .service-card,
    .btn {
        transition: all 0.3s ease;
    }

    .card:hover {
        transform: translateY(-5px);
    }

    .service-card:hover {
        transform: translateY(-10px);
    }

    /* Multi-column layouts */
    .row {
        display: flex;
    }

    /* Grid optimization */
    .col-md-6 {
        flex: 0 0 50%;
    }

    .col-md-4 {
        flex: 0 0 33.333%;
    }

    .col-md-3 {
        flex: 0 0 25%;
    }
}

/* Large Desktops - 992px and up */
@media screen and (min-width: 992px) {
    .navbar {
        padding: 1.2rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }

    .hero-section {
        padding: 120px 0;
        min-height: 600px;
    }

    /* Larger fonts on desktop */
    body {
        font-size: 1.025rem;
    }

    /* Multi-column layouts */
    .col-lg-6 {
        flex: 0 0 50%;
    }

    .col-lg-4 {
        flex: 0 0 33.333%;
    }

    .col-lg-3 {
        flex: 0 0 25%;
    }

    .col-lg-8 {
        flex: 0 0 66.667%;
    }

    .col-lg-9 {
        flex: 0 0 75%;
    }

    section {
        padding: 5rem 0 !important;
    }
}

/* Extra Large Desktops - 1200px and up */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }

    /* Spacing */
    .mb-5 {
        margin-bottom: 3rem !important;
    }

    .mt-5 {
        margin-top: 3rem !important;
    }
}

/* Extra Extra Large - 1400px and up */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Landscape Orientation */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 400px;
        padding: 60px 0 !important;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    section {
        padding: 2rem 0 !important;
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Subtle improvements for high-DPI screens */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Sharper images */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }

    a, button {
        min-height: 44px;
    }

    /* Disable hover effects on touch */
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Improve form inputs for mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px;
        min-height: 44px;
    }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #ffffff;
        color: #000000;
    }

    .card {
        background-color: #2e2f7a;
        color: #f0f0f0;
    }

    .form-control,
    .form-select {
        background-color: #cdcdcd;
        color: #f0f0f0;
        border-color: #444;
    }

    .form-control:focus,
    .form-select:focus {
        background-color: #3a3a3a;
        border-color: var(--primary-color);
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    a {
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
    }

    /* Optimize colors for print */
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    .btn {
        border: 1px solid #000;
    }

    .text-danger {
        color: #000 !important;
    }

    .bg-danger {
        background-color: #ccc !important;
        color: #000 !important;
    }
}
