@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #9a6daf;
    /* Soft Lila */
    --secondary: #1a1a45;
    /* Navy */
    --accent: #E6E6FA;
    /* Lavender */
    --cream: #FDF9F7;
    --white: #ffffff;
    --text: #1a1a45;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Manrope', sans-serif;
    --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.page-heading {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 35px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.serif,
.section-title h2,
.about-heading,
.hero-bg-text {
    font-family: var(--font-heading);
    font-weight: 300;
    color: var(--primary) !important;
}

section {
    padding: 90px 0 !important;
}

.btn-primary,
.cta-btn,
.cta-btn-slider,
.scroll-down {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    display: inline-block;
}

.btn-outline {
    display: inline-block;
    padding: 18px 45px;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    background-color: transparent !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo img {
    height: 80px;
    /* Slightly larger for the 'D' signature */
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    gap: 45px;
}

nav a {
    font-size: 19px;
    color: var(--secondary);
    font-family: var(--font-heading);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-socials {
    display: flex;
    gap: 20px;
}

.header-socials a {
    font-size: 20px;
    color: var(--secondary);
    transition: var(--transition);
}

.header-socials a:hover {
    color: var(--primary);
}

/* Hide header actions on mobile to keep it clean, they are usually in the drawer */
@media (max-width: 768px) {
    .header-right {
        display: none;
    }
}

.cta-btn {
    background: var(--primary) !important;
    color: white !important;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Section - v2 100% Fidelity */
.hero-v2 {
    height: 100vh;
    background: var(--cream);
    padding-top: 90px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 190px;
    line-height: 1;
    color: var(--primary) !important;
    letter-spacing: -2px;
    white-space: nowrap;
    z-index: 3;
    opacity: 0;
    /* Animated */
}

.hero-doctor {
    position: relative;
    z-index: 1;
    height: 90%;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    /* Animated */
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(300deg);
    /* Optional: make it gold/lila if needed, or white */
}

.hero-doctor img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.hero-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    z-index: 5;
    opacity: 0;
    /* Animated */
}

.hero-circle img {
    width: 100%;
    animation: rotateForever 30s linear infinite;
}

.hero-intro {
    position: absolute;
    bottom: 80px;
    left: 60px;
    max-width: 400px;
    z-index: 5;
    opacity: 0;
    /* Animated */
}

.intro-line {
    width: 80px;
    height: 1px;
    background: var(--primary);
    margin-bottom: 25px;
}

.hero-intro p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary);
    font-weight: 500;
}

/* Menu Toggle Button (Desktop Hidden) */
.menu-toggle {
    display: none;
}

.rotating-badge {
    position: absolute;
    top: 150px;
    right: 80px;
    width: 160px;
    height: 160px;
    animation: rotateForever 20s linear infinite;
    z-index: 10;
}

@keyframes rotateForever {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    font-size: 24px;
    color: var(--secondary);
    animation: bounce 2s infinite;
    opacity: 0;
    /* Animated */
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Sections Base */
section {
    padding: 140px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 90px;
}

.section-title h2 {
    font-size: 4.5rem;
    color: var(--primary) !important;
}

.section-title .pre {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

/* About Section - New Design Fidelity */
.about-flex {
    display: flex;
    gap: 80px;
    align-items: center;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 450px;
}

.about-text {
    flex: 1.2;
    min-width: 450px;
}

.about-pre {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    margin-bottom: 25px;
    font-family: var(--font-body);
}

.about-heading {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 35px;
    font-weight: 400;
}

.about-subtext {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
    font-weight: 500;
}


/* Services */
#servicios {
    background-color: #f7f4f9;
}

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

.service-card {
    background: var(--cream);
    padding: 70px 45px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    background: var(--accent);
    transform: translateY(-10px);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 35px;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Instagram Feed Grid */
.instagram-section {
    background-color: #f7f4f9;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

@media (max-width: 991px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


.instagram-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.inst-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(223, 140, 234, 0.6);
    /* Translucent Lila */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.inst-overlay i {
    color: white;
    font-size: 2.5rem;
}

.instagram-item:hover img {
    transform: scale(1.1);
}

.instagram-item:hover .inst-overlay {
    opacity: 1;
}

/* Footer */
footer {
    background: #3d3a3a;
    color: white;
    padding: 100px 0 40px;
}

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

.footer-col h4 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: white;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.5;
}

/* Contact Page Specifics */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    margin-top: 60px;
}

.contact-info h3 {
    font-size: 3rem;
    margin-bottom: 30px;
    line-height: 1.1;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 5px;
}

.contact-item h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.contact-item p {
    opacity: 0.7;
}

/* Minimalist Form */
.contact-form .form-group {
    position: relative;
    margin-bottom: 40px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 0 15px 40px;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.contact-form i {
    position: absolute;
    left: 0;
    top: 18px;
    color: #999;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: var(--primary);
}

.contact-form textarea {
    height: 120px;
    resize: none;
}

.btn-red {
    background: var(--primary);
    color: white;
    padding: 20px 45px;
    border: none;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-red:hover {
    background: #111;
    transform: translateY(-5px);
}

.map-container {
    height: 500px;
    width: 100%;
    margin-bottom: 80px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(100%) invert(90%) contrast(90%);
}

/* Responsive Design - Boutique Mobile Mode */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-bg-text {
        font-size: 140px;
    }

    .hero-circle {
        width: 500px;
    }

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

@media (max-width: 768px) {
    header {
        height: 80px;
    }

    .logo img {
        height: 50px;
    }

    /* Menu Toggle Button */
    .menu-toggle {
        display: block !important;
        cursor: pointer;
        z-index: 2001;
        /* Higher than drawer */
    }

    .menu-toggle span {
        display: block;
        width: 30px;
        height: 2px;
        background: var(--primary);
        margin: 6px 0;
        transition: var(--transition);
    }

    /* Mobile Navigation Drawer */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        /* Full width for better mobile experience */
        height: 100vh;
        background: var(--white);
        padding: 120px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0), right 0.4s;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav.active {
        right: 0 !important;
        z-index: 2000 !important;
        transform: none;
    }

    nav ul {
        flex-direction: column;
        gap: 30px;
    }

    nav a {
        font-size: 24px;
    }

    .cta-btn {
        display: none;
    }

    /* Reduced Headline Sizes */
    .section-title h2 {
        font-size: 2.5rem;
    }

    .about-heading,
    .page-heading {
        font-size: 2.2rem;
    }

    .contact-info h3 {
        font-size: 2rem;
    }

    section {
        padding: 80px 0 !important;
    }

    /* Hide in header for mobile */
    .hero-v2 .cta-btn-mobile {
        display: block;
        margin-top: 20px;
    }

    /* Hero Scaling */
    .hero-bg-text {
        font-size: 50px;
        white-space: normal;
        text-align: center;
        width: 90%;
    }

    .hero-circle {
        width: 320px;
    }

    .hero-doctor {
        height: 70%;
    }

    .hero-intro {
        bottom: 40px;
        left: 20px;
        right: 20px;
        max-width: none;
        text-align: center;
    }

    .intro-line {
        margin: 0 auto 15px;
    }

    /* Grid Stacking */
    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

@media (max-width: 480px) {
    .section-title h2 {
        font-size: 2.1rem;
    }

    .about-heading,
    .page-heading {
        font-size: 1.8rem;
    }

    .hero-bg-text {
        font-size: 42px;
    }

    .hero-circle {
        width: 280px;
    }

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

    .footer-col {
        padding-left: 0 !important;
    }

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

/* Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Utility Classes */
.text-center {
    text-align: center !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.w-100 {
    width: 100% !important;
}