/**
 * components.css — Componentes reutilizables
 * Navbar, Footer, Botones, Modales, Formularios, Carrusel
 */

/* ═══════════════════════════════════════════════════════════════════════════
   NAVBAR — barra de navegación global
   Estados: transparente (sobre hero) → sólido (scrolled)
   ═══════════════════════════════════════════════════════════════════════════ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 1000;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: linear-gradient(to bottom, rgba(20,28,34,0.42) 0%, rgba(20,28,34,0) 100%);
    transition: height 0.45s var(--ease-out),
                background 0.45s var(--ease-out),
                box-shadow 0.45s var(--ease-out);
}
.site-nav.scrolled {
    height: 72px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 10px 40px -22px rgba(40, 60, 75, 0.4);
}

/* ─── Marca: isotipo + nombre ─────────────────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
}
.brand__logo {
    height: 42px;
    width: auto;
    /* El logo es blanco: sobre hero se ve tal cual; al hacer scroll lo teñimos */
    filter: brightness(0) invert(1);
    transition: filter 0.45s var(--ease-out), height 0.45s var(--ease-out);
}
.site-nav.scrolled .brand__logo {
    height: 38px;
    /* Teñir a color de marca (--rose) usando filtro calculado */
    filter: brightness(0) saturate(100%) invert(63%) sepia(18%)
            saturate(760%) hue-rotate(158deg) brightness(90%) contrast(88%);
}
.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}
.brand__name {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--white);
    transition: color 0.45s var(--ease-out);
}
.brand__sub {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 3px;
    transition: color 0.45s var(--ease-out);
}
.site-nav.scrolled .brand__name { color: var(--ink); }
.site-nav.scrolled .brand__sub  { color: var(--rose-deep); }

/* ─── Links de navegación ─────────────────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 2.3rem;
    list-style: none;
    margin: 0 auto;
}
.nav-links a {
    position: relative;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.3s ease;
    padding: 0.3rem 0;
}
.site-nav.scrolled .nav-links a { color: var(--charcoal); }
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1.5px;
    background: var(--rose);
    transition: width 0.35s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--white); }
.site-nav.scrolled .nav-links a.active { color: var(--rose-deep); }

/* ─── Zona de acciones (acceso + CTA) ─────────────────────────────────────── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-shrink: 0;
}
.nav-account {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    padding: 0.4rem 0.2rem;
    transition: color 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
}
.nav-account svg { width: 19px; height: 19px; }
.nav-account:hover { opacity: 0.7; }
.site-nav.scrolled .nav-account { color: var(--charcoal); }

/* CTA botón (reserva) */
.cta-button {
    background: var(--rose);
    color: var(--white);
    padding: 0.72rem 1.7rem;
    border-radius: 100px;
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    border: 1.5px solid var(--rose);
    box-shadow: 0 10px 30px -12px var(--glow);
    transition: transform 0.4s var(--ease-out),
                box-shadow 0.4s var(--ease-out),
                background 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -10px var(--glow);
    background: var(--terracotta);
    border-color: var(--terracotta);
}

/* ─── Toggle móvil (hamburguesa) ──────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.4s var(--ease-out), opacity 0.3s ease, background 0.3s ease;
    margin-left: auto;
}
.site-nav.scrolled .nav-toggle span { background: var(--charcoal); }
.nav-toggle span:nth-child(2) { width: 20px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { width: 26px; transform: translateY(-7px) rotate(-45deg); }
.nav-toggle.is-open span { background: var(--charcoal); }

/* ─── Menú móvil off-canvas ───────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: var(--off-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.5s var(--ease-out),
                visibility 0.5s,
                transform 0.5s var(--ease-out);
}
.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mobile-menu__links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}
.mobile-menu__links a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.3s ease;
}
.mobile-menu__links a:hover { color: var(--rose); }
.mobile-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 260px;
}
.btn-outline {
    padding: 0.85rem 1.5rem;
    border: 1.5px solid var(--rose);
    background: none;
    color: var(--rose-deep);
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}
.btn-outline:hover { background: var(--rose); color: var(--white); }

/* ─── Floating Button ────────────────────────────────────────────────────── */
.floating-button {
    position: fixed;
    bottom: -20px;
    left: 2rem;
    z-index: 999;
    background: var(--rose);
    color: var(--white);
    padding: 1.2rem 3rem;
    border: none;
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 -4px 30px rgba(111,167,194,0.4);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    min-width: 280px;
    text-align: center;
    border-radius: 2px 2px 0 0;
    overflow: visible;
}
.floating-button:hover {
    bottom: 0;
    box-shadow: 0 -8px 40px rgba(111,167,194,0.6);
    background: var(--terracotta);
}
.floating-button-text { position: relative; display: block; height: 1.5rem; }
.floating-button-subtext {
    position: absolute;
    top: -25px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0;
    transition: all 0.4s ease;
    white-space: nowrap;
    text-transform: uppercase;
}
.floating-button:hover .floating-button-subtext { opacity: 1; top: -20px; }

