/* ========================================================
   LOLA TORRENTE SPA — ANIMATIONS PRO
   Only add this file. Do not modify anything existing.
   Link in the <head>: <link rel="stylesheet" href="../css/animations-pro.css">
   ======================================================== */

/* -------------------------------------------------------
   KEYFRAMES BASE
------------------------------------------------------- */

@keyframes spa-fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spa-fadeLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes spa-fadeRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes spa-scaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes spa-goldLine {
    from { width: 0; opacity: 0; }
    to   { width: 80px; opacity: 1; }
}

@keyframes spa-goldLineFull {
    from { transform: scaleX(0); transform-origin: left; }
    to   { transform: scaleX(1); transform-origin: left; }
}

@keyframes spa-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes spa-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

@keyframes spa-pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(216, 178, 106, 0); }
    50%       { box-shadow: 0 0 0 8px rgba(216, 178, 106, 0.18); }
}

@keyframes spa-reveal-clip {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
}

@keyframes spa-hero-drift {
    0%, 100% { background-position: center 50%; }
    50%       { background-position: center 55%; }
}

@keyframes spa-counter-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); color: #d8b26a; }
    100% { transform: scale(1); }
}

@keyframes spa-border-glow {
    0%, 100% { border-color: rgba(216,178,106,0.3); }
    50%       { border-color: rgba(216,178,106,0.9); }
}

@keyframes spa-logo-in {
    from { opacity: 0; letter-spacing: 6px; }
    to   { opacity: 1; letter-spacing: 2px; }
}

