/* =========================================================
   TOP BAR (SHELL GENERAL)
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  height: var(--header-h, 64px);
  padding: 0 var(--topbar-padding-x, 16px);

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

  background: var(--panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

/* Layout interno: izquierda / centro / derecha */
.topbar .left,
.topbar .center,
.topbar .right {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
}

.topbar .left {
  flex: 0 0 auto;
}

.topbar .center {
  flex: 1 1 auto;
  justify-content: center;
}

/* Right: contenedor general de iconos
   (campana, compartir, tema, idioma) */
.topbar .right {
  flex: 0 0 auto;
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);

  position: relative; /* necesario para alinear la ventana de Compartir con right:0 */
}


/* =========================================================
   LEFT: LOGO / BRAND
   ========================================================= */

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);

  text-decoration: none;
  color: var(--text);

  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.topbar .brand img {
  height: 38px;
  width: auto;
  display: block;
}


/* =========================================================
   CENTER1.0: MAIN NAV (versión links de texto)
   ========================================================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Link del menú (Información / Donar) */
.main-nav .nav-item {
  display: inline-flex;
  align-items: center;

  padding: 0 17px;
  height: calc(var(--header-h) - 10px);

  font-size: 14px;
  font-weight: 500;
  text-decoration: none;

  color: var(--muted, #9fb0d0);
  background: transparent;
  border-radius: 12px;

  transition:
    color 0.15s ease,
    background 0.15s ease;
}

/* No usamos iconos dentro del nav ahora, pero por si acaso: */
.main-nav .nav-item i {
  font-size: 16px;
}

/* Hover */
.main-nav .nav-item:hover {
  color: var(--text);
  background: var(--hover);
}

/* Estado “activo” (si lo usas en alguna página) */
.main-nav .nav-item.is-active {
  color: var(--brand);
}



/* =========================================================
   RIGHT1.0: ICON BUTTONS ( Law / tema)
   ========================================================= */

/* Botón circular con fondo SIEMPRE visible */
.icon-btn {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 999px;
  cursor: pointer;

  background: var(--hover);  /* fondo fijo gris suave */
  color: var(--text);
  text-decoration: none;     /* 🔹 quita la raya del link */

  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.icon-btn i {
  font-size: 20px; /* más grande, tipo FB */
}

/* Hover: se oscurece un poco (como FB) */
.icon-btn:hover {
  background: var(--panel-2);
  transform: translateY(-1px);
}

/* Foco accesible */
.icon-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.icon-btn:visited,
.icon-btn:hover,
.icon-btn:focus {
  text-decoration: none;
}



/* =========================================================
   RIGHT1.1: Tooltips para icon-btn
   ========================================================= */

.icon-btn::before {
  content: attr(data-label);

  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  bottom: -36px;
  padding: 4px 10px;
  border-radius: 10px;

  font-size: 12px;
  white-space: nowrap;

  background: var(--text);
  color: var(--panel);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);

  opacity: 0;
  pointer-events: none;
  z-index: 1200;

  transition:
    opacity 0.18s ease-out 0.18s,
    transform 0.18s ease-out 0.18s;
}

.icon-btn:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* =========================================================
   RIGHT1.2: BOTÓN DE IDIOMA (texto + icono)
   ========================================================= */

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  height: 40px;
  padding: 0 14px;

  background: var(--hover);
  color: var(--text);
  border-radius: var(--radius-sm, 10px);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;

  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.lang-btn i {
  font-size: 18px;
}

.lang-btn:hover {
  background: var(--panel-2);
  transform: translateY(-1px);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.lang-text {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  letter-spacing: 0.4px;
}


/* =========================================================
   RESPONSIVE: /es/
   ========================================================= */

@media (max-width: 600px) {
  .topbar {
    padding: 0 8px;
  }

  .topbar .center {
    justify-content: flex-start;
  }
}





/*____________________________________________________________________________________________________________*/
/*                                                /ES/AVISOS/                                                 */
/*____________________________________________________________________________________________________________*/

/* =========================================================
   Right A.1: Avisos Martillo
   ========================================================= */

/* Estado activo del icono de Avisos cuando estás en /es/avisos/ */
.page-avisos #openNotices {
  background: rgba(250, 204, 21, 0.22); /* círculo suave dorado */
  color:  #e6b800;                        /* icono dorado */
}

/* Opcional: que mantenga el color incluso al pasar el mouse */
.page-avisos #openNotices:hover {
  background: rgba(250, 204, 21, 0.22);
  color:  #e6b800;
}



/* =========================================================
   /es/avisos – Buscador estilo Pill Pro
   ========================================================= */

.page-avisos .notice-search {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenedor pill */
.page-avisos .notice-search-field {
  position: relative;
  display: flex;
  align-items: center;

  background: var(--g-stripe);
  border: 1px solid var(--border, #d1d5db);
  border-radius: 999px;

  padding: 0 40px;          /* espacio derecha para la X */
  padding-left: 42px;       /* espacio izquierda para la lupa */
  height: 40px;
  width: 460px;             /* 50% más ancho aprox */

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Botón lupa (izquierda) */
.page-avisos .notice-search-icon {
  position: absolute;
  left: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;

  border: none;
  background: transparent;
  color: var(--muted, #9fb0d0);
  cursor: pointer;
  padding: 0;
}

.page-avisos .notice-search-icon i {
  font-size: 14px;
}

/* Input */
.page-avisos .notice-search-field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;

  font-size: 14px;
  color: var(--text, #1f2937);
}

/* Placeholder */
.page-avisos .notice-search-field input::placeholder {
  color: var(--muted, #9fb0d0);
}

/* Botón X (derecha) */
.page-avisos .notice-clear-btn {
  position: absolute;
  right: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 24px;
  height: 24px;

  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #9fb0d0);
  cursor: pointer;
  padding: 0;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.page-avisos .notice-clear-btn i {
  font-size: 13px;
}

/* Al pasar el mouse por la X */
.page-avisos .notice-clear-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text, #1f2937);
}


/* Mostrar X solo cuando hay texto */
.page-avisos .notice-search-field.has-text .notice-clear-btn {
  opacity: 1;
  pointer-events: auto;
}

