/* ===== CSS Variables ===== */
:root {
    --primary: #A0522D;
    --primary-dark: #8B4513;
    --primary-light: #CD853F;
    --accent: #DAA520;
    --accent-light: #FFD700;
    --bg-light: #FFF9F5;
    --bg-cream: #FDF5E6;
    --text-dark: #3D2914;
    --text-medium: #5C4033;
    --text-light: #8B7355;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(160, 82, 45, 0.15);
    --shadow-lg: 0 10px 40px rgba(160, 82, 45, 0.2);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

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

.highlight {
    color: var(--primary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(160, 82, 45, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(160, 82, 45, 0.5);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background: var(--white);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo img {
    height: 120px;
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 90px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 35px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.btn-appointment {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
}

.btn-appointment:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.btn-appointment::after {
    display: none;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 140px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-cream) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(218, 165, 32, 0.1) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-medium);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--primary);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== Section Styles ===== */
section {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(160, 82, 45, 0.1), rgba(218, 165, 32, 0.1));
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--text-dark);
}

.section-desc {
    color: var(--text-medium);
    max-width: 600px;
    margin: 15px auto 0;
}

/* ===== About Section ===== */
.about {
    background: var(--white);
}

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

.about-image {
    position: relative;
}

.image-frame {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light));
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.doctor-photo {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
    display: block;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--text-dark);
    padding: 20px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.experience-badge .years {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.experience-badge .text {
    font-size: 0.85rem;
    font-weight: 500;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-medium);
    margin-bottom: 15px;
}

.about-features {
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

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

/* ===== Services Section ===== */
.services {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-cream) 100%);
}

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

.service-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(160, 82, 45, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(160, 82, 45, 0.1), rgba(218, 165, 32, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

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

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

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

/* ===== Why Choose Us Section ===== */
.why-choose {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

.why-choose .section-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.why-choose .section-header h2 {
    color: var(--white);
}

.why-choose .highlight {
    color: var(--accent);
}

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

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--white);
}

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

.info-card {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.info-card.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.info-card.clickable:hover {
    background: var(--bg-cream);
    border-left: 3px solid var(--primary);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    color: var(--white);
    font-size: 1.2rem;
}

.info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.info-text p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.info-text a {
    color: var(--primary);
}

.info-text a:hover {
    color: var(--primary-dark);
}

.contact-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-map {
    display: block;
    position: relative;
    height: 100%;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(160, 82, 45, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
    border-radius: var(--radius-lg);
}

.map-overlay i {
    font-size: 2.5rem;
    color: var(--white);
}

.map-overlay span {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-map:hover .map-overlay {
    opacity: 1;
}

.contact-map:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

/* ===== Footer ===== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 130px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

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

.social-links a:hover {
    background: var(--accent);
    color: var(--text-dark);
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--white);
}

.footer-links ul,
.footer-services ul {
    list-style: none;
}

.footer-links li,
.footer-services li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-services li {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

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

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom i {
    color: #e74c3c;
}

.developer-credit {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.developer-credit i {
    color: var(--accent);
    margin-right: 8px;
}

.developer-credit a {
    color: var(--accent);
    font-weight: 600;
}

.developer-credit a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.developer-credit .dev-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #25D366;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: text-bottom;
    text-decoration: none;
    position: relative;
    top: -1px;
}

.developer-credit .dev-whatsapp i {
    color: var(--white);
    font-size: 0.9rem;
    margin: 0;
}

.developer-credit .dev-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.1);
    text-decoration: none;
}

@media (max-width: 768px) {
    .developer-credit {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .developer-credit .dev-whatsapp {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* ===== Floating Elements ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 999;
    animation: pulse 2s infinite;
}

.whatsapp-float i {
    color: var(--white);
    font-size: 2rem;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
}

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

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 160px; /* Will be overridden by JS */
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px 30px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        max-height: 400px;
        padding: 20px 30px;
        opacity: 1;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        margin-top: 40px;
    }

    .hero-image img {
        max-width: 300px;
    }

    .hero-image .floating {
        animation: float-mobile 3s ease-in-out infinite;
    }

    @keyframes float-mobile {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }

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

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

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }

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

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

    .contact-map {
        height: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .footer-contact p {
        justify-content: center;
    }

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

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        right: 85px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

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

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

    .experience-badge {
        right: 0;
        bottom: -10px;
    }
}
