/* ===== RESPONSIVE STYLES ===== */

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Large Devices (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .navbar-nav {
        display: flex !important;
    }
    
    .navbar-toggler {
        display: none !important;
    }
}

/* Medium Devices (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .col-md-6 {
        width: 50%;
    }
}

/* Small Devices (576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Extra Small Devices (less than 576px) */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .section-title span {
        font-size: 12px;
    }
    
    .service-item {
        padding: 25px 15px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 28px;
    }
    
    .service-item h3 {
        font-size: 20px;
    }
    
    .doctor-content {
        padding: 15px;
    }
    
    .doctor-content h3 {
        font-size: 18px;
    }
    
    .contact-form,
    .contact-info {
        padding: 25px 15px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-item .icon {
        margin: 0 auto;
    }
    
    .footer-widget {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .top-header-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .top-header-social {
        margin-top: 15px;
    }
    
    .hero-btn {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-btn .btn {
        width: 100%;
        text-align: center;
    }
    
    .about-list li {
        font-size: 14px;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .header-btn .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
        display: none;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .header-btn {
        margin: 20px 0 0 0;
    }
    
    .header-btn .btn {
        width: 100%;
        text-align: center;
    }
}

/* Tablet Specific Styles */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .service-item {
        margin-bottom: 20px;
    }
    
    .doctor-item {
        margin-bottom: 20px;
    }
    
    .contact-form,
    .contact-info {
        margin-bottom: 30px;
    }
}

/* Landscape Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-area {
        min-height: auto;
        padding: 80px 0;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .pt-100 {
        padding-top: 60px;
    }
    
    .pb-70 {
        padding-bottom: 50px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .about-image img,
    .doctor-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header-area,
    .footer-area,
    .preloader {
        display: none !important;
    }
    
    .hero-area {
        background: none !important;
        color: #000 !important;
        min-height: auto;
        padding: 20px 0;
    }
    
    .btn {
        border: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
    
    .service-item,
    .doctor-item,
    .contact-form,
    .contact-info {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --text-color: #000;
        --light-text: #333;
        --border-color: #000;
    }
    
    .btn-primary {
        background-color: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .service-item,
    .doctor-item,
    .contact-form,
    .contact-info {
        border: 2px solid #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #4a90e2;
        --secondary-color: #2a2a2a;
        --text-color: #fff;
        --light-text: #ccc;
        --white: #1a1a1a;
        --border-color: #444;
    }
    
    body {
        background-color: #1a1a1a;
        color: #fff;
    }
    
    .header-area {
        background-color: #2a2a2a;
    }
    
    .service-item,
    .doctor-item,
    .contact-form,
    .contact-info {
        background-color: #2a2a2a;
        color: #fff;
    }
    
    .form-control {
        background-color: #333;
        color: #fff;
        border-color: #444;
    }
    
    .form-control:focus {
        background-color: #444;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.read-more:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
