/* Responsive Design */

/* Tablet Styles (768px - 1199px) */
@media screen and (max-width: 1199px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .palliative-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile Styles (320px - 767px) */
@media screen and (max-width: 767px) {
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    /* Navigation responsive */
    .navbar {
        padding: 10px 0;
    }
    
    .nav-brand {
        gap: 10px;
    }
    
    .logo {
        height: 40px;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--background-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 20px 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 15px;
        display: block;
        width: 100%;
    }
    
    .nav-link:hover {
        background-color: var(--background-light);
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Hero section responsive */
    .hero {
        height: 80vh;
        background-attachment: scroll;
    }
    
    .hero-title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }
    
    /* Section padding adjustments */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Services grid responsive */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .service-card {
        padding: 25px;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Palliative care section */
    .palliative-intro {
        margin-bottom: 30px;
    }
    
    .palliative-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .palliative-services,
    .palliative-explanation,
    .care-team {
        padding: 20px;
    }
    
    /* CTA section */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .cta-extra {
        font-size: 0.9rem;
        margin-top: 15px;
    }
    
    /* Contact section */
    .contact-details {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .contact-item {
        padding: 20px;
    }
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .footer-section ul {
        text-align: center;
    }
    
    .footer-bottom {
        padding-top: 15px;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
    /* Footer logos responsive */
    .footer-logos { gap: 12px; margin: 16px 0; align-items: center; }
    .footer-logo { width: 100%; height: auto; }
    .footer-logo-top { max-width: min(88vw, 380px); }
    .footer-logo-bottom { max-width: min(82vw, 340px); }
}

/* Small Mobile Styles (320px - 479px) */
@media screen and (max-width: 479px) {
    /* Further typography adjustments */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .brand-text {
        font-size: 1rem;
    }
    
    /* Hero adjustments */
    .hero {
        height: 70vh;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    /* Button adjustments */
    .btn {
        max-width: 250px;
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    /* Service card adjustments */
    .service-card {
        padding: 20px 15px;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    /* Contact item adjustments */
    .contact-item {
        padding: 15px;
    }
    
    /* Footer adjustments */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        gap: 20px;
    }
}

/* Large Desktop Styles (1400px+) */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .palliative-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px;
    }
}

/* High DPI/Retina Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .hero-overlay {
        background-image: var(--gradient-hero), url('../Assets/images/doctor-holding-hands-with-senior-patient.jpg');
    }
}

/* Landscape orientation adjustments */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        height: 90vh;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn {
        width: auto;
        max-width: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .cta-buttons,
    .footer {
        display: none;
    }
    
    .hero {
        height: auto;
        background-image: none;
        background-color: white;
        color: black;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .hero-content {
        color: black;
        text-shadow: none;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .service-card,
    .contact-item {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.btn:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }
    
    .btn-primary {
        background-color: #000000;
        color: #FFFFFF;
    }
    
    .btn-secondary {
        background-color: #FFFFFF;
        color: #000000;
        border: 2px solid #000000;
    }
}
