/* ----------------------
    header SECCION
------------------------- */
.oculta{
  display: none !important;
}

body {
  margin-top: 125px!important;
}

.header {
  padding-top: 25px;
  padding-bottom: 10px;
  padding-left: 0;
  padding-right: 0;
  color: #ffff;

  position: fixed;
  top: 0;
  left: 0;          /* <- CLAVE */
  right: 0;         /* <- CLAVE */
  width: 100%;      /* <- CLAVE */

  z-index: 9998;
  margin-top: 0;    /* quita el auto raro */
}

/* Si igual usás la clase en JS, que NO cambie tamaño/posición */
.header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
}


.header-container {
    max-width: 1550px;
    width: 95% !important;
    margin: 0 auto;
    padding: 25px 50px;
    box-shadow: 10px 10px 15px 5px rgba(0, 0, 0, 0.25);
    border-radius: 60px;
    border: 1px solid hsla(0, 0%, 100%, .2);
    position: relative;
    background: rgba(225, 225, 225,0);
    z-index: inherit;
    max-height: none;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1550px;
    max-height: 100%;
    height: 100%;
    justify-content: space-between;
}

.header-logo {
    max-width: 245px;
    height: 40px;
    display: flex;
    align-items: center; 
    justify-content: flex-start; 
}

.header-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.menu-header {
    padding: 5px;
    align-items: center;
    display: flex;
}

.menu-header ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
    justify-content: space-evenly;
}

.menu-header li {
    margin: 0;
    padding: 0;
}

.menu-header a {
    text-decoration: none;
    color: #fff;
    font-family: 'Futura PT-BOOK';
    font-size: 16px;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s ease;
}

.toggle-btn{
    color: #fff;
    font-size: 1.5rem;
    cursor:pointer;
    display: none;
}

/* HOVER menu */
.menu-header a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background: #74D3D2;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s ease;
}
/* Estado activo del menú  */
.menu-header a.is-current {
  color: #74D3D2;
}

.menu-header a.is-current::after {
  transform: scaleX(1);
}
/* acá termina*/
.menu-header a:not(.contact):hover {
    color: #74D3D2;
}

.menu-header a:not(.contact):hover::after {
    transform: scaleX(1);
}

