/* --- CityCare Hospital Design System --- */
:root {
    --primary: #1e3a8a;
    --accent: #2563eb;
    --secondary: #0d9488;
    --text-main: #111827;
    --text-muted: #4b5563;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --font-family: 'Inter', sans-serif;
    --header-height: 80px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-white);
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.emergency-text {
    color: #dc2626;
    font-weight: 700;
}

.emergency-text i {
    margin-right: 5px;
}

/* --- Header --- */
#main-header {
    height: var(--header-height);
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary);
}

/* Make sure desktop nav wrapper doesn't break absolute positioning on mobile */
.desktop-nav {
    position: static;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
}

/* --- Buttons --- */
.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-outline {
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Hero Section --- */
.hero {
    padding: 100px 0;
    background: radial-gradient(circle at 80% 20%, #eff6ff 0%, #ffffff 80%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-visual {
    width: 100%;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* --- Quick Actions --- */
.quick-actions {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.minimal-card {
    background: white;
    padding: 40px 30px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.minimal-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.minimal-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 25px;
}

.minimal-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.minimal-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* --- About Section --- */
.about-section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 30px;
}

.about-tabs {
    display: flex;
    flex-wrap: wrap; /* Allows tabs to drop to the next line if needed */
    gap: 15px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    width: 100%;
}

.tab-btn {
    padding: 10px 15px;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

.features-list {
    margin-top: 20px;
}

.features-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.features-list li i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* --- Facilities --- */
.facilities-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.facility-card {
    background: white;
    padding: 35px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.facility-card:hover {
    border-color: var(--secondary);
    transform: scale(1.02);
}

.facility-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* --- Departments --- */
.departments {
    padding: 120px 0;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.dept-card {
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 30px;
    transition: all 0.3s ease;
}

.dept-card:hover {
    border-color: var(--accent);
}

.dept-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 25px;
}

.dept-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.dept-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* --- Appointment Banner --- */
.appointment-banner {
    background-color: var(--primary);
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 40px;
    margin: 40px 0;
}

.appointment-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.phone-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin: 25px 0;
    color: #93c5fd;
}

/* --- Contact --- */
.contact-section {
    padding: 120px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-card {
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: white;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

.hours-box {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.hours-box h4 {
    margin-bottom: 15px;
}

.map-container {
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 100%;
    min-height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Footer --- */
.main-footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: var(--primary);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 700px;
    border-radius: 30px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* --- Tablet Queries --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
    .actions-grid { grid-template-columns: repeat(2, 1fr); }
    .facilities-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Mobile Queries --- */
@media (max-width: 768px) {
    .top-bar-right { display: none; }
    .mobile-menu-btn { display: block; }
    
    /* Rebuilt Navigation Dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 15px 30px rgba(0,0,0,0.05);
        gap: 20px;
        text-align: center;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .header-actions .btn-primary { 
        display: none !important; 
    } 
    
    .logo {
        max-width: 200px;
        font-size: 1.3rem;
    }
    
    /* Reduced padding for standard sections */
    .hero { padding: 60px 0; }
    .about-section, 
    .facilities-section, 
    .departments, 
    .contact-section {
        padding: 60px 0;
    }

    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: 2rem; }
    
    /* Hero Section Tweaks */
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero h1 { font-size: 2.3rem; }
    .hero p { margin: 0 auto 30px; font-size: 1rem;}
    .hero-buttons { 
        flex-direction: column; 
        justify-content: center; 
        gap: 15px; 
    }
    .hero-buttons .btn { width: 100%; }
    
    /* Grids to single column */
    .quick-actions { margin-top: 20px; }
    .actions-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .facilities-grid { grid-template-columns: 1fr; }
    .departments-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    
    /* Banner & Footer */
    .appointment-banner {
        padding: 50px 20px;
        margin: 20px 0;
        border-radius: 20px;
    }
    .appointment-banner h2 { font-size: 1.8rem; }
    .phone-number { font-size: 2.2rem; }
    
    .footer-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 30px; 
    }
    
    /* Modal Tweaks */
    .modal-content { padding: 25px; }
    .close-modal { top: 10px; right: 20px; }
}

@media (max-width: 768px) {
    /* ... your existing mobile rules ... */

    /* Fix the About section spacing and layout */
    .about-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; /* Reduced from 60px for a tighter mobile layout */
    }
    
    /* Transform tabs into a clean grid for mobile tapping */
    .about-tabs {
        border-bottom: none; 
        justify-content: space-between;
        gap: 10px;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 10px); /* Creates a 2-column grid for the 4 tabs */
        background-color: var(--bg-light);
        border-radius: 8px;
        text-align: center;
        padding: 12px 10px;
        font-size: 0.9rem;
        border-bottom: none;
    }
    
    /* Update active state for the new mobile button style */
    .tab-btn.active {
        background-color: var(--primary);
        color: white;
        border-bottom: none;
    }
}