/* ============================================================================
   ckanext-sgc-theme — Branding UPeU · Portal de Datos Abiertos del SGC
   Paleta institucional (brand-tokens.md):
     azul brand   #003865   ·  azul profundo #023052  ·  ámbar accent #F8A900
   Se mapea sobre Bootstrap 5 + el CSS base de CKAN 2.11 (public/base/css/main.css),
   que define --bs-primary: #206b82 y compila botones/masthead con valores fijos.
   Este archivo SOLO sobreescribe; no toca el core. Carga después de `base/main`.
   ============================================================================ */

:root {
  --upeu-blue: #003865;        /* brand primario (SVG oficial upeu.edu.pe) */
  --upeu-blue-deep: #023052;   /* hover / franjas oscuras */
  --upeu-amber: #F8A900;       /* acento institucional (barra del logo) */
  --upeu-amber-600: #e59c00;   /* ámbar hover */
  --upeu-amber-700: #c98a00;   /* ámbar active */

  /* Bootstrap: variable primaria de CKAN 2.11 (#206b82 -> azul UPeU) */
  --bs-primary: #003865;
  --bs-primary-rgb: 0, 56, 101;
  --bs-link-color: #003865;
  --bs-link-color-rgb: 0, 56, 101;
  --bs-link-hover-color: #023052;
}

/* ---- Cabecera institucional (masthead azul UPeU) ------------------------- */
/* CKAN base: .masthead{background:#005d7a ...}  .account-masthead{#003647} */
.masthead {
  background: var(--upeu-blue) !important;
}
.account-masthead {
  background: var(--upeu-blue-deep) !important;
}
/* Barra de búsqueda del masthead a tono con el azul profundo */
.masthead .section.controls .form-control {
  border-color: rgba(255, 255, 255, .25);
}

/* Logo SVG del masthead: contenerlo (el asset es el wordmark blanco+ámbar).
   Se iguala la especificidad de CKAN (.masthead .navbar .logo img{max-height:60px})
   y se fija height explícito porque el SVG se sirve con width/height propios. */
.masthead .navbar .logo img,
.masthead .logo img,
.navbar-brand img {
  height: 44px;
  max-height: 44px;
  width: auto;
}

/* ---- Enlaces (CKAN base los fija en #206b82) ----------------------------- */
a { color: #003865; }
a:hover, a:focus { color: #023052; }

/* ---- Botón primario -> ámbar acento, texto azul (contraste ~6.4:1 AA) ---- */
.btn-primary,
.btn-primary:focus {
  color: #003865;
  background-color: var(--upeu-amber);
  border-color: var(--upeu-amber);
}
.btn-primary:hover {
  color: #003865;
  background-color: var(--upeu-amber-600);
  border-color: var(--upeu-amber-600);
}
.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary,
.show > .btn-primary.dropdown-toggle {
  color: #003865;
  background-color: var(--upeu-amber-700);
  border-color: var(--upeu-amber-700);
}
.btn-check:focus + .btn-primary,
.btn-primary:focus {
  box-shadow: 0 0 0 .25rem rgba(248, 169, 0, .4);
}

/* ---- Acentos varios: badges, foco, secciones destacadas ------------------ */
.badge.bg-primary,
.label-primary { background-color: var(--upeu-blue) !important; }

.homepage .module-search .tags .tag,
.tag {                       /* etiquetas -> azul UPeU */
  background-color: var(--upeu-blue);
  border-color: var(--upeu-blue);
}

:focus-visible { outline: 2px solid var(--upeu-amber); outline-offset: 1px; }

/* Bloques oscuros de CKAN (heading de búsqueda, secciones) al azul UPeU */
.module-heading,
.hero .module-search .module-content { background: transparent; }
