/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #d4a373;
    --primary-dark: #c08a5a;
    --secondary: #2d2d2d;
    --accent: #e8c9a0;
    --bg-light: #faf6f1;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #666;
    --text-light: #888;
    --border: #e8e0d8;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    background: var(--accent);
    color: var(--secondary);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--secondary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary);
}

.logo img {
    height: 42px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 4px;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #faf6f1 0%, #f0e6d8 100%);
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.hero-slider .slide.active {
    opacity: 0.15;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 640px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--secondary);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    line-height: 1.8;
}

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

/* ===== ABOUT ===== */
.about {
    background: var(--bg-white);
}

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

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
}

.about-content h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--secondary);
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== DOCTORS ===== */
.doctors {
    background: var(--bg-light);
}

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

.doctor-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.doctor-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.doctor-card .card-body {
    padding: 24px;
}

.doctor-card h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.doctor-card .role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.doctor-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== SERVICES ===== */
.services {
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

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

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-card .icon {
    width: 64px;
    height: 64px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: var(--secondary);
    overflow: hidden;
}

.service-card .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card .icon i {
    color: var(--secondary);
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== ARTICLES ===== */
.articles {
    background: var(--bg-light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card .card-body {
    padding: 24px;
}

.article-card .date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.article-card .read-more:hover {
    text-decoration: underline;
}

.articles-more {
    text-align: center;
    margin-top: 48px;
}

/* ===== CONTACT ===== */
.contact {
    background: var(--bg-white);
}

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

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.contact-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-map {
    margin-top: 12px;
    border-radius: var(--radius);
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 140px;
    border: 0;
    display: block;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15);
}

.contact-form button {
    align-self: flex-start;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary);
    color: #ccc;
    padding: 70px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand img {
    height: 42px;
    width: auto;
    margin-bottom: 16px;
    filter: brightness(10);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #fff;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-links h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-newsletter p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-newsletter form {
    display: flex;
    gap: 8px;
}

.footer-newsletter input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 50px;
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
}

.footer-newsletter input:focus {
    outline: none;
}

.footer-newsletter button {
    padding: 12px 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.admin-link a {
    color: var(--primary);
    opacity: 0.6;
}

.admin-link a:hover {
    opacity: 1;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: var(--transition);
    animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
    background: #22c35e;
}

@keyframes pulse-wa {
    0% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.7); }
    100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 20px;
    max-height: 300px;
    object-fit: cover;
}

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.modal .date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.modal .content {
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 90px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #f44336;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .navbar .container {
        height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 24px;
        box-shadow: var(--shadow);
        transform: translateY(-120%);
        transition: var(--transition);
        opacity: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 16px;
    }

    .nav-menu a {
        display: block;
        padding: 8px 0;
        font-size: 1.05rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
