/* CSS Variables */
:root {
    --primary-blue: #0a4275;
    --primary-blue-light: #125ea3;
    --trust-blue: #1d4ed8;
    --emergency-red: #dc2626;
    --emergency-red-hover: #b91c1c;
    --indigo-text: #4f46e5;
    --violet-text: #7c3aed;
    --indigo-light: #818cf8;
    --violet-light: #a78bfa;
    --crisp-white: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-md: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

section {
    padding: 4rem 5%;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: clamp(1rem, 3.5vw, 1.125rem);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* Reusable Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background-color: var(--trust-blue);
    color: var(--crisp-white);
    box-shadow: 0 4px 14px 0 rgba(29, 78, 216, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(10, 66, 117, 0.39);
}

.btn-emergency {
    background-color: var(--emergency-red);
    color: var(--crisp-white);
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-emergency:hover {
    background-color: var(--emergency-red-hover);
}

.pulse-animation {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.image-placeholder {
    background-color: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* --- Header / Navbar --- */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0; /* Removed ALL left/right padding on mobile to utilize empty space */
    max-width: 1440px;
    margin: 0 auto;
}

/* ======================================================= */
/* 🏥 LOGO & HOSPITAL NAME SETTINGS - EDIT HERE 🏥 */
/* ======================================================= */
.logo {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* Equivalent to Tailwind gap-1 */
    flex: 0 1 auto; 
    min-width: 0;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    /* Changed to left for mobile so it hugs the image tightly */
    text-align: left; 
    min-width: 0;
}

.logo-img {
    height: 40px; /* Shrunk for mobile to prevent overlap with Emergency Button */
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-main {
    font-size: clamp(0.65rem, 2.5vw, 1.25rem); /* text-xs for mobile, md:text-xl equivalent */
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
    line-height: 1; /* Equivalent to leading-none */
    white-space: normal; 
}

.logo-sub {
    display: none;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--crisp-white);
    flex-direction: column;
    padding: 1.5rem 5%;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border-light);
    gap: 1.5rem;
    align-items: stretch;
}
.nav-links.active {
    display: flex;
    animation: fadeInDown 0.3s ease forwards;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--trust-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0; /* Ensures the buttons never get squished or pushed out */
}

.emergency-wrapper {
    position: relative;
}

.emergency-number {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--crisp-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    z-index: 1001;
}

.emergency-number.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.emergency-number span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--emergency-red);
    text-align: center;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg .image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #cbd5e1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 66, 117, 0.95) 0%, rgba(10, 66, 117, 0.7) 50%, rgba(10, 66, 117, 0.2) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem 5%;
    color: var(--crisp-white);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-subtitle span:nth-child(2) {
    display: none;
}

.hero-highlight {
    color: #ffd700;
    font-weight: 700;
}

.hero-cta {
    font-size: 1.1rem;
    padding: 1.1rem;
    width: 100%;
}

/* --- Facilities Section --- */
.facilities {
    background-color: var(--crisp-white);
}

.grid-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.facility-card {
    background: var(--crisp-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.facility-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--trust-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 2;
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
    border-color: transparent;
}

.facility-card:hover::before {
    transform: scaleX(1);
}

.facility-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.facility-card:hover .facility-img {
    transform: scale(1.05);
}

.facility-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    background: var(--crisp-white);
    position: relative;
    z-index: 1;
}

.facility-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.3;
}

.facility-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* --- Doctors Section --- */
.doctors {
    background-color: var(--bg-light);
}

.tabs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.tab-btn {
    background: var(--crisp-white);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.tab-btn:hover {
    border-color: var(--trust-blue);
    color: var(--trust-blue);
}

.tab-btn.active {
    background: var(--trust-blue);
    color: var(--crisp-white);
    border-color: var(--trust-blue);
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Typography-focused beautiful doctor card without photo placeholder */
.doctor-card {
    background: var(--crisp-white);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.doctor-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--border-light);
    transition: var(--transition-smooth);
}

.doctor-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--trust-blue);
}

.doctor-card:hover::after {
    width: 80px;
    background: var(--trust-blue);
}

.dr-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--trust-blue);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.dr-icon svg {
    width: 28px;
    height: 28px;
}

.doctor-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.doctor-specialty {
    font-size: 0.95rem;
    color: var(--trust-blue);
    font-weight: 600;
}

.doctor-sub-specialty {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: inline-block;
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

/* --- Footer --- */
.footer {
    background-color: #0f172a;
    color: var(--crisp-white);
    padding: 4rem 5% 2rem;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--crisp-white);
}

.footer-col .logo {
    margin-bottom: 1.5rem;
    justify-content: center;
}

.footer-col .logo-main {
    color: var(--crisp-white);
}

.footer-col .logo-sub {
    color: #94a3b8;
}

.footer-desc {
    color: #94a3b8;
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    justify-content: center;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-icon {
    color: var(--trust-blue);
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 78, 216, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: #64748b;
    font-size: 0.875rem;
}

/* --- Desktop Scaling (Mobile-First) --- */

@media (min-width: 768px) {
    section {
        padding: 6rem 5%;
    }

    .nav-container {
        padding: 1rem 5%; /* Restore full padding for PC */
    }

    .logo {
        max-width: none; /* Restore full horizontal expansion capability on big screens */
    }

    .logo-sub {
        display: block;
    }
    .logo-img {
        height: 55px;
    }
    .logo-main {
        font-size: 1.25rem;
    }
    .logo-text-wrapper {
        text-align: center; /* Keep text centered perfectly on PC */
    }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        box-shadow: none;
        background: transparent;
        padding: 0;
        border-top: none;
        width: auto;
        gap: 2rem;
        align-items: center;
    }

    .mobile-menu-btn {
        display: none;
    }

    .header-actions {
        gap: 0;
    }

    .btn-emergency {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .hero {
        padding: 0;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    .hero-content {
        text-align: left;
        padding: 2rem 5%;
    }
    .hero-subtitle {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }
    .hero-subtitle span:nth-child(2) {
        display: inline;
    }
    .hero-cta {
        width: auto;
        font-size: 1.125rem;
        padding: 1rem 2.5rem;
    }

    .grid-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .footer {
        padding: 5rem 5% 2rem;
        text-align: left;
    }
    .footer-col .logo {
        justify-content: flex-start;
    }
    .social-links {
        justify-content: flex-start;
    }
    .contact-item {
        justify-content: flex-start;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    section {
        padding: 8rem 10%;
    }
    .hero-content {
        padding-left: 10%;
    }
}
