/* ===== VARIABLES ===== */
:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-section-alt: #f7ede6;
    --color-soft: #f3e0d2;
    --color-rose: #eab29e;
    --color-accent: #d4a57f;
    --color-primary: #3c3744;
    
    --color-text: #3c3744;
    --color-text-light: rgba(60, 55, 68, 0.75);
    --color-border: rgba(60, 55, 68, 0.12);
    --color-border-strong: rgba(60, 55, 68, 0.22);
    --color-success: #d4a57f;

    --font-title: "Cormorant", serif;
    --font-body: "Lato", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-subtle: 0 8px 30px rgba(44, 39, 36, 0.06);
    --shadow-hover: 0 12px 40px rgba(44, 39, 36, 0.12);
    --shadow-card: 0 4px 20px rgba(60, 55, 68, 0.08);
    --max-width: 1100px;
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Regla general para links (ojo: esto causaba el error en los botones, ya corregido abajo) */
a:hover {
    color: var(--color-primary);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
}

section + section {
    border-top: 1px solid var(--color-border);
}

/* ===== TIPOGRAFÍA ===== */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(36px, 4.5vw, 48px);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 500;
    color: var(--color-text);
}

.section-intro {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 700px;
    margin-bottom: 48px;
    line-height: 1.8;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 500;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-top: 2px;
}

.nav-primary {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-light);
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.header-cta {
    margin-left: 24px;
}

.btn-small {
    padding: 10px 22px;
    font-size: 14px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: var(--color-primary);
    transform: translateY(-1px);
    color: white; /* CORRECCIÓN: Fuerza texto blanco */
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(60, 55, 68, 0.25);
}

.btn-primary:hover {
    background: #25212c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(60, 55, 68, 0.32);
    color: white; /* CORRECCIÓN: Fuerza texto blanco */
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
    background: rgba(60, 55, 68, 0.04);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--color-accent);
    color: white;
}

.btn-accent:hover {
    background: var(--color-primary);
    color: white; /* CORRECCIÓN: Fuerza texto blanco */
}

/* ===== HERO CENTRADO ===== */
#inicio {
    padding: 180px 0 140px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(247, 237, 230, 0.9), transparent 60%),
        radial-gradient(circle at bottom right, rgba(243, 224, 210, 0.7), transparent 55%),
        #ffffff;
}

.hero-centered {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(48px, 6vw, 64px);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 500;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--color-text-light);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 8px;
}

.hero-subtitle-secondary {
    font-size: 18px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    justify-content: center;
}

.hero-note {
    display: inline-block;
    font-size: 13px;
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(4px);
}

/* ===== SOBRE MÍ ===== */
#sobre-mi {
    background: var(--color-section-alt);
}

.section-header {
    margin-bottom: 48px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--color-border);
}

.about-card h3 {
    font-family: var(--font-title);
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--color-text);
    font-weight: 500;
}

.about-card p {
    color: var(--color-text-light);
    margin-bottom: 24px;
    line-height: 1.8;
}

.about-image {
    position: relative;
}

.image-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-soft);
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-subtle);
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-light);
    font-family: var(--font-title);
    font-size: 18px;
}

/* ===== ESPECIALIDADES ===== */
#especialidades {
    background: var(--color-bg);
}

.specialties-grid {
    display: grid;
    /* Auto-fit: Acomoda las tarjetas automáticamente */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
    justify-content: center;
}

.specialty-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.specialty-card:hover::before {
    transform: scaleX(1);
}

.specialty-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-border-strong);
}

.card-pill {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(212, 165, 127, 0.18);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 999px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.specialty-card:hover .card-pill {
    background: rgba(212, 165, 127, 0.3);
}

.card-title {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.card-text {
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 15px;
}

/* ===== ENFOQUE ===== */
#enfoque {
    background: var(--color-primary);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

#enfoque::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 165, 127, 0.15), transparent 70%);
    border-radius: 50%;
}

.approach-card {
    background: transparent;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.approach-title {
    font-family: var(--font-title);
    font-size: 42px;
    margin-bottom: 32px;
    color: #fdfaf6;
    font-weight: 500;
}

.approach-text {
    margin-bottom: 32px;
}

.approach-text p {
    color: rgba(253, 250, 246, 0.9);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 17px;
}

/* ===== CONTACTO ===== */
#contacto {
    background: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 48px;
}

.contact-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--color-border);
}

.contact-group {
    margin-bottom: 32px;
}

.contact-group:last-child {
    margin-bottom: 0;
}

.contact-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-main {
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: 4px;
    font-weight: 500;
}

.contact-main a:hover {
    color: var(--color-accent);
}

.contact-extra {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.contact-map iframe {
    width: 100%;
    min-height: 500px;
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-section-alt);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 40px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 60px;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-logo-name {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--color-text);
    font-weight: 500;
}

.footer-logo-sub {
    font-family: var(--font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-top: 2px;
}

.footer-info p {
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 15px;
}

.footer-legal {
    font-size: 13px;
    color: var(--color-text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    /* Mantenemos el menú visible, apilado verticalmente */
    .nav-primary {
        display: flex; 
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-centered {
        max-width: 640px;
    }

    #inicio {
        padding: 140px 0 100px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-card {
        padding: 32px 24px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    #enfoque {
        padding: 80px 0;
    }

    .approach-title {
        font-size: 32px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-map iframe {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .logo-mark {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .logo-name {
        font-size: 18px;
    }
    
    .header-cta {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .specialty-card,
    .about-card,
    .contact-card {
        padding: 24px 20px;
    }
}

/* ===== HEADER AL HACER SCROLL ===== */
.site-header.is-scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-subtle);
    background: rgba(255, 255, 255, 0.98);
}

/* ===== ANIMACIÓN DE SECCIONES ===== */
.reveal-section {
    opacity: 1; /* Visible por defecto para mayor seguridad */
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}