/* ================= VARIABLES ================= */
:root {
    --bg-color: #FAF9F6; /* Blanco cálido */
    --text-main: #333333; /* Gris elegante */
    --text-light: #666666;
    --accent-nude: #F2E3DB; /* Rosa nude suave */
    --accent-rose: #D4A396; /* Dorado rosé apagado */
    --accent-gold: #C5A880; /* Beige dorado claro */
    --white: #FFFFFF;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ================= RESET & BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ================= ANIMATIONS (OBSERVER) ================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: var(--accent-rose);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 163, 150, 0.3);
}

/* ================= HEADER ================= */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--text-main);
}

.header-btn {
    padding: 10px 20px;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.header.scrolled .header-btn {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

.header-btn:hover {
    background: var(--accent-rose);
    color: var(--white);
    border-color: var(--accent-rose);
}

/* ================= HERO SECTION PREMIUM (Full Background) ================= */
.hero {
    position: relative;
    /* Usamos la imagen de Unsplash en el background, centrada y abarcando todo */
    background: url('https://images.unsplash.com/photo-1570172619644-dfd03ed5d881?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center / cover no-repeat;
    padding: 160px 5% 120px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Evita desbordes del difuminado inferior */
}

/* Overlay oscuro con degradado y blur premium */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado de más oscuro arriba (para el navbar) a ligeramente menos oscuro */
    background: linear-gradient(to bottom, rgba(26, 24, 22, 0.6) 0%, rgba(26, 24, 22, 0.3) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
    pointer-events: none; /* Evita que el overlay bloquee clics */
}

/* Fade difuminado inferior que conecta con la sección siguiente */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px; /* Altura del difuminado */
    /* Funde hacia el color blanco que usa la siguiente sección (.authority) */
    background: linear-gradient(to top, var(--white) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 3; /* Por encima del overlay y el fade inferior */
    width: 100%;
    max-width: 900px; /* Ancho máximo para mantener lectura óptima */
    display: flex;
    justify-content: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Tipografía escalable (Responsive) con blancos y grises claros para contraste */
.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 0;
    color: var(--white);
    animation: revealText 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-divider {
    width: 70px;
    height: 2px;
    background-color: var(--accent-gold);
    margin: 35px auto; /* Margin auto para que quede centrado */
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 45px;
    font-weight: 300;
    line-height: 1.8;
    max-width: 680px;
}

/* Ajustes dinámicos del Header: inicia claro sobre el hero oscuro, y se vuelve oscuro al hacer scroll */
.logo { color: var(--white); }
.header-btn { color: var(--white); border-color: rgba(255,255,255,0.6); }
.header-btn:hover { background: var(--white); color: var(--text-main); border-color: var(--white); }

.header.scrolled .logo { color: var(--text-main); }
.header.scrolled .header-btn { color: var(--accent-rose); border-color: var(--accent-rose); }
.header.scrolled .header-btn:hover { background: var(--accent-rose); color: var(--white); }

/* ================= MEDIA QUERIES EXCLUSIVOS DEL HERO ================= */
@media (max-width: 768px) {
    .hero {
        padding: 130px 5% 80px;
        min-height: 90vh; /* Se adapta un poco mejor en móviles */
    }
    
    .hero-divider {
        margin: 25px auto;
    }
}
/* ================= AUTHORITY SECTION (NUEVA) ================= */
.authority {
    padding: 100px 5%;
    background-color: var(--white);
}

.authority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.authority-item {
    position: relative;
    padding-top: 25px;
    border-top: 1px solid var(--accent-gold);
}

.authority-number {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--accent-gold);
    position: absolute;
    top: -14px;
    background: var(--white);
    padding-right: 15px;
    font-style: italic;
}

.authority-item h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.authority-item p {
    font-size: 0.95rem;
    color: var(--text-light);
}
/* ================= ANIMACIONES ================= */

@keyframes scaleImageIn {
    0% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes revealText {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }

    .hero-image-wrapper {
        height: 520px;
    }
}

@media (max-width: 768px) {

    .hero {
        padding: 130px 5% 70px;
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-image-wrapper {
        order: -1;
        height: 420px;
        width: 100%;
    }

    .hero-content {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-divider {
        margin: 25px auto;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

/* ================= SERVICES (INFINITE CAROUSEL) ================= */
.services {
    padding: 100px 0;
    background-color: var(--white);
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 5%;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.carousel-wrapper {
    position: relative;
    width: 100vw;
    overflow: hidden;
    display: flex;
}

.carousel-track {
    display: flex;
    gap: 30px;
    padding: 20px 30px;
    width: max-content;
    animation: scroll-left 40s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.service-card {
    background: var(--bg-color);
    width: 320px;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    background: var(--white);
    border-color: var(--accent-nude);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.service-price {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--accent-rose);
    font-style: italic;
}

/* ================= RESULTS GALLERY ================= */
.results {
    padding: 100px 0;
    background-color: var(--bg-color);
    overflow: hidden;
}

.gallery-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll-right 45s linear infinite;
}

.gallery-item {
    width: 300px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ================= CTA SECTION ================= */
.cta-section {
    padding: 120px 5%;
    text-align: center;
    background: var(--accent-nude);
    position: relative;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.cta-section p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.btn-large {
    font-size: 1.1rem;
    padding: 18px 40px;
    border-radius: 50px;
}

/* ================= FOOTER ================= */
.footer {
    background-color: var(--text-main);
    color: var(--white);
    padding: 80px 5% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
    font-style: italic;
}

.footer-col p, .footer-col li {
    font-size: 0.9rem;
    color: #CCCCCC;
    margin-bottom: 10px;
    list-style: none;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #CCCCCC;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--accent-rose);
    border-color: var(--accent-rose);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #999;
}

.vex-link {
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.vex-link:hover {
    color: var(--white);
}

/* ================= KEYFRAMES ================= */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .hero {
        background: linear-gradient(to bottom, rgba(250, 249, 246, 0.9) 30%, rgba(250, 249, 246, 0.7) 100%),
                    url('https://images.unsplash.com/photo-1616394584738-FC6E612E71B9?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover no-repeat;
        text-align: center;
        justify-content: center;
    }
    .hero-content { align-items: center; display: flex; flex-direction: column; }
    .service-card { width: 280px; }
    .gallery-item { width: 260px; height: 340px; }
    .cta-section h2 { font-size: 2rem; }
}