/**
 * Template CSS - Estilos globales del sitio One2Travel
 *
 * Este archivo contiene los estilos base y componentes principales del sitio:
 * - Variables CSS (Brand colors)
 * - Estilos generales (body, links, containers)
 * - Header (top bar, navbar, logo, sticky behavior)
 * - Botones (primary, outline)
 * - Footer (site footer, newsletter, copyright)
 * - WhatsApp floating button
 * - Exchange rates display
 * - Media queries responsive
 *
 * @author One2Travel Development Team
 * @version 1.0
 */

/* ============================================
   VARIABLES CSS - Brand Palette
   ============================================ */
/* Definición de colores de marca como custom properties para reutilización */

:root {
    --brand-blue: #2a5298;
    --brand-blue-dark: #1e3c72;
    --brand-blue-rgb: 42, 82, 152;
    --brand-blue-dark-rgb: 30, 60, 114;
    --bs-primary: #2a5298;
    --bs-primary-rgb: 42, 82, 152;
    --bs-link-color: #2a5298;
    --bs-link-color-rgb: 42, 82, 152;
    --bs-link-hover-color: #1e3c72;
    --bs-link-hover-color-rgb: 30, 60, 114;
}

.alert-info{
    background-color: #e9f0fb;
    border-color: #b6d4fe;
    color: #084298;
}

/* ============================================
   ESTILOS GENERALES - Body, Links, Containers
   ============================================ */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}
a {
    color: var(--brand-blue);
    text-decoration: none;
}
a:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}
.container {
    max-width: 1600px;
}

/* ============================================
   HEADER - Top Bar, Navbar y Logo
   ============================================ */
/* Barra superior con información de contacto y redes sociales */
.top-bar {
    background-color: #1b1e34;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #ffffff;
}
.top-bar a, .top-bar span {
    color: #ffffff;
    text-decoration: none;
    margin-right: 1.5rem;
}
.top-bar .social-icons a {
    color: #ffffff;
    margin-right: 1rem;
    font-size: 1.1rem;
}
.logo-header {
    max-height: 50px;
}
.navbar .nav-link {
    font-family: 'NonBureau', sans-serif;
    font-weight: bold;
    color: #343a40;
}
.navbar .nav-link:hover {
    color: var(--brand-blue);
}

/* ============================================
   BOTONES - Primary y Outline
   ============================================ */
/* Estilos personalizados para botones con colores de marca */

.btn-primary {
    color: #fff;
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--brand-blue-dark);
    border-color: var(--brand-blue-dark);
}

.btn-outline-primary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.show > .btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

/* ============================================
   STICKY HEADER - Comportamiento Fixed
   ============================================ */
/* Header fijo que permanece en la parte superior al hacer scroll */
header.sticky-top {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1050 !important;
    width: 100% !important;
}

header.sticky-top .top-bar {
    background-color: #1b1e34 !important;
}

header.sticky-top .navbar {
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   NAVBAR DROPDOWNS - Menús Desplegables
   ============================================ */
/* Estilos y z-index para menús dropdown del navbar */
.navbar {
    position: relative;
}

.navbar .dropdown-menu {
    z-index: 1060;
}

@media (min-width: 992px) {
    .navbar .dropdown-menu {
        position: absolute;
    }

    .navbar .nav-item.dropdown {
        position: relative;
    }
}

/* ============================================
   MAIN CONTENT - Área de Contenido Principal
   ============================================ */
.main-content-area {
    position: relative;
}

/* ============================================
   FOOTER - Site Footer, Links, Newsletter
   ============================================ */
/* Footer con background image, columnas de info, y formulario de newsletter */
.site-footer {
    background-image: url('/assets/themes/one2travel/img/background-footer.jpg');
    background-size: cover;
    background-position: center;
    color: #e9ecef;
    font-size: 0.9rem;
}
.site-footer h5 {
    color: #fff;
    font-weight: bold;
    margin-bottom: 1rem;
}
.site-footer p {
    color: #ced4da;
    text-align: justify;
}
.logo-footer {
    max-width: 200px;
}
.footer-links li a {
    color: #ced4da;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.footer-links li a:hover {
    color: #fff;
}

/* Site footer form  */

.site-footer .form-control {
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid #6c757d;
    color: #fff;
}
.site-footer .form-control::placeholder {
    color: #ced4da;
}
.contact-blocks h6 {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #adb5bd;
}

/* Iconos sociales en el footer */
.contact-blocks .social-icons-footer a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0.5rem;
}
.contact-blocks .h5 {
    color: #fff;
    font-weight: bold;
}
.contact-block-center {
    border-left: 1px solid #495057;
    border-right: 1px solid #495057;
}
.contact-blocks a {
    color: #fff;
    text-decoration: none;
}
.contact-blocks a:hover {
    color: #fff; /* Ensures link stays white on hover */
    text-decoration: underline;
}