/* Overlay (pantalla semitransparente) */
.overlay {
    position: absolute;
    top: 130px;
    inset: 0;
    background: rgba(225,225,225, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9990;
}

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

/* Controlar el z-index del LI padre */
.menu-header li:has(.contact) {
    position: relative;
    z-index: 1;
}

.menu-header li:has(.contact) > a {
    position: relative;
    z-index: inherit;
}

.contact {
    padding: 5px 20px;
    color: #0F3648;
    background: #ffff;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    z-index: inherit;
    display: inline-block;
}

.contact:hover {
    color: #fff;
    background: #fe3b1f;
} 

.contact:after {
    content: none;
}

/* ==========================================
   SELECTOR DE BANDERAS DENTRO DEL MENÚ
   ========================================== */

/* OCULTAR el select nativo */
.paises {
    display: none !important;
}

/* Asegurar z-index del LI que contiene select-country */
.menu-header li:has(.select-country) {
    position: relative;
    z-index: 100;
}

/* El DIV select-country dentro del LI */
.select-country {
    position: relative;
    display: inline-block;
}

.custom-country-select {
    position: relative;
    width: auto;
    user-select: none;
    z-index: 100;
}

.country-selected {
    background: transparent;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.country-selected:hover {
    background: rgba(116, 211, 210, 0.2);
}

/* Banderas usando Flag Icons CSS */
.country-selected .fi,
.country-option .fi {
    width: 28px;
    height: 21px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    background-size: contain;
    background-position: center;
}

.arrow-down {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #fff;
    margin-left: 4px;
}



.custom-country-select.active .arrow-down {
    transform: rotate(180deg);
}

.country-items {
    position: absolute;
    background: rgba(15, 54, 72, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    max-height: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.country-hide {
    display: none;
}

.country-option {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.country-option:hover {
    background: rgba(116, 211, 210, 0.3);
}

.menu-header img{
    width: 20px;
    height: 20px;
}

/****** Responsive **********/

/* Solo para desktop */
@media (min-width: 1300px) {
    .header-container {
        backdrop-filter: blur(10px);
    }
}

@media (1301px <= width <= 1499px){
    .menu-header ul{
        gap: 20px;
    }
}

/* ==========================================
   RESPONSIVE - MENÚ HAMBURGUESA (1300px →)
   ========================================== */
@media (max-width: 1300px) {
    .header-center {
        justify-content: space-between;
    }
    
    /* Logo con z-index alto */
    .header-logo {
        z-index: 10003;
    }
    
    /* Toggle button visible */
    .toggle-btn {
        display: block;
        font-size: 2rem;
        z-index: 10003;
        position: relative;
    }
    
    /* Menú hamburguesa */
    .menu-header {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /*height: 100%;*/
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(15, 54, 72, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        padding: 20px 0;
        z-index: 10001;
        overflow-y: auto;
    }
    
    .menu-header.active {
        display: flex;
    }
    
    .menu-header ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .menu-header a {
        font-size: 24px;
        padding: 10px 25px;
        border-radius: 10px;
        transition: all 0.3s ease;
        display: block;
        text-align: center;
    }
    
    .menu-header a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
    
    /* Selector de banderas en móvil */
    .select-country {
        margin-top: 20px;
    }
    
    .country-items {
        position: fixed;
        top: 75%;
        left: 70%;
        transform: translate(-50%, -50%);
        width: 70px;
        max-height: 350px;
    }
    
    .overlay {
        top: 130px;
    }
    
    .header.fixed .overlay.active {
        z-index: 10000;
        position: fixed;
        top: 0;
    }
}

/* ==========================================
   AJUSTES PROGRESIVOS POR TAMAÑO
   ========================================== */

@media (1024px <= width <= 1300px) {
  .header-container { padding: 18px 30px; }
  .header-logo { max-width: 210px; }
  .menu-header ul { gap: 14px; }
  .menu-header a { font-size: 14px; }
}

@media (max-width: 900px) {
    .menu-header a {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .menu-header ul {
        gap: 15px;
        padding-bottom: 80px;
    }
    
    .menu-header a {
        font-size: 20px;
    }
    
    .country-selected {
        padding: 4px 8px;
    }
    
    .country-selected .fi {
        width: 32px;
        height: 24px;
    }
  
        .country-items {
        position: fixed;
        top: 75%;
        left: 85%;
        transform: translate(-50%, -50%);
        width: 70px;
        max-height: 350px;
    }
}

@media (max-width: 500px) {
  
    .header-logo {
        width: 70%;
        height: 70%;
    }
    
    .header-container {
        padding: 25px 35px;
    }
    
    .menu-header a {
        font-size: 18px;
    }
  
     .country-items {
        position: fixed;
        top: 70%;
        left: 85%;
        transform: translate(-50%, -50%);
        width: 70px;
        max-height: 350px;
}
}

@media (max-width: 400px) {
    .toggle-btn {
        font-size: 1.5rem;
    }
    
    .header-container {
        padding: 20px 30px;
    }
    
    .menu-header a {
        font-size: 16px;
        padding: 8px 20px;
    }
  
       .country-items {
        position: fixed;
        top: 70%;
        left: 85%;
        transform: translate(-50%, -50%);
        width: 70px;
        max-height: 350px;
      }
}

@media (max-width: 320px) {
    .header-container {
        padding: 18px 25px;
    }
    
    .custom-country-select {
        width: 50px;
    }
    
    .menu-header ul {
        gap: 12px;
    }
    
    .menu-header a {
        font-size: 15px;
    }
   .country-items {
        position: fixed;
        top: 70%;
        left: 85%;
        transform: translate(-50%, -50%);
        width: 70px;
        max-height: 350px;
      }
}

/* Prevenir scroll cuando menú abierto */
body.menu-open {
    overflow: hidden;
}
/* ==========================
   BLUR SOLO CUANDO HAY SCROLL (look neutro)
   ========================== */

.header.is-scrolled .header-container{
  /* ✅ Fondo neutro (sin tinte azul) */
  background: rgba(0, 0, 0, 0.22) !important;

  /* ✅ Blur + un poco de saturación para efecto vidrio */
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);

  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 10px 10px 18px 6px rgba(0, 0, 0, 0.24);
}

.header:not(.is-scrolled) .header-container{
  background: rgba(225, 225, 225, 0) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;

  border: 1px solid hsla(0, 0%, 100%, .2);
  box-shadow: 10px 10px 15px 5px rgba(0, 0, 0, 0.25);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .header.is-scrolled .header-container{
    /* Fallback neutro (sin azul) */
    background: rgba(0, 0, 0, 0.55) !important;
  }
}

