/**
 * Responsive Styles for Clinica Medical Theme
 * 
 * @package Clinica_Medical_Theme
 * @version 1.0.0
 */


/* ==========================================================================
   LARGE DESKTOP (1400px and up)
   ========================================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero h1 {
        font-size: 4em;
    }
    
    .section-title h2 {
        font-size: 3em;
    }
}

/* ==========================================================================
   DESKTOP (1200px to 1399px)
   ========================================================================== */

@media (max-width: 1399px) and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .service-card {
        flex: 0 0 calc(33.333% - 20px);
        min-width: 300px;
        max-width: 350px;
    }
    
    .doctor-card {
        flex: 0 0 calc(25% - 15px);
        min-width: 250px;
        max-width: 280px;
    }
}

/* ==========================================================================
   LAPTOP (1024px to 1199px)
   ========================================================================== */

@media (max-width: 1199px) and (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .hero h1 {
        font-size: 3.2em;
    }
    
    .section-title h2 {
        font-size: 2.3em;
    }
    
    .nav-menu {
        gap: 30px;
    }
    
    .header-info {
        gap: 20px;
    }
    
    .service-card {
        flex: 0 0 calc(50% - 15px);
        min-width: 280px;
    }
    
    .doctor-card {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }
    
    .staff-section:nth-child(2) .doctors-grid {
        flex-wrap: wrap;
    }
    
    .staff-section:nth-child(2) .doctor-card {
        flex: 0 0 calc(50% - 10px);
    }
}

/* ==========================================================================
   PC LAYOUT (1024px and above) - Keep menu centered
   ========================================================================== */

@media (min-width: 1024px) {
    .main-nav {
        position: absolute !important;
        top: 50% !important;
        left: 40% !important;
        transform: translate(-50%, -50%) !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        z-index: auto !important;
        transition: none !important;
        padding-top: 0 !important;
        box-shadow: none !important;
        overflow-y: visible !important;
        display: block !important;
    }
}

/* ==========================================================================
   TABLET LANDSCAPE (768px to 1023px)
   ========================================================================== */

@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero h1 {
        font-size: 2.8em;
    }
    
    .hero p {
        font-size: 1.2em;
    }
    
    .section-title h2 {
        font-size: 2.1em;
    }
    
    .section-title p {
        font-size: 1.1em;
    }
    
    
    
    .header-actions {
        display: none !important;
    }
    
    .btn-appointment,
    .btn-logout {
        width: 120px;
        height: 35px;
        font-size: 0.8em;
        padding: 0;
    }
    
    .service-card {
        flex: 0 0 calc(50% - 15px);
        min-width: 280px;
    }
    
    .doctor-card {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }
    
    .staff-section:nth-child(2) .doctor-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ==========================================================================
   TABLET PORTRAIT (576px to 767px)
   ========================================================================== */