/* ============================================
   COPYRIGHT BAR - Barra Inferior de Copyright
   ============================================ */
.copyright-bar {
    background-color: #1a253c;
    padding: 1rem 0;
    font-size: 0.8rem;
}
.copyright-bar a, .copyright-bar span {
    color: #adb5bd;
    text-decoration: none;
}
.copyright-bar a:hover {
    color: #fff;
}

/* ============================================
   WHATSAPP BUTTON - Botón Flotante de WhatsApp
   ============================================ */
/* Botón circular fijo en la esquina inferior derecha */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 5px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 60px;
}

.whatsapp-float:hover {
    color: #FFF;
    background-color: #128C7E;
}

/* ============================================
   MEDIA CARD - Componente reutilizable con overlay
   ============================================ */
.media-card {
    position: relative;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
}

.media-card__media {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    isolation: isolate;
    min-height: var(--media-card-min-height, auto);
}

.media-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--media-card-fit, cover);
    object-position: center;
    transition: transform 0.35s ease;
    will-change: transform;
}

.media-card:hover .media-card__media img,
.media-card:focus-within .media-card__media img {
    transform: scale(1.04);
}

.media-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 1.75rem);
    background-color: #ffffffe1;
    opacity: 0;
    transition: opacity 0.24s ease;
    z-index: 2;
    text-decoration: none;
    color: inherit;
}

.media-card:hover .media-card__overlay,
.media-card:focus-within .media-card__overlay,
.media-card__overlay:focus-visible {
    opacity: 1;
}

