/* Grand Tinajón Hotel - Estilos Personalizados */

/* ===== Custom Fonts ===== */

/* Bodoni - Display/Headings */
@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa24pt-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa24pt-BookItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa24pt-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa24pt-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa24pt-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Bodoni';
    src: url('../assets/fonts/Bodoni/subset-BodoniModa72pt-Fatface.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Centrale Sans - Body text */
@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-RegularItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Centrale Sans';
    src: url('../assets/fonts/Centrale Sans/subset-CentraleSans-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Glass panel effect */
.glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Mobile menu styles */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Form feedback messages */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Dark mode form messages */
.dark .form-message.success {
    background-color: #064e3b;
    color: #d1fae5;
    border-color: #047857;
}

.dark .form-message.error {
    background-color: #7f1d1d;
    color: #fee2e2;
    border-color: #b91c1c;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Scroll animation for nav */
.nav-scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Parallax image containers */
.parallax-img {
    transition: transform 0.05s linear;
}

@media (prefers-reduced-motion: reduce) {
    .parallax-img {
        transform: none !important;
        height: 100% !important;
        top: 0 !important;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C5A059;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #C5A059;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0F2952;
}

.dark ::-webkit-scrollbar-track {
    background: #1E1E1E;
}

.dark ::-webkit-scrollbar-thumb {
    background: #C5A059;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #d4b06a;
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.2s, opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
}

/* ===== Scroll Reveal Animations ===== */

/* Base state: elementos ocultos antes de entrar al viewport */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.from-left {
    transform: translateX(-32px);
}

.animate-on-scroll.from-right {
    transform: translateX(32px);
}

/* Estado visible: cuando el IntersectionObserver activa la clase */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delays escalonados para grupos de elementos (stagger) */
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }
.animate-on-scroll.delay-6 { transition-delay: 0.6s; }

/* Animación de entrada del hero (carga de página, no scroll) */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    animation: heroFadeUp 0.9s ease both;
}

.hero-animate.delay-1 { animation-delay: 0.15s; }
.hero-animate.delay-2 { animation-delay: 0.35s; }
.hero-animate.delay-3 { animation-delay: 0.55s; }

/* Animación de la línea separadora dorada */
@keyframes lineGrow {
    from { width: 0; }
    to   { width: 3rem; }
}

.animate-line.is-visible {
    animation: lineGrow 0.6s ease forwards;
}

.animate-line {
    width: 0;
}

/* Animación de contador numérico (JS la maneja, CSS solo el fade) */
.counter-animated {
    transition: opacity 0.4s ease;
}

/* Respeto por prefers-reduced-motion: sin animaciones */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .animate-on-scroll.from-left,
    .animate-on-scroll.from-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-animate {
        animation: none;
        opacity: 1;
    }

    .animate-line {
        width: 3rem;
    }
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}

/* Gallery image hover effect */
.gallery-image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 41, 82, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-container:hover::after {
    opacity: 1;
}

.gallery-image-container .zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: white;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.gallery-image-container:hover .zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