@keyframes spa-nav-drop {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spa-spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes spa-grain {
    0%, 100% { transform: translate(0, 0); }
    10%  { transform: translate(-2%, -3%); }
    20%  { transform: translate(3%, 2%); }
    30%  { transform: translate(-1%, 3%); }
    40%  { transform: translate(2%, -1%); }
    50%  { transform: translate(-3%, 1%); }
    60%  { transform: translate(1%, -2%); }
    70%  { transform: translate(-2%, 2%); }
    80%  { transform: translate(3%, -3%); }
    90%  { transform: translate(-1%, 1%); }
}

/* -------------------------------------------------------
   UTILITY: INPUT CLASSES (managed by JS)
------------------------------------------------------- */

.spa-hidden {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.spa-hidden.spa-visible {
    opacity: 1;
    transform: translateY(0);
}

.spa-hidden-left {
    opacity: 0;
    transform: translateX(-45px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.spa-hidden-left.spa-visible { opacity: 1; transform: translateX(0); }

.spa-hidden-right {
    opacity: 0;
    transform: translateX(45px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.spa-hidden-right.spa-visible { opacity: 1; transform: translateX(0); }

.spa-hidden-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.spa-hidden-scale.spa-visible { opacity: 1; transform: scale(1); }

/* Delays en cascada para grids */
.spa-delay-1 { transition-delay: 0.1s !important; }
.spa-delay-2 { transition-delay: 0.22s !important; }
.spa-delay-3 { transition-delay: 0.34s !important; }
.spa-delay-4 { transition-delay: 0.46s !important; }
.spa-delay-5 { transition-delay: 0.58s !important; }

/* -------------------------------------------------------
   HEADER & LOGO
------------------------------------------------------- */

header {
    animation: spa-nav-drop 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo-center {
    animation: spa-logo-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    transition: letter-spacing 0.4s ease, opacity 0.3s ease !important;
}

.logo-center:hover {
    letter-spacing: 4px !important;
}

/* Nav links — stagger */
.nav-left a:nth-child(1) { animation: spa-nav-drop 0.7s ease 0.15s both; }
.nav-left a:nth-child(2) { animation: spa-nav-drop 0.7s ease 0.28s both; }
.nav-left a:nth-child(3) { animation: spa-nav-drop 0.7s ease 0.41s both; }

/* Botón contacto superior */
.btn-contacto-top {
    animation: spa-nav-drop 0.7s ease 0.5s both;
    transition: background 0.35s ease, color 0.35s ease, transform 0.25s ease,
                box-shadow 0.35s ease !important;
}
.btn-contacto-top:hover {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 8px 24px rgba(216, 178, 106, 0.35) !important;
}

/* -------------------------------------------------------
   HERO
------------------------------------------------------- */

.hero {
    animation: spa-hero-drift 20s ease-in-out infinite;
}

/* Overlay sutil animado con textura grain */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.06;
    animation: spa-grain 8s steps(1) infinite;
    pointer-events: none;
    z-index: 1;
}

/* Línea decorativa dorada animada bajo el hero-content */
.hero-content::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, rgba(216,178,106,0.8), transparent);
    margin-top: 30px;
    animation: spa-goldLineFull 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
    transform-origin: left;
}

.hero-content .overline {
    display: block;
    animation: spa-fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-content .main-title {
    animation: spa-fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-content .subtitle {
    animation: spa-fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both;
}

/* -------------------------------------------------------
   SECCIÓN ABOUT
------------------------------------------------------- */

.about-section {
    position: relative;
    overflow: hidden;
}

/* Círculo decorativo dorado de fondo */
.about-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216,178,106,0.07) 0%, transparent 70%);
    pointer-events: none;
    animation: spa-float 10s ease-in-out infinite;
}

.about-text h2 {
    position: relative;
    padding-bottom: 20px;
}

/* Línea dorada bajo el h2 */
.about-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, #d8b26a, transparent);
    animation: spa-goldLine 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-play-state: paused;
}

.about-text h2.spa-visible::after {
    animation-play-state: running;
}

/* Números estadísticos */
.stat-number {
    transition: color 0.3s ease;
}

.stat-item:hover .stat-number {
    animation: spa-counter-pop 0.5s ease forwards;
}

/* Stack de imágenes — intensificamos el efecto */
.img-top {
    transition: transform 0.9s cubic-bezier(0.2, 1, 0.3, 1),
                box-shadow 0.9s ease !important;
}
.img-bottom {
    transition: transform 0.9s cubic-bezier(0.2, 1, 0.3, 1),
                box-shadow 0.9s ease !important;
}
.image-stack:hover .img-top {
    transform: translate(-25px, -18px) rotate(-2deg) !important;
    box-shadow: -20px 20px 50px rgba(0,0,0,0.15);
}
.image-stack:hover .img-bottom {
    transform: translate(25px, 22px) scale(1.04) !important;
    box-shadow: -35px 35px 70px rgba(0,0,0,0.18);
}

/* -------------------------------------------------------
   SECCIÓN INSTALACIONES (parallax suave)
------------------------------------------------------- */

.instalaciones-section {
    transition: background-position 0.1s linear;
    position: relative;
    overflow: hidden;
}

/* Texto instalaciones */
.instalaciones-section h2 {
    position: relative;
}

.instalaciones-section h2::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #d8b26a 0%, #fff 40%, #d8b26a 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: spa-shimmer 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.instalaciones-section:hover h2::before {
    opacity: 1;
}

.btn-entrar {
    transition: background-color 0.35s ease, transform 0.3s ease,
                box-shadow 0.35s ease, letter-spacing 0.4s ease !important;
    position: relative;
    overflow: hidden;
}

.btn-entrar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-entrar:hover::before {
    transform: translateX(100%);
}

.btn-entrar:hover {
    background-color: var(--gold) !important;
    transform: translateY(-3px) scale(1.04) !important;
    box-shadow: 0 12px 35px rgba(216, 178, 106, 0.45) !important;
    letter-spacing: 3px !important;
}

/* -------------------------------------------------------
   SECCIÓN CENTROS / TARJETAS
------------------------------------------------------- */

.centros-header h2 {
    position: relative;
    display: inline-block;
}

/* Subrayado dorado animado */
.centros-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, #d8b26a, transparent);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nuestros-centros.spa-section-visible .centros-header h2::after {
    transform: translateX(-50%) scaleX(1);
}

/* Tarjetas de centros — mejoradas */
.centro-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease !important;
    position: relative;
}

.centro-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(216, 178, 106, 0);
    transition: border-color 0.4s ease;
    z-index: 3;
    pointer-events: none;
}

.centro-card:hover::before {
    border-color: rgba(216, 178, 106, 0.4);
}

.centro-card:hover {
    transform: translateY(-14px) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.18) !important;
}

.centro-card img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.centro-card:hover img {
    transform: scale(1.1) !important;
}

