/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

.inside-header a{
	
	font-size:22px !important;
}

/* ===========================
   1) CABECERA PÚBLICA (#masthead)
   =========================== */

#masthead {
  position: relative;            /* para overlay opcional */
  width: 100%;
  padding: 10px;                 /* corrige padding negativo */
  background-color: #1E73BE;     /* azul corporativo */
  color: #ffffff;                /* texto claro (≈4.94:1 con #1E73BE) */
}

/* Enlaces, marca y navegación en el header */
#masthead a,
#masthead .site-title a,
#masthead .main-navigation a,
#masthead .menu > li > a {
  color: #ffffff;
  text-decoration: none;
}

/* Estados hover/focus accesibles */
#masthead a:hover,
#masthead a:focus,
#masthead .main-navigation a:hover,
#masthead .main-navigation a:focus {
  color: #ffffff;                /* mantiene contraste */
  text-decoration: underline;    /* refuerzo visual */
}

/* Botones/toggles del menú en headers móviles */
#masthead .menu-toggle,
#masthead button,
#masthead .elementor-menu-toggle {
  color: #ffffff;
  background: transparent;
  border: 2px solid rgba(255,255,255,.6);
}
#masthead .menu-toggle:hover,
#masthead .menu-toggle:focus,
#masthead .elementor-menu-toggle:hover,
#masthead .elementor-menu-toggle:focus {
  border-color: #ffffff;
}

/* Inputs en el header (si los hay) */
#masthead input[type="search"],
#masthead input[type="text"] {
  background: #0f4f8e;           /* más oscuro para asegurar contraste */
  color: #ffffff;
  border: 1px solid #cfe6ff;
}
#masthead input::placeholder {
  color: #e5e7eb;                /* placeholder legible */
  opacity: 1;
}

/* Iconos en header (Elementor / font icons) */
#masthead .elementor-icon,
#masthead .elementor-social-icon,
#masthead .elementor-social-icon i,
#masthead .elementor-icon i {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* (Opcional) Si el header tiene imagen de fondo, añade overlay para garantizar contraste */
#masthead.has-bg-image { position: relative; }
#masthead.has-bg-image::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);   /* ajusta opacidad según la foto */
  pointer-events: none;
}
#masthead.has-bg-image > * { position: relative; z-index: 1; }

/* Foco visible global (teclado) */
a:focus,
button:focus,
input:focus,
[role="button"]:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ===========================
   2) ADMIN BAR (solo logueada)
   Elementos citados por axe: a.ab-item, span.display-name, #adminbar-search
   =========================== */

body.admin-bar #wpadminbar {
  background-color: #1f2937;   /* gris muy oscuro: alto contraste */
}

/* Texto/enlaces del admin bar */
body.admin-bar #wpadminbar .ab-item,
body.admin-bar #wpadminbar a.ab-item,
body.admin-bar #wpadminbar .ab-label,
body.admin-bar #wpadminbar .ab-icon:before,
body.admin-bar #wpadminbar #wp-admin-bar-my-account .display-name {
  color: #ffffff !important;
}

/* Hover/focus claros y subrayado para percepción */
body.admin-bar #wpadminbar a.ab-item:hover,
body.admin-bar #wpadminbar a.ab-item:focus {
  color: #e5e7eb !important;
  text-decoration: underline;
}

/* Buscador del admin bar */
body.admin-bar #wpadminbar #adminbarsearch .adminbar-input {
  background: #111827;          /* muy oscuro */
  color: #ffffff;
  border: 1px solid #374151;
}
body.admin-bar #wpadminbar #adminbarsearch .adminbar-input::placeholder {
  color: #e5e7eb;
  opacity: 1;
}

/* ===========================
   3) UTILIDADES A11Y
   =========================== */

/* Texto accesible oculto (por si lo necesitas en enlaces/iconos) */
.screen-reader-text{
  position:absolute !important;
  width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(1px,1px,1px,1px);
  white-space:nowrap; border:0;
}

/* Asegura contraste mínimo en estados deshabilitados (opcional) */
:disabled,
[aria-disabled="true"] {
  opacity: 1;                    /* evita bajar demasiado la legibilidad */
}

/* ===== Header accesible (contraste AA) ===== */
header#masthead.site-header{
  background:#1E73BE !important;
  color:#fff !important;
  padding:10px;
}

/* Enlaces del header */
header#masthead.site-header a,
header#masthead.site-header .site-title a,
header#masthead.site-header .main-navigation a,
header#masthead.site-header .menu > li > a{
  color:#fff !important;
  text-decoration:none;
}
header#masthead.site-header a:hover,
header#masthead.site-header a:focus,
header#masthead.site-header .main-navigation a:hover,
header#masthead.site-header .main-navigation a:focus{
  color:#fff !important;
  text-decoration:underline;  /* refuerzo visual */
}

/* Elemento activo del menú */
header#masthead.site-header .menu > li.current-menu-item > a,
header#masthead.site-header .menu > li.current_page_item > a{
  background:rgba(255,255,255,.15);
}

/* Submenús */
header#masthead.site-header .main-navigation ul ul{
  background:#173e73 !important;   /* más oscuro */
}
header#masthead.site-header .main-navigation ul ul a{
  color:#fff !important;
}
header#masthead.site-header .main-navigation ul ul a:hover,
header#masthead.site-header .main-navigation ul ul a:focus{
  background:#0f2d55 !important;
  color:#fff !important;
}

/* Toggle / hamburguesa (móvil) */
header#masthead.site-header .menu-toggle,
header#masthead.site-header .elementor-menu-toggle,
header#masthead.site-header button{
  color:#fff !important;
  background:transparent !important;
  border:2px solid rgba(255,255,255,.65) !important;
}
header#masthead.site-header .menu-toggle:hover,
header#masthead.site-header .menu-toggle:focus,
header#masthead.site-header .elementor-menu-toggle:hover,
header#masthead.site-header .elementor-menu-toggle:focus{
  border-color:#fff !important;
}

/* (Opcional) Si el header lleva imagen de fondo, usa overlay para asegurar contraste */
header#masthead.site-header.has-bg-image{ position:relative; }
header#masthead.site-header.has-bg-image::before{
  content:""; position:absolute; inset:0; background:rgba(0,0,0,.35); pointer-events:none;
}
header#masthead.site-header.has-bg-image > *{ position:relative; z-index:1; }

/* Foco visible global */
a:focus, button:focus, input:focus, [role="button"]:focus{
  outline:2px solid currentColor; outline-offset:2px;
}
