/* =========================================================
 * Header OZ-Thema-4.0
 * Fila 1 (azul #000049): logo + correo + teléfonos + CTA.
 * Fila 2 (blanca):       menú principal centrado + buscador.
 * En móvil/tablet el menú vive en el drawer lateral.
 * Mobile-first, responsive ≥768 / ≥1024 / ≥1280
 * ========================================================= */

:root {
	--oz-h-top-bg:        #000049;   /* fila 1 */
	--oz-h-top-text:      #ffffff;
	--oz-h-bottom-bg:     #ffffff;   /* fila 2 */
	--oz-h-bottom-text:   #0a0a0a;
	--oz-h-accent:        #1e73be;   /* hover/activo del menú y botón buscar */
	--oz-h-accent-text:   #ffffff;
	--oz-h-cta-bg:        #81d742;   /* botón «Consulta en Línea» */
	--oz-h-cta-text:      #0a0a0a;
	--oz-h-cta-hover-bg:  #ffffff;
	--oz-h-cta-hover-text:#5aa62c;
	--oz-h-border:        #e0e0e0;
	--oz-h-divider:       rgba(255, 255, 255, .18);
	--oz-h-shadow:        0 2px 6px rgba(0, 0, 0, .10);
	--oz-h-radius:        10px;
	--oz-h-trans:         .2s ease;
}

/* ---------- Reset puntual ---------- */
.oz-header,
.oz-header * { box-sizing: border-box; }

.oz-header ul { list-style: none; margin: 0; padding: 0; }
.oz-header a { text-decoration: none; color: inherit; }
.oz-header button {
	font: inherit;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
	padding: 0;
}

/* ---------- Layout base ---------- */
.oz-header {
	position: relative;
	z-index: 100;
	box-shadow: var(--oz-h-shadow);
	font-family: var(--OZ-Font-Base, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

.oz-header__container {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}

/* =========================================================
 *  FILA 1 — barra superior
 * ========================================================= */
.oz-header__top {
	background: var(--oz-h-top-bg);
	color: var(--oz-h-top-text);
	padding: 10px 0;
}

/* ---------- Hamburguesa (sólo móvil/tablet) ---------- */
.oz-header__hamburger {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: background-color var(--oz-h-trans);
}
.oz-header__hamburger:hover { background: rgba(255, 255, 255, .12); }

.oz-header__hamburger-bars,
.oz-header__hamburger-bars::before,
.oz-header__hamburger-bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}
.oz-header__hamburger-bars { position: relative; }
.oz-header__hamburger-bars::before,
.oz-header__hamburger-bars::after {
	content: "";
	position: absolute;
	left: 0;
}
.oz-header__hamburger-bars::before { top: -7px; }
.oz-header__hamburger-bars::after  { top:  7px; }

/* ---------- Logo ---------- */
.oz-header__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	background: #ffffff;
	padding: 6px 10px;
	border-radius: 8px;
}
/* Alto fijo y ancho por proporción: con max-width:100% la imagen se
   colapsa a 0 dentro de un flex que puede encoger. */
.oz-header__logo img,
.oz-header__logo .custom-logo {
	display: block;
	width: auto;
	max-width: none;
	height: 34px;
}
.oz-header__logo-text {
	color: var(--oz-h-bottom-text);
	font-weight: 800;
	font-size: 18px;
	line-height: 1.2;
}

/* ---------- Datos de contacto ---------- */
.oz-header__info {
	display: none;              /* se muestra en ≥1024 */
	align-items: center;
	gap: 26px;
	margin-left: auto;
}
.oz-header__info-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.oz-header__info-icon {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--oz-h-top-text);
}
.oz-header__info-icon svg { display: block; }