/* ─── Form feedback ──────────────────────────────────────────────────────── */
.form-feedback {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    font-size: 0.95rem;
    display: none;
}
.form-feedback--success {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}
.form-feedback--error {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

/* ─── Confetti ───────────────────────────────────────────────────────────── */
.confetti {
    position: absolute;
    z-index: 10001;
    pointer-events: none;
}
@keyframes confetti-explosion {
    0%   { transform: translate(0,0) rotate(0deg); opacity: 1; }
    20%  { opacity: 1; }
    100% { transform: translate(var(--tx),var(--ty)) rotate(720deg); opacity: 0; }
}
@keyframes textSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Responsive nav ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .site-nav { padding: 0 2rem; }
    .nav-links { gap: 1.6rem; }
    .nav-links a { font-size: 0.85rem; }
    .brand__name { font-size: 1.2rem; }
}
@media (max-width: 980px) {
    .site-nav { padding: 0 1.5rem; }
    .nav-links,
    .nav-actions { display: none; }
    .nav-toggle { display: flex; }
    .brand__sub { display: none; }
}
@media (max-width: 768px) {
    .floating-button { min-width: 220px; padding: 1rem 2rem; font-size: 0.95rem; left: 1rem; }
}

/* ─── Site Toast (notificación global) ───────────────────────── */
.site-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    background: var(--ink);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: min(560px, 90vw);
    text-align: center;
    box-shadow: 0 12px 40px -10px rgba(35,32,32,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}
.site-toast--visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.site-toast--info { background: var(--rose-deep); }
.site-toast--success { background: var(--ink); border-left: 4px solid var(--rose); }

/* ─── Botón membership-submit ─────────────────────────────── */
.membership-submit {
    display: block;
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--charcoal);
    color: var(--white);
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.35s var(--ease-out);
    margin-top: 0.5rem;
}
.membership-submit:hover {
    background: var(--rose);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px var(--glow);
}
.membership-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — componente global (aplica a todas las páginas)
   ═══════════════════════════════════════════════════════════════ */
footer {
    background: var(--nude-light);
    padding: 5rem 4rem 2rem;
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}
.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--charcoal);
}
.footer-brand p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
    opacity: 0.7;
}
.footer-links h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--charcoal);
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    text-decoration: none;
    color: var(--charcoal);
    opacity: 0.7;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.footer-links a:hover { opacity: 1; color: var(--rose); }
.footer-links li svg { stroke: var(--rose); flex-shrink: 0; }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.social-links a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--rose-pale);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.social-links a svg {
    width: 18px; height: 18px;
    stroke: var(--white);
    fill: none;
    stroke-width: 2;
}
.social-links a:hover {
    background: var(--rose);
    transform: translateY(-4px);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.88rem;
    color: var(--charcoal);
    opacity: 0.55;
}

/* ─── Footer responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
    footer { padding: 3rem 1.5rem 1.5rem; }
    .footer-content { gap: 2rem; margin-bottom: 2rem; }
    .footer-brand p { font-size: 0.9rem; }
    .footer-links h4 { font-size: 1rem; margin-bottom: 1rem; }
    .footer-links li { margin-bottom: 0.6rem; font-size: 0.88rem; }
    .social-links a { width: 36px; height: 36px; }
    .footer-bottom { font-size: 0.8rem; }
}

/* ─── Nav account dropdown ───────────────────────────────────── */
.nav-account-wrapper {
    position: relative;
}
.nav-account--logged {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.92);
    padding: 0.4rem 0.2rem;
    transition: color 0.3s ease, opacity 0.3s ease;
}
.nav-account--logged svg:first-child { width: 19px; height: 19px; }
.nav-account__chevron {
    width: 14px !important; height: 14px !important;
    transition: transform 0.3s var(--ease-out);
    opacity: 0.7;
}
.nav-account--logged.open .nav-account__chevron { transform: rotate(180deg); }
.site-nav.scrolled .nav-account--logged { color: var(--charcoal); }

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 0;
    background: var(--white);
    border: 1px solid var(--nude);
    border-radius: 10px;
    box-shadow: 0 16px 48px -12px rgba(35,32,32,0.2);
    min-width: 190px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s var(--ease-out);
    z-index: 1050;
}
.nav-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--charcoal);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown__item svg { width: 16px; height: 16px; stroke: var(--rose); flex-shrink: 0; }
.nav-dropdown__item:hover { background: var(--nude-light); color: var(--ink); }
.nav-dropdown__logout { border-top: 1px solid var(--nude); }
.nav-dropdown__logout:hover { color: #ef4444; }
.nav-dropdown__logout:hover svg { stroke: #ef4444; }
