/* Colores de la plantilla */
:root {
    --color-primary: #7d3ac9; 
    --color-secondary: #5a2e99;
    --color-text-dark: #333;
    --color-text-light: #fff;
    --color-radio-live: #ff4d4d; 
    --color-black: #1a1a1a; 
    --color-input-border: #dcdcdc;
}

body {
    background-color: #f8f9fa;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* --- 1. Top Bar --- */
.top-bar {
    background-color: var(--color-black); 
    color: var(--color-text-light); 
    font-size: 0.85rem;
}

.top-bar .contact-info,
.top-bar .language-select a {
    color: var(--color-text-light) !important;
}

.live-radio-btn {
    background-color: transparent;
    color: var(--color-radio-live);
    border: 1px solid var(--color-radio-live);
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s;
}

.live-radio-btn:hover {
    background-color: var(--color-radio-live);
    color: var(--color-black);
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.flashing {
    animation: flash 1.5s infinite;
}


/* --- 2. Main Navbar (Z-Index alto para asegurar que no se mezcle) --- */
.navbar {
    top: 0; 
    width: 100%;
    /* CLAVE: Z-INDEX muy alto para que NADA del contenido de abajo se monte sobre él */
    z-index: 99999; 
    
    background-color: #fff; 
    border-bottom: 1px solid #eee;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: var(--color-text-dark) !important; 
    font-weight: 500;
}

.nav-link:hover {
    color: var(--color-primary) !important;
}

.logo-icon {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.custom-search-box {
    width: 450px;
    border: 1px solid var(--color-input-border); 
    border-radius: 5px;
    overflow: visible; 
}

.custom-search-box input {
    background-color: #fff;
    border: none;
    color: var(--color-text-dark) !important;
}
.custom-search-box input::placeholder {
    color: #888;
}

/* --- REGLAS DE COLOR DEFINITIVAS PARA OPCIONES DEL MENÚ --- */

/* 1. Forzamos el color del texto a NEGRO cuando el menú está abierto */
.language-select .dropdown-menu a.dropdown-item {
    /* Forzamos el color negro (var(--color-black) es #1a1a1a) */
    color: var(--color-black) !important; 
}

/* 2. Estilo al pasar el ratón (hover) — ESTA SE MANTIENE IGUAL */
.navbar .dropdown-menu a.dropdown-item:hover {
    background-color: #f0f0f0; 
    color: var(--color-primary) !important; 
}

/* 3. Estilo para la opción ACTIVA/FOCUSED (CLAVE) */
.navbar .dropdown-menu a.dropdown-item:focus,
.navbar .dropdown-menu a.dropdown-item.active {
    background-color: var(--color-primary);
    color: var(--color-text-light) !important; /* Texto blanco en el seleccionado/activo */
}

/* --- 3. Hero Section (DIV Custom y Separado) --- */
.hero-section {
    position: relative;
    height: 40vh; 
    min-height: 450px; 
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    background-size: cover; 
    background-repeat: no-repeat;
    overflow: hidden;
    padding-bottom: 20px; 
    transition: background-image 0.5s ease-in-out;
    padding-top: 20px;
    /* Z-index bajo. CLAVE para asegurar que la Navbar se muestre arriba */
    z-index: 1; 
}

/* CAPA DE TRANSPARENCIA OSCURA (OVERLAY) */
.overlay {
    position: absolute; 
    top: 0;           
    left: 0;          
    width: 100%;       
    height: 100%;      
    background-color: rgba(0, 0, 0, 0.55); 
    z-index: 2;
}

.hero-section #hero-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-section .container {
    z-index: 3;
    position: relative; 
}


/* --- 4. SECCIÓN DEL FORMULARIO DE BÚSQUEDA (Separación Garantizada) --- */
.search-form-wrapper {
    /* CLAVE: Margin positivo de 20px para garantizar el espacio de separación del Hero. */
    margin-top: 20px; 
    position: relative;
    z-index: 5; 
}

.search-form-container {
    margin-top: 0; 
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ESTILOS DE PESTAÑAS (BOTONES) --- */
.search-tabs .nav-link {
    background-color: var(--color-primary); 
    color: var(--color-text-light) !important;
    border-radius: 5px 5px 0 0 !important;
    border: none;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    opacity: 0.95;
    transition: background-color 0.3s;
    margin-right: 5px;
}

.search-tabs .nav-link.active {
    background-color: var(--color-secondary); 
    opacity: 1;
}

/* --- ESTILOS DEL FORMULARIO BLANCO (SELECTS MEJORADOS) --- */
.search-form-tabs {
    padding: 1.5rem !important;
    border-radius: 5px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.08); 
}

.search-form-tabs label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.search-form-tabs .form-select {
    border: 1px solid var(--color-input-border) !important;
    border-radius: 5px !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    line-height: 1.5;
    transition: border-color 0.3s;
    background-position: right 1rem center;
    background-repeat: no-repeat; /* Asegura que la flecha no se repita */
    background-size: 16px 12px; /* Ajusta el tamaño de la flecha */
    background-image: var(--bs-form-select-bg-icon); /* Utiliza el ícono de Bootstrap */
}


.search-form-tabs .form-select:focus {
    border-color: var(--color-primary) !important; 
    box-shadow: 0 0 0 0.25rem rgba(125, 58, 201, 0.25); 
}

.btn-purple {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    font-weight: 600;
    height: 54px; 
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-purple:hover {
    background-color: var(--color-secondary);
}

.title-div {
    padding-top:5%;
}

.logo-icon {
    /* Mantiene el margen (me-2 de Bootstrap) */
    margin-right: 0.5rem !important; 
    
    /* Asegura el tamaño correcto para un favicon */
    width: 32px; 
    height: 32px; 
    
    /* Ayuda a la alineación vertical en la navbar */
    vertical-align: middle; 
}

.dropdown-menu {
    z-index: 999999 !important; /* Asegúrate de que el dropdown esté por encima de otros elementos */
}

.dropdown {
    position: relative; /* Asegura que el dropdown se posicione en relación a este contenedor */
}

.mobile-banner-img {
    width: 100%;
    height: auto;       /* CLAVE: se ve completo */
    object-fit: contain; /* NO recorta */
}

.btn-lang-toggle {
    border: 1px solid var(--color-input-border);
    background: #fff;
    color: var(--color-text-dark);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.publish-fab{
  position:fixed; right:14px; bottom:14px;
  background:#f9c04b; color:#1a1a1a;
  border-radius:999px; padding:12px 16px;
  font-weight:800; font-size:14px;
  box-shadow:0 10px 25px rgba(0,0,0,.25);
  z-index:9999; display:flex; align-items:center; gap:10px;
  border:none;
}
.publish-dot{
  width:28px; height:28px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.12);
  animation:pulse 1.8s infinite;
}
@keyframes pulse{
  0%{ transform:scale(1); box-shadow:0 0 0 0 rgba(249,192,75,.55); }
  70%{ transform:scale(1.05); box-shadow:0 0 0 14px rgba(249,192,75,0); }
  100%{ transform:scale(1); box-shadow:0 0 0 0 rgba(249,192,75,0); }
}

.publish-summary{
  background:#fff;
  border-radius:10px;
  padding:16px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.publish-summary div{
  font-size:14px;
}

.mobile-banner-wrapper {
    position: relative;
    z-index: 2;
    margin: 0px !important;
}

/* Desktop: banner pequeño, centrado, sin dañar diseño */
@media (min-width: 992px) {
    
    /* Estilos para el contenedor del banner */
    #mobileBannerCarousel {
        max-width: 520px; /* Tamaño de la tarjeta */
        margin: 0 auto; /* Centrado horizontal */
        border-radius: 12px; /* Bordes redondeados */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Sombra suave */
        overflow: hidden; /* Para no mostrar elementos fuera de los bordes */
        background-color: #fff; /* Fondo blanco para la tarjeta */
    }
    
    /* Estilo para las imágenes dentro del carousel */
    .mobile-banner-img {
        width: 100%; /* Asegura que la imagen ocupe todo el contenedor */
        height: auto; /* Mantiene la proporción de la imagen */
        object-fit: cover; /* Asegura que la imagen se ajuste correctamente */
    }
    
}

/* Estilo para el footer sin fondo de color */
.footer {
    background-color: transparent; /* Fondo transparente, sin color */
    color: #555; /* Color gris oscuro para el texto */
    padding: 20px 0; /* Espaciado superior e inferior */
    position: relative;
    bottom: 0;
    width: 100%; /* Asegura que el footer ocupe todo el ancho */
    text-align: center; /* Centra el texto */
    font-size: 0.9rem; /* Tamaño de texto más pequeño */
}

/* Estilo para el enlace de Globynex */
.footer-link {
    color: #007bff; /* Color azul */
    text-decoration: none; /* Elimina el subrayado del enlace */
    font-weight: 600;
}

.footer-link:hover {
    text-decoration: underline; /* Subraya el texto al pasar el ratón */
}

/* En dispositivos móviles, aseguramos que el texto se vea bien */
@media (max-width: 767px) {
    .footer {
        padding: 15px 0; /* Menos espaciado en móviles */
    }
}


/* --- Media Queries (Móvil) --- */
@media (max-width: 767.98px) {
    .navbar {
        background-color: #fff; 
    }
    
    .navbar .nav-link,
    .navbar .navbar-brand {
        color: var(--color-text-dark) !important;
    }
    
    .hero-section {
        min-height: 250px;
        height: 30vh;
    }
    
    .search-form-wrapper {
        margin-top: 10px; 
    }

    .search-form-tabs {
        flex-direction: column;
    }
    .search-form-tabs > div {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
    .search-button {
        width: 100%;
    }
    .btn-purple {
        height: 50px;
    }
    
    /* --- ESTILOS DE PESTAÑAS (BOTONES) --- */
    .search-tabs .nav-link {
        font-weight: 500 !important;
        padding: 0.3rem 1rem !important;
        margin-right: 4px !important;
    }
    
    .lead {
        font-size: 1rem;
        font-weight: 300;
    }
    
    .mobile-banner-wrapper {
        margin: 0px !important;
    }
    
    .search-form-tabs .form-select {
        padding: 0.6rem 0.75rem !important;
        font-weight: 400 !important;
        background-color: #fff !important;
      }
      .logo-text {
          font-size: 1rem !important;
      }
}