.oz-header__info-body {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}
.oz-header__info-label {
	font-size: 12.5px;
	opacity: .8;
}
.oz-header__info-value {
	font-size: 14px;
	font-weight: 700;
	word-break: break-word;
}
.oz-header__info-value a { transition: color var(--oz-h-trans); }
.oz-header__info-value a:hover { color: #efc64a; }
.oz-header__info-sep { opacity: .6; font-weight: 400; }

/* ---------- CTA «Consulta en Línea» ---------- */
.oz-header__cta {
	flex: 0 0 auto;
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #dc2529;
	color: var(--oz-h-cta-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	padding: 12px 18px;
	border-radius: 999px;
	white-space: nowrap;
	transition: background-color var(--oz-h-trans), color var(--oz-h-trans);
}
.oz-header__cta:hover {
	background: var(--oz-h-cta-hover-bg);
	color: var(--oz-h-cta-hover-text);
}
.oz-header__cta-icon { flex: 0 0 auto; }

/* =========================================================
 *  FILA 2 — menú principal + buscador
 * ========================================================= */
.oz-header__bottom {
	position: relative;
	z-index: 1;
	background: var(--oz-h-bottom-bg);
	color: var(--oz-h-bottom-text);
	border-bottom: 1px solid var(--oz-h-border);
}

.oz-header__bottom-spacer { display: none; }   /* hueco del logo, sólo ≥1024 */

/* ---------- Menú ---------- */
.oz-header__nav { display: none; }             /* en móvil vive en el drawer */

.oz-header__nav-list {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}
.oz-header__nav-list > li { position: relative; }

.oz-header__nav-list > li > a {
	display: block;
	padding: 15px 16px;
	color: var(--oz-h-bottom-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color var(--oz-h-trans), color var(--oz-h-trans);
}
.oz-header__nav-list > li > a:hover,
.oz-header__nav-list > li > a:focus-visible,
.oz-header__nav-list > li.current-menu-item > a,
.oz-header__nav-list > li.current_page_item > a,
.oz-header__nav-list > li.current-menu-ancestor > a {
	background: #dc2529;
	color: var(--oz-h-accent-text);
}

/* Submenús desplegables */
.oz-header__nav-list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--oz-h-bottom-bg);
	border: 1px solid var(--oz-h-border);
	border-radius: 0 0 var(--oz-h-radius) var(--oz-h-radius);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--oz-h-trans), transform var(--oz-h-trans), visibility var(--oz-h-trans);
	z-index: 20;
}
.oz-header__nav-list > li:hover > .sub-menu,
.oz-header__nav-list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.oz-header__nav-list .sub-menu a {
	display: block;
	padding: 11px 16px;
	font-size: 14px;
	color: var(--oz-h-bottom-text);
	transition: background-color var(--oz-h-trans), color var(--oz-h-trans);
}
.oz-header__nav-list .sub-menu a:hover {
	background: var(--oz-h-accent);
	color: var(--oz-h-accent-text);
}

/* ---------- Buscador ---------- */
.oz-header__search {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 0;
}
.oz-header__search .oz-ls { width: 100%; }

/* =========================================================
 *  DRAWER móvil
 * ========================================================= */
.oz-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
}
.oz-drawer[hidden] { display: none; }

.oz-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .22s ease;
}
.oz-drawer.is-open .oz-drawer__backdrop { opacity: 1; }

.oz-drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	width: min(340px, 88vw);
	background: #ffffff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 30px rgba(0, 0, 0, .25);
	transition: transform .22s ease;
}
.oz-drawer__panel--left  { left: 0;  transform: translateX(-100%); }
.oz-drawer.is-open .oz-drawer__panel--left { transform: translateX(0); }

.oz-drawer__head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--oz-h-top-bg);
	color: var(--oz-h-top-text);
}
.oz-drawer__title { font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.oz-drawer__close {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	color: inherit;
	transition: background-color var(--oz-h-trans);
}
.oz-drawer__close:hover { background: rgba(255, 255, 255, .14); }

.oz-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px;
	color: var(--oz-h-bottom-text);
}

.oz-drawer__section { margin-bottom: 24px; }
.oz-drawer__section-title {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #6b7280;
}

.oz-drawer__nav-list li { border-bottom: 1px solid #eeeeee; }
.oz-drawer__nav-list li:last-child { border-bottom: 0; }
.oz-drawer__nav-list a {
	display: block;
	padding: 11px 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--oz-h-bottom-text);
	transition: color var(--oz-h-trans);
}
.oz-drawer__nav-list a:hover { color: var(--oz-h-accent); }
.oz-drawer__nav-list .sub-menu { padding-left: 14px; }
.oz-drawer__nav-list .sub-menu a { font-size: 14px; font-weight: 500; }

.oz-drawer__contacts li {
	font-size: 14px;
	line-height: 1.6;
	padding: 4px 0;
	word-break: break-word;
}
.oz-drawer__contact-label { font-weight: 700; margin-right: 5px; }
.oz-drawer__contacts a { color: var(--oz-h-accent); }

.oz-drawer__cta {
	display: block;
	text-align: center;
	background: var(--oz-h-cta-bg);
	color: var(--oz-h-cta-text);
	font-weight: 700;
	font-size: 15px;
	padding: 13px 16px;
	border-radius: 999px;
	transition: filter var(--oz-h-trans);
}
.oz-drawer__cta:hover { filter: brightness(.94); }

body.oz-drawer-open { overflow: hidden; }

/* =========================================================
 *  MEDIA QUERIES
 * ========================================================= */

/* ---------- <640: el CTA queda como botón circular ---------- */
@media (max-width: 639px) {
	.oz-header__cta { padding: 11px; border-radius: 50%; }
	.oz-header__cta span { display: none; }
}

