/**
 * 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: 25px;
    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: 50px;
}

.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;
    }
}