.media-card__overlay:focus-visible {
    outline: 2px solid var(--brand-blue, #2a5298);
    outline-offset: 4px;
}

.media-card__logo {
    width: min(260px, 65%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-card__logo-image,
.media-card__logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.media-card__content {
    position: relative;
    background-color: #fff;
    z-index: 1;
}

/* ============================================
   RESPONSIVE - Media Queries
   ============================================ */
/* Ajustes para tablets y móviles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        text-align: center;
    }
    .top-bar .d-flex {
        flex-direction: column;
        text-align: center;
    }
    .top-bar .contact-info, .top-bar .social-icons {
        margin-bottom: 0.5rem;
    }
    .top-bar .contact-info a, .top-bar .contact-info span {
        display: block;
        margin: 0.25rem 0;
    }
    .footer-menu-col, .footer-form-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ============================================
   EXCHANGE RATES - Tipo de Cambio
   ============================================ */
/* Display de monedas en el top bar */
.exchange-rates {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exchange-rates .currency-item {
    font-weight: 500;
    white-space: nowrap;
    padding: 0.1rem 0.3rem;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 3px;
    margin: 0.1rem;
}

@media (max-width: 768px) {
    .exchange-rates {
        font-size: 0.8rem;
        gap: 0.25rem;
    }

    .exchange-rates .currency-item {
        font-size: 0.75rem;
        padding: 0.05rem 0.2rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 2px;
        margin: 0.05rem;
    }
}

@media (max-width: 576px) {
    .exchange-rates {
        font-size: 0.7rem;
        gap: 0.1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .exchange-rates .currency-item {
        font-size: 0.7rem;
        padding: 0.05rem 0.15rem;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        margin: 0.05rem;
    }
}

/* ============================================
   SOLD OUT - Letrero luminoso (components/sold-out-sign)
   ============================================ */
/* Franja negra con el texto rojo corriendo como un anuncio de LED. Las
   variantes --card, --hero e --inline solo cambian posicion y tamano. */
.sold-out-sign {
    /* Rojo puro: con #ff3b30 y un nucleo blanco en el brillo se veia salmon */
    --sold-out-color: #ff0000;
    --sold-out-glow: rgba(255, 0, 0, 0.8);
    --sold-out-size: 0.95rem;
    --sold-out-speed: 14s;
    position: relative;
    overflow: hidden;
    padding: 0.45em 0;
    line-height: 1;
    pointer-events: none; /* encima de una tarjeta, el clic llega al enlace */
    background-color: #0b0b0d;
    /* Rejilla de LEDs apagados detras del texto */
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0.9px, transparent 1.3px);
    background-size: 4px 4px;
    border-top: 1px solid rgba(255, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 14px rgba(255, 0, 0, 0.45), inset 0 0 12px rgba(0, 0, 0, 0.9);
}

/* Mascara de puntos encima del texto: lo parte en "bombillas" como un panel LED */
.sold-out-sign::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, transparent 1.1px, rgba(11, 11, 13, 0.4) 1.5px);
    background-size: 3px 3px;
}

.sold-out-sign__track {
    display: flex;
    width: max-content;
    animation: sold-out-marquee var(--sold-out-speed) linear infinite;
}

.sold-out-sign__group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.sold-out-sign__text,
.sold-out-sign__sep {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: var(--sold-out-size);
    letter-spacing: 0.3em;
    color: var(--sold-out-color);
    white-space: nowrap;
    /* Brillo solo rojo: un halo blanco o anaranjado desvia el tono hacia el rosa */
    text-shadow:
        0 0 3px var(--sold-out-glow),
        0 0 8px var(--sold-out-glow),
        0 0 16px rgba(255, 0, 0, 0.45);
    animation: sold-out-flicker 4s infinite;
}

.sold-out-sign__sep {
    padding: 0 0.9em;
    letter-spacing: 0;
    font-size: calc(var(--sold-out-size) * 0.8);
}

/* La pista lleva el texto dos veces: moverla la mitad deja el bucle sin saltos */
@keyframes sold-out-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Parpadeo breve de neon */
@keyframes sold-out-flicker {
    0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
    20%, 63% { opacity: 0.7; }
}

/* Tarjeta: franja sobre la parte alta de la imagen, por encima del overlay del hover */
.sold-out-sign--card {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    z-index: 3;
}

/* Detalle: franja sobre la imagen principal */
.sold-out-sign--hero {
    --sold-out-size: clamp(1rem, 2.2vw, 1.5rem);
    --sold-out-speed: 18s;
    position: absolute;
    top: clamp(12px, 4%, 28px);
    left: 0;
    right: 0;
    z-index: 3;
}

/* Detalle sin imagen: el letrero va en linea, arriba del contenido */
.sold-out-sign--inline {
    --sold-out-size: clamp(1rem, 2.2vw, 1.4rem);
}

/* Quien pide menos movimiento (en Windows basta con tener apagados los "Efectos
   de animacion") lo ve correr al doble de lento y sin parpadeo, en lugar de
   detenido: el letrero debe moverse siempre. */
@media (prefers-reduced-motion: reduce) {
    .sold-out-sign__track {
        animation-duration: calc(var(--sold-out-speed) * 2);
    }

    .sold-out-sign__text,
    .sold-out-sign__sep {
        animation: none;
    }
}