/* ---------- ≥768: la barra superior gana aire ---------- */
@media (min-width: 768px) {
	.oz-header__container { padding: 0 24px; }
	.oz-header__top { padding: 12px 0; }
	.oz-header__logo { padding: 8px 14px; }
	.oz-header__logo img,
	.oz-header__logo .custom-logo { height: 44px; }
}

/* ---------- ≥1024: dos filas completas, logo en tarjeta ---------- */
@media (min-width: 1024px) {
	.oz-header__hamburger { display: none; }

	.oz-header__top { padding: 0; }
	.oz-header__top .oz-header__container {
		position: relative;
		min-height: 78px;
		justify-content: flex-end;
		gap: 24px;
	}

	/* El logo se convierte en una tarjeta blanca que monta sobre la fila 2. */
	.oz-header__logo {
		position: absolute;
		top: 0;
		left: 24px;
		z-index: 5;
		width: max-content;
		background: #ffffff;
		padding: 12px 22px 16px;
		border-radius: 0 0 12px 12px;
		box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
	}
	/* Ancho explícito: dentro de una caja absoluta, max-width:100% colapsa la imagen. */
	.oz-header__logo img,
	.oz-header__logo .custom-logo {
		width: 265px;
		max-width: none;
		max-height: none;
		height: auto;
	}
	.oz-header__logo-text { color: var(--oz-h-bottom-text); }

	.oz-header__info { display: flex; }
	.oz-header__cta { margin-left: 0; }

	.oz-header__bottom-spacer { display: block; }
	.oz-header__bottom .oz-header__container {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr) 300px;
		align-items: center;
		gap: 16px;
	}

	.oz-header__nav { display: block; }
	.oz-header__search { padding: 8px 0; }
}

/* ---------- ≥1280: más respiro ---------- */
@media (min-width: 1280px) {
	.oz-header__top .oz-header__container { min-height: 84px; gap: 34px; }
	.oz-header__logo img,
	.oz-header__logo .custom-logo { width: 290px; }
	.oz-header__bottom .oz-header__container { grid-template-columns: 330px minmax(0, 1fr) 330px; }
	.oz-header__nav-list > li > a { padding: 16px 18px; font-size: 15.5px; }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.oz-drawer__backdrop,
	.oz-drawer__panel,
	.oz-header__nav-list .sub-menu { transition: none !important; }
}

/* =========================================================
 *  BUSCADOR EN VIVO (.ozpls-figma)
 *  El marcado lo imprime inc/widgets.php pero no tenía ningún
 *  estilo: salía con la apariencia por defecto del navegador.
 *  Se recupera el diseño del tema anterior: caja tipo píldora
 *  y botón circular azul marino con lupa.
 * ========================================================= */

.ozpls-figma {
	--oz-ls-bg: #ffffff;
	--oz-ls-border: #d7dee7;
	--oz-ls-text: #1f2937;
	--oz-ls-placeholder: #9aa5b1;
	--oz-ls-btn: var(--oz-h-top-bg, #000049);
	--oz-ls-btn-hover: var(--oz-h-accent, #1e73be);

	position: relative;
	width: 100%;
}

.ozpls-figma__form {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
}

.ozpls-figma__inputWrap {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	padding: 0 16px;
	background: var(--oz-ls-bg);
	border: 1px solid var(--oz-ls-border);
	border-radius: 999px;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.ozpls-figma__inputWrap:focus-within {
	border-color: var(--oz-ls-btn-hover);
	box-shadow: 0 0 0 3px rgba(30, 115, 190, .12);
}

.ozpls-figma__input {
	width: 100%;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--oz-ls-text);
	font-family: inherit;
	font-size: .92rem;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}

.ozpls-figma__input::placeholder {
	color: var(--oz-ls-placeholder);
	opacity: 1;
}

.ozpls-figma__input::-webkit-search-decoration,
.ozpls-figma__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* Botón circular con lupa; el texto queda para lectores de pantalla. */
.ozpls-figma button.ozpls-figma__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--oz-ls-btn);
	cursor: pointer;
	transition: background-color .2s ease;
}

.ozpls-figma button.ozpls-figma__btn:hover {
	background: var(--oz-ls-btn-hover);
}

.ozpls-figma button.ozpls-figma__btn:focus-visible {
	outline: 2px solid var(--oz-ls-btn-hover);
	outline-offset: 2px;
}

.ozpls-figma button.ozpls-figma__btn::before {
	content: "";
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M20 20l-3.5-3.5' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.ozpls-figma__btnText {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ozpls-figma__inputWrap,
	.ozpls-figma button.ozpls-figma__btn { transition: none; }
}