/* Línea dorada inferior — grow on hover */
.centro-hover-line {
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.centro-card:hover .centro-hover-line {
    width: 80px !important;
}

/* -------------------------------------------------------
   RECONOCIMIENTOS
------------------------------------------------------- */

.reconocimientos-list li {
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: default;
}

.reconocimientos-list li:hover {
    transform: translateX(8px);
    color: #444;
}

.reconocimientos-list li::before {
    transition: transform 0.3s ease, color 0.3s ease;
}

.reconocimientos-list li:hover::before {
    transform: scale(1.3);
}

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */

.main-footer {
    position: relative;
    overflow: hidden;
}

/* Reflejo dorado de fondo en footer */
.main-footer::before {
    content: '';
    position: absolute;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(216,178,106,0.04) 0%, transparent 65%);
    pointer-events: none;
    animation: spa-float 12s ease-in-out infinite;
}

.footer-col h4 {
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s ease;
}

.footer-col:hover h4::after {
    width: 70px;
}

.social-icons-footer a {
    transition: color 0.3s ease, transform 0.3s ease, letter-spacing 0.3s ease !important;
    display: inline-block;
}

.social-icons-footer a:hover {
    transform: translateY(-3px) !important;
    letter-spacing: 2px !important;
}

.footer-cta {
    transition: background-color 0.4s ease, color 0.4s ease,
                transform 0.3s ease, box-shadow 0.4s ease !important;
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(216,178,106,0), rgba(216,178,106,0.15), rgba(216,178,106,0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.footer-cta:hover::before {
    transform: translateX(100%);
}

.footer-cta:hover {
    background-color: var(--gold) !important;
    color: #000 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(216,178,106,0.3) !important;
}

/* -------------------------------------------------------
   BOTONES GENERALES (Reserve, etc.)
------------------------------------------------------- */

a[href]:not(.nav-left a):not(.btn-volver):not(.map-link):not(.legal-links a) {
    position: relative;
}

/* Efecto ripple suave en botones principales */
.btn-contacto-top,
.btn-entrar {
    overflow: hidden;
}

/* -------------------------------------------------------
   GALERÍA DE FOTOS
------------------------------------------------------- */

.grid-fotos-galeria img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease,
                filter 0.5s ease !important;
    filter: brightness(0.95) saturate(0.9);
}

.grid-fotos-galeria img:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
    filter: brightness(1.05) saturate(1.1) !important;
    z-index: 2;
    position: relative;
}

/* -------------------------------------------------------
   LINKS LEGALES & MAPA
------------------------------------------------------- */

.map-link {
    transition: color 0.3s ease, border-color 0.3s ease,
                letter-spacing 0.3s ease !important;
}

.map-link:hover {
    letter-spacing: 0.3px;
}

/* -------------------------------------------------------
   SCROLL SUAVE GLOBAL
------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

/* -------------------------------------------------------
   CURSOR PERSONALIZADO (luxury feel)
------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {

    body {
        cursor: auto !important; /* cursor nativo siempre visible */
    }

    #spa-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background: #d8b26a;
        border-radius: 50%;
        pointer-events: none;
        z-index: 99999;
        opacity: 1;
        will-change: transform;
        transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
    }

    #spa-cursor-ring {
        position: fixed;
        top: 0;
        left: 0;
        width: 36px;
        height: 36px;
        border: 1.5px solid rgba(216, 178, 106, 0.75);
        border-radius: 50%;
        pointer-events: none;
        z-index: 99998;
        opacity: 1;
        will-change: transform;
        transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, border-color 0.2s ease;
    }

    #spa-cursor.is-hovering {
        width: 14px;
        height: 14px;
        background: #fff;
    }

    #spa-cursor-ring.is-hovering {
        width: 54px;
        height: 54px;
        border-color: rgba(216, 178, 106, 0.4);
    }
}

/* -------------------------------------------------------
   CRÉDITO DESARROLLADOR
------------------------------------------------------- */

.developer-credit {
    text-align: center;
    padding: 14px 0 6px;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.38);
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    border-top: 1px solid rgba(216, 178, 106, 0.08);
    margin-top: 10px;
    transition: color 0.3s ease;
}

.developer-credit:hover {
    color: #d8b26a;
}

/* -------------------------------------------------------
   REDUCED MOTION (accesibilidad)
------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .spa-hidden,
    .spa-hidden-left,
    .spa-hidden-right,
    .spa-hidden-scale {
        opacity: 1 !important;
        transform: none !important;
    }

    body { cursor: auto !important; }
    #spa-cursor, #spa-cursor-ring { display: none; }
}