/* =========================
   HEADER GLOBAL (ENCAPSULADO)
   ========================= */

.main-header {
  width: 100%;
  height: 64px;
  border-bottom: 1px solid #e5e7eb;
  top: 0;
  z-index: 1000;
}

/* CONTENEDOR */
.main-header .navbar {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* IZQUIERDA */
.main-header .nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-header .logo-nav {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* MENÚ */
.main-header .main-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.main-header .main-menu li {
  list-style: none;
}

.main-header .main-menu li a {
  text-decoration: none;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
  white-space: nowrap;
}

.main-header .main-menu li a:hover {
  color: #2563eb;
}

/* BOTÓN SUSCRIPCIÓN */
.main-header .btn-suscripcion {
  padding: 6px 14px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
}

/* USUARIO */
.main-header .nav-user {
  position: relative;
  display: flex;
  align-items: center;
}

.main-header .nav-avatar {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;

  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

/* DROPDOWN */
.main-header .nav-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 42px;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-width: 180px;

  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.main-header .nav-name {
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.main-header .nav-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}

.main-header .nav-dropdown a:hover {
  background: #f3f4f6;
}

.app-header .main-header {
  background: #111;
  border-bottom: 1px solid #222;
}

.app-header .logo-nav {
  height: 80px !important;
  width: auto !important;
  max-height: 80px !important;
  object-fit: contain;
}


.app-header a,
.app-header span,
.app-header button {
  color: #ffffff !important;
}

.app-header a:hover {
  color: #ffcc00 !important;
}

.app-header .btn-suscripcion {
  background: #d9a404;
  color: #000 !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: bold;
}

.app-header .nav-avatar {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

.app-header {
  background: #111;
}

.nav-name {
  display: block;
}

.nav-dropdown {
  display: none;
}

.nav-dropdown.open {
  display: block;
}

.nav-name {
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

/* ===== FIX DROPDOWN USUARIO ===== */

.nav-dropdown {
  background: #ffffff;
  color: #111827; /* gris oscuro */
}

.nav-dropdown a {
  color: #111827 !important;
}

.nav-dropdown a:hover {
  background: #f3f4f6;
}

.nav-name {
  color: #111827;
}

.hidden {
  display: none !important;
}

/* =====================================
   COMPENSACIÓN HEADER FIJO (GLOBAL)
   ===================================== */

body {
  padding-top: 70px; /* MISMA altura del navbar */
}

/* COMPENSACIÓN GLOBAL */
body {
  padding-top: 64px;
}

/* =========================
   BUSCADOR HEADER (NV 1)
========================= */

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-icon {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #111;
}

.search-wrapper input {
  width: 0;
  opacity: 0;
  border: none;
  border-bottom: 1px solid #222;
  background: transparent;
  font-size: 14px;
  padding: 4px 6px;
  transition: all 0.25s ease;
}

.search-wrapper:hover input,
.search-wrapper input:focus {
  width: 220px;
  opacity: 1;
}

.search-wrapper input:focus {
  outline: none;
}

.hidden {
  display: none !important;
}

.header-search input {
  background: #ffffff;
  color: #111;
  border: 1px solid #ddd;
}

.header-search input::placeholder {
  color: #888;
}

.header-search {
  background: #ffffff;
}
/* =========================
   OVERRIDE BUSCADOR (forzar input blanco + texto visible)
   Pegar al FINAL de header.css
   ========================= */

/* Trata de cubrir casi cualquier estructura común */
/* =========================
   BUSCADOR — estilo final
   ========================= */


header .header-search input,
header .nav-search input,
header input[type="search"],
header input.search-input,
header input#search-input {
  background: #ffffff !important;
  color: #111 !important;
  caret-color: #111 !important;

  border: 1px solid #d8d8d8 !important;
  border-radius: 8px !important;

  padding: 8px 14px !important;
  font-size: 14px !important;
  font-family: inherit;
}

/* Placeholder elegante */
header .header-search input::placeholder,
header .nav-search input::placeholder,
header input[type="search"]::placeholder,
header input.search-input::placeholder {
  color: #8a8a8a !important;
  font-weight: 400;
}

/* Hover sutil */
header .header-search input:hover,
header .nav-search input:hover,
header input[type="search"]:hover {
  border-color: #bdbdbd !important;
}

/* Focus limpio, tipo newsletter / forms */
header .header-search input:focus,
header .nav-search input:focus,
header input[type="search"]:focus {
  outline: none !important;
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08) !important;
  background: #fff !important;
}

header .header-search,
header .nav-search,
header .search {
  filter: none !important;
  mix-blend-mode: normal !important;
}


/* Ligeramente más premium */
header .header-search input {
  background: linear-gradient(#fff, #fafafa) !important;
}

header .header-search input {
  border-radius: 6px !important;
}


/* Contenedor del buscador */
.nav-search {
  display: flex;
  align-items: center;
}

/* Botón lupa */
.header-search .search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Ícono lupa */
.header-search .search-icon {
  width: 18px;
  height: 18px;
  color: #ffffff; /* 👈 BLANCA */
  transition: opacity 0.2s ease;
}

.header-search .search-btn:hover .search-icon {
  opacity: 0.75;
}

/* ===== BUSCADOR HEADER AJUSTE FINO ===== */
.main-menu li.nav-search {
  margin-left: 6px !important;
  margin-right: 6px !important;
}

/* =========================
   FIX LUPA SVG HEADER
   ========================= */

.search-svg {
  width: 18px;
  height: 18px;

  stroke: #ffffff;       /* 👈 ESTO ES LA CLAVE */
  stroke-width: 2;
  fill: none;

  opacity: 0.9;
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon:hover .search-svg {
  opacity: 1;
}

/* =========================
   LUPA HEADER — ESTILO PRO
   ========================= */

.search-svg {
  width: 20px;          /* 👈 más grande */
  height: 20px;

  stroke: #ffffff;     /* blanca */
  stroke-width: 2.4;   /* 👈 más gruesa */
  stroke-linecap: round;
  stroke-linejoin: round;

  fill: none;
  opacity: 0.95;
}

/* Botón lupa */
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* Hover sutil */
.search-icon:hover .search-svg {
  opacity: 1;
}

/* =========================
   BUSCADOR — LUPA + TEXTO
   ========================= */

.search-btn {
  display: flex;
  align-items: center;
  gap: 6px;               /* espacio lupa-texto */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Texto Buscar */
.search-text {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap;
}

/* Mantener input deslizante intacto */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Evitar espacios raros entre items del menú */
.main-menu li.nav-search {
  margin: 0 !important;
  padding: 0 !important;
}


.btn-theme-toggle {
  background: transparent;
  border: 1px solid #444;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-theme-toggle:hover {
  background: #ffcc00;
  color: #000;
}


/* =========================
   DARK MODE — DROPDOWN USUARIO
========================= */

body.dark .nav-dropdown {
  background: #111827;          /* gris oscuro */
  border: 1px solid #1f2937;
}

/* Nombre del usuario */
body.dark .nav-dropdown .nav-name {
  color: #f3f4f6;
  border-bottom: 1px solid #1f2937;
}

/* Links del dropdown */
body.dark .nav-dropdown a {
  color: #e5e7eb !important;
}

/* Hover */
body.dark .nav-dropdown a:hover {
  background: #1f2937;
  color: #ffffff !important;
}

/* =========================
   HEADER — LAYOUT DEFINITIVO
========================= */


/* fila superior: tema + fecha */
.app-header .nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 12px;
  opacity: 0.9;
}

/* menú debajo, alineado a la izquierda */
.app-header .main-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* =========================
   AJUSTE FINAL — META + PERFIL
========================= */

/* Fila superior: tema + fecha */
.app-header .nav-meta {
  display: flex;
  align-items: center;
  gap: 10px;

  /* alineación exacta */
  margin-right: 2px;      /* micro-ajuste visual */
}




/* =========================
   NAV ACTIVO
========================= */

.nav-link {
  padding: 6px 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ACTIVO — MODO CLARO */
.main-menu .nav-link.active {
  background: #d9a404;
  color: #000 !important;
}

/* ACTIVO — MODO OSCURO */
body.dark .main-menu .nav-link.active {
  background: #d9a404;
  color: #000 !important;
}


.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  min-height: var(--header-height);
  background: #111;
  z-index: 1200;
}

.main-header {
  min-height: var(--header-height);
  background: inherit;
}

.app-header .navbar {
  min-height: var(--header-height);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px;

  display: flex;
  align-items: center;   /* 👈 centra verticalmente */
  justify-content: space-between;
}

:root {
  --header-height: 80px; /* 👈 cambia esto y todo se adapta */
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px; /* el que realmente usas */
  z-index: 1200;
}
body {
  padding-top: var(--header-height);
}

/* =========================
   SELECTOR PAÍS (HEADER)
   ========================= */

.app-header .nav-country{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}

.app-header .country-label{
  font-size: 12px;
  opacity: 0.9;
  color: #fff;
}

.app-header .country-select{
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 16px; /* espacio para flecha */
}

/* flechita */
.app-header .nav-country{
  position: relative;
}
.app-header .nav-country::after{
  content: "▾";
  position: absolute;
  right: 10px;
  font-size: 11px;
  opacity: 0.8;
  pointer-events: none;
  color: #fff;
}

/* opciones del select */
.app-header .country-select option{
  color: #111;
}

/* Dark mode (ya estás en dark por default del header, pero igual lo dejamos bien) */
body.dark .app-header .nav-country{
  border: 1px solid #333;
  background: rgba(255,255,255,0.05);
}
body.dark .app-header .country-label,
body.dark .app-header .country-select{
  color: #fff;
}
body.dark .app-header .nav-country::after{
  color: #fff;
}

/* Responsive: si se aprieta mucho, que no dañe layout */
@media (max-width: 980px){
  .app-header .nav-country .country-label{
    display: none; /* deja solo el dropdown */
  }
}

/* Ocultar botón Suscríbete del header */
.btn-suscripcion {
    display: none !important;
}