@media (max-width: 767px) and (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .section-title h2 {
        font-size: 2em;
    }
    
    .header-top .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 10px;
    }
    
    
    
    .header-actions {
        display: none !important;
    }
    
    .btn-appointment,
    .btn-logout {
        width: 120px;
        height: 35px;
        font-size: 0.8em;
        padding: 0;
    }
    
    .service-card {
        flex: 0 0 100%;
        min-width: 250px;
        max-width: 100%;
    }
    
    .doctor-card {
        flex: 0 0 100%;
        min-width: 250px;
        max-width: 100%;
    }
    
    .staff-section:nth-child(2) .doctor-card {
        flex: 0 0 100%;
        min-width: 250px;
        max-width: 100%;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .logo-image {
        width: 70px;
        height: 70px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   MOBILE LARGE (480px to 575px)
   ========================================================================== */

@media (max-width: 575px) and (min-width: 480px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero {
        padding: 90px 0;
    }
    
    .hero h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .section-title h2 {
        font-size: 1.8em;
    }
    
    .section-title p {
        font-size: 1em;
    }
    
    
    .hamburger-line {
        width: 20px !important;
        height: 2px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #2c3e50 !important;
        margin: 3px 0 !important;
        transition: all 0.3s ease !important;
        border-radius: 2px !important;
    }
    
    
    
    .header-actions {
        display: none !important;
    }
    
    .btn-appointment,
    .btn-logout {
        width: 100px;
        height: 32px;
        font-size: 0.75em;
        padding: 0;
    }
    
    .service-card {
        padding: 0;
    }
    
    .service-icon-section {
        padding: 20px;
    }
    
    .service-title-section {
        padding: 15px 20px 10px 20px;
    }
    
    .service-description-section {
        padding: 0 20px 15px 20px;
    }
    
    .service-button-section {
        padding: 0 20px 20px 20px;
    }
    
    .doctor-card {
        margin-bottom: 20px;
    }
    
    .doctor-image {
        height: 140px;
        font-size: 2.8em;
    }
    
    .doctor-info {
        padding: 20px 15px 25px 15px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .benefit-card {
        padding: 30px 20px;
    }
    
    .cta h2 {
        font-size: 2em;
    }
    
    .cta p {
        font-size: 1.1em;
    }
    
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo-image {
        width: 65px;
        height: 65px;
    }
}

/* ==========================================================================
   MOBILE SMALL (320px to 479px)
   ========================================================================== */

@media (max-width: 479px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 1.8em;
        line-height: 1.1;
    }
    
    .hero p {
        font-size: 0.95em;
    }
    
    .hero-buttons {
        gap: 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .section-title h2 {
        font-size: 1.6em;
    }
    
    .section-title p {
        font-size: 0.95em;
    }
    
    .header-top {
        padding: 5px 0;
    }
    
    .header-info {
        font-size: 0.8em;
    }
    
    
    .hamburger-line {
        width: 18px !important;
        height: 2px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #2c3e50 !important;
        margin: 3px 0 !important;
        transition: all 0.3s ease !important;
        border-radius: 2px !important;
    }
    
    
    
    .header-actions {
        display: none !important;
    }
    
    .btn-appointment,
    .btn-logout {
        width: 80px;
        height: 28px;
        font-size: 0.65em;
        padding: 0;
    }
    
    .header-main .container {
        padding: 15px 10px;
        height: 60px;
    }
    
    .logo-image {
        width: 55px;
        height: 55px;
    }
    
    .service-card {
        min-width: 200px;
    }
    
    .service-icon {
        font-size: 2.5em;
    }
    
    .service-card h3 {
        font-size: 1.2em;
    }
    
    .service-card p {
        font-size: 0.9em;
    }
    
    .btn-service {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .staff-category-title {
        font-size: 1.5em;
    }
    
    .doctor-card {
        min-width: 200px;
    }
    
    .doctor-image {
        height: 120px;
        font-size: 2.5em;
    }
    
    .doctor-name {
        font-size: 1.1em;
    }
    
    .doctor-specialty {
        font-size: 0.9em;
    }
    
    .btn-doctor {
        padding: 10px 15px;
        font-size: 0.8em;
    }
    
    .benefit-card {
        padding: 25px 15px;
    }
    
    .benefit-icon {
        font-size: 2.5em;
    }
    
    .benefit-card h3 {
        font-size: 1.2em;
    }
    
    .benefit-card p {
        font-size: 0.9em;
    }
    
    .cta {
        padding: 60px 0;
    }
    
    .cta h2 {
        font-size: 1.8em;
    }
    
    .cta p {
        font-size: 1em;
    }
    
    .footer {
        padding: 30px 0 10px;
    }
    
    .footer-section h3 {
        font-size: 1.1em;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 0.9em;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1em;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .header-top,
    .header-main,
    .back-to-top,
    .btn-appointment,
    .btn-service,
    .btn-doctor,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
        padding: 30px 0 !important;
    }
    
    .service-card,
    .doctor-card,
    .benefit-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    
    .footer {
        background: none !important;
        color: #000 !important;
    }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
    .service-card,
    .doctor-card,
    .benefit-card {
        border: 2px solid #000;
    }
    
    .btn-service,
    .btn-doctor,
    .btn-primary {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #000 !important;
    }
    
    .btn-secondary {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero::before {
        animation: none !important;
    }
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    body {
        background: var(--bg-color);
        color: var(--text-color);
    }
    
    .service-card,
    .doctor-card,
    .benefit-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }
    
    .header-main {
        background: var(--card-bg);
    }
    
    .footer {
        background: #0d0d0d;
    }
}
