/* ============================================
   HEALTHLINK SL - MAIN STYLESHEET
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --emergency: #D62828;
    --emergency-dark: #B71C1C;
    --text: #333333;
    --text-light: #666666;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary: #4CAF50;
    --primary-dark: #2E7D32;
    --text: #F5F5F5;
    --text-light: #CCCCCC;
    --bg-light: #1a1a2e;
    --bg-white: #16213e;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    color: var(--text);
    background-color: var(--bg-light);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-emergency {
    background: var(--emergency);
    color: white;
    animation: pulse 1.5s infinite;
}
.btn-emergency:hover {
    background: var(--emergency-dark);
    transform: scale(1.05);
}

.btn-outline {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

/* Hero */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1584515933487-779824d29309?w=1920&h=600&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 { font-size: 48px; margin-bottom: 20px; }
.hero p { font-size: 20px; margin-bottom: 30px; }

.search-box {
    display: flex;
    max-width: 600px;
    margin: 30px auto;
    gap: 10px;
}
.search-box input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 50px 0;
}

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}
.service-card i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.rating { color: #FFD700; margin: 10px 0; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-white);
    color: var(--text);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

/* Clinic Cards */
.clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}
.clinic-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.clinic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.clinic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.clinic-info { padding: 20px; }
.distance { font-size: 14px; color: var(--primary); font-weight: 500; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}
.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--primary);
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* Footer */
.footer {
    background: var(--bg-white);
    padding: 50px 0 20px;
    margin-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.social-links { display: flex; gap: 15px; }
.social-links a { font-size: 24px; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #ddd; }

/* Responsive */
@media (max-width: 1023px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 36px; }
}

@media (max-width: 767px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        padding: 30px 0;
        transition: 0.3s;
        box-shadow: var(--shadow);
    }
    .nav-menu.active { left: 0; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }
    .search-box { flex-direction: column; }
    .clinic-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .testimonials-grid { grid-template-columns: 1fr !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .clinic-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ========== MOBILE MENU STYLES - FIXED ========== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    transition: all 0.3s ease;
}

/* Mobile Layout (375px - 767px) */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        padding: 30px 0;
        transition: 0.3s ease-in-out;
        box-shadow: var(--shadow);
        z-index: 1000;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a, .nav-menu button {
        padding: 12px 0;
        width: 100%;
    }
}

/* Tablet Layout (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 80%;
        text-align: center;
        padding: 30px 0;
        transition: 0.3s ease-in-out;
        box-shadow: var(--shadow);
        z-index: 1000;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
}