/* Opomancha — estilo basado en los posts de Policía Nacional (Canva):
   fondo azul marino con foto, titulares amarillos, etiquetas "píldora" blancas,
   rayas amarillas que enmarcan los avisos y franja gris con el logo. */

:root {
	--opo-marino-900: #081530;
	--opo-marino: #0D2244;
	--opo-marino-700: #163463;
	--opo-oro: #FFB300;
	--opo-gris: #ECEFF4;
	--opo-rojo: #C8102E;
	--opo-radio: 14px;
}

body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks > main { margin-block-start: 0; }

/* ---------- Cabecera ---------- */
.opo-cabecera {
	background: var(--opo-marino-900);
	color: #fff;
	position: sticky; top: 0; z-index: 50;
	border-bottom: 3px solid var(--opo-oro);
}
.admin-bar .opo-cabecera { top: 32px; }
@media (max-width: 782px) { .admin-bar .opo-cabecera { top: 46px; } }
.opo-cabecera a { color: #fff; text-decoration: none; }
.opo-cabecera .wp-block-site-title a,
.opo-marca {
	font-family: var(--wp--preset--font-family--titulos);
	font-size: 1.7rem; letter-spacing: 0.04em; line-height: 1; text-transform: uppercase;
}
.opo-marca span { color: var(--opo-oro); }
.opo-cabecera .wp-block-site-logo img { max-height: 54px; width: auto; }
.opo-cabecera .wp-block-navigation { font-weight: 600; font-size: 0.92rem; }
.opo-cabecera .wp-block-navigation-item__content:hover { color: var(--opo-oro); }
.opo-cabecera .current-menu-item > a { color: var(--opo-oro); }
.opo-cabecera .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--opo-marino-900); color: #fff; padding: 2rem;
}
.opo-cabecera .wp-block-navigation__submenu-container {
	background: var(--opo-marino) !important; border: 0 !important; border-radius: 10px; padding: 0.4rem;
}
.opo-cabecera .wp-block-button__link { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---------- Píldora (etiqueta blanca con borde, como "POLICÍA NACIONAL") ---------- */
.opo-pildora {
	display: inline-block;
	border: 3px solid #fff;
	border-radius: var(--opo-radio);
	padding: 0.35rem 1.1rem;
	font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em;
	color: #fff; background: rgba(8, 21, 48, 0.55);
	line-height: 1.3;
}
p.opo-pildora { margin-inline: auto; width: fit-content; max-width: 100%; }
.opo-pildora--fina { border-width: 2px; font-weight: 700; font-size: 0.9rem; }
.opo-pildora--oscura { color: var(--opo-marino); border-color: var(--opo-marino); background: transparent; }

/* ---------- Bloques de fondo azul (hero y secciones) ---------- */
.opo-azul {
	background-color: var(--opo-marino);
	background-image:
		linear-gradient(180deg, rgba(8,21,48,0.15) 0%, rgba(8,21,48,0.85) 100%),
		radial-gradient(circle at 85% 20%, rgba(255,179,0,0.14), transparent 40%),
		repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 22px);
	color: #fff;
	position: relative; overflow: hidden;
}
.opo-azul h1, .opo-azul h2, .opo-azul h3, .opo-azul h4 { color: var(--opo-oro); }
.opo-azul a:not(.wp-block-button__link) { color: #fff; }
.opo-azul .opo-titular { text-shadow: 0 3px 0 rgba(0,0,0,0.25); }

.opo-hero { padding-block: clamp(3.5rem, 9vw, 7rem); text-align: center; }
.opo-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-block: 1rem 0.5rem; }
.opo-hero .opo-entradilla { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin-inline: auto; }

/* Galones (chevrons) dorados, como el distintivo del post */
.opo-galones::after {
	content: ""; position: absolute; right: clamp(1rem, 6vw, 5rem); top: clamp(1.5rem, 5vw, 3rem);
	width: 70px; height: 70px; opacity: 0.9;
	background:
		linear-gradient(135deg, transparent 46%, var(--opo-oro) 46% 60%, transparent 60%) 0 0 / 50% 34% no-repeat,
		linear-gradient(225deg, transparent 46%, var(--opo-oro) 46% 60%, transparent 60%) 100% 0 / 50% 34% no-repeat,
		linear-gradient(135deg, transparent 46%, var(--opo-oro) 46% 60%, transparent 60%) 0 50% / 50% 34% no-repeat,
		linear-gradient(225deg, transparent 46%, var(--opo-oro) 46% 60%, transparent 60%) 100% 50% / 50% 34% no-repeat;
}
@media (max-width: 700px) { .opo-galones::after { display: none; } }

/* Aviso enmarcado entre dos rayas amarillas */
.opo-rayas {
	border-top: 3px solid var(--opo-oro);
	border-bottom: 3px solid var(--opo-oro);
	padding-block: 1rem;
	font-weight: 800; text-transform: uppercase; text-align: center;
	color: var(--opo-oro);
	max-width: 620px; margin-inline: auto;
}
.opo-rayas--oscuro { color: var(--opo-marino); }

/* ---------- Secciones claras ---------- */
.opo-seccion { padding-block: var(--wp--preset--spacing--60); }
.opo-gris { background: var(--opo-gris); }
.opo-antetitulo {
	font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
	color: var(--opo-marino-700);
}
.opo-azul .opo-antetitulo { color: #fff; opacity: 0.85; }

/* ---------- Tarjetas de oposiciones ---------- */
.opo-tarjetas { gap: 1.5rem !important; }
.opo-tarjeta {
	background: var(--opo-marino); color: #fff;
	border-radius: 18px; padding: 1.75rem !important;
	position: relative; overflow: hidden;
	border-bottom: 6px solid var(--opo-oro);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex; flex-direction: column;
}
.opo-tarjeta:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(8,21,48,0.25); }
.opo-tarjeta h3 { color: var(--opo-oro); margin-top: 0.75rem; }
.opo-tarjeta p { color: rgba(255,255,255,0.88); }
.opo-tarjeta .wp-block-buttons { margin-top: auto; padding-top: 0.5rem; }
.opo-tarjeta--bomberos { border-bottom-color: var(--opo-rojo); }
.opo-tarjeta--bomberos .opo-pildora { border-color: #fff; background: var(--opo-rojo); }

/* ---------- Ventajas / datos ---------- */
.opo-dato { text-align: center; }
.opo-dato strong {
	display: block; font-family: var(--wp--preset--font-family--titulos);
	font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; color: var(--opo-oro);
}
.opo-gris .opo-dato strong, .opo-blanco .opo-dato strong { color: var(--opo-marino); }

.opo-lista-check { list-style: none; padding-left: 0; }
.opo-lista-check li { position: relative; padding-left: 2rem; margin-bottom: 0.6rem; }
.opo-lista-check li::before {
	content: ""; position: absolute; left: 0; top: 0.35em; width: 1.15rem; height: 1.15rem;
	border-radius: 5px; background: var(--opo-oro);
	-webkit-mask: none;
	box-shadow: inset 0 0 0 0 transparent;
}
.opo-lista-check li::after {
	content: ""; position: absolute; left: 0.38rem; top: 0.5em; width: 0.35rem; height: 0.62rem;
	border: solid var(--opo-marino-900); border-width: 0 3px 3px 0; transform: rotate(45deg);
}

/* ---------- Horario (Policía Nacional) ---------- */
.opo-horario { border-radius: 16px; overflow: hidden; border: 2px solid var(--opo-marino); }
.opo-horario > * { margin: 0 !important; padding: 1rem 1.25rem; }
.opo-horario > *:nth-child(odd) { background: var(--opo-gris); }
.opo-horario strong { color: var(--opo-marino); text-transform: uppercase; }

/* ---------- Huecos para fotos propias ---------- */
.opo-foto-propia {
	aspect-ratio: 4 / 3; border-radius: 18px;
	background:
		linear-gradient(160deg, rgba(8,21,48,0.75), rgba(13,34,68,0.95)),
		repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 10px, transparent 10px 20px);
	display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
	color: #fff; padding: 1.5rem; gap: 0.5rem;
	border: 3px dashed rgba(255,179,0,0.7);
}
.opo-foto-propia--ancha { aspect-ratio: 16 / 7; }
.opo-foto-propia b { color: var(--opo-oro); text-transform: uppercase; font-weight: 800; letter-spacing: 0.03em; }
.opo-foto-propia small { opacity: 0.8; max-width: 34ch; }
.opo-foto-propia--bomberos { border-color: rgba(200,16,46,0.85); }
.wp-block-image.opo-foto img { border-radius: 18px; }

/* ---------- Notas internas (solo las ve quien ha iniciado sesión) ---------- */
.opo-pendiente {
	display: none;
	border: 2px dashed #d97706; background: #fff7e6; color: #7c2d12;
	border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.85rem;
}
body.logged-in .opo-pendiente, .editor-styles-wrapper .opo-pendiente { display: block; }
.opo-pendiente::before { content: "✎ Nota para editar · "; font-weight: 800; }

/* ---------- Planes y precios ---------- */
.opo-plan {
	border: 2px solid var(--opo-marino); border-radius: 18px; padding: 2rem 1.5rem !important;
	text-align: center; display: flex; flex-direction: column; background: #fff;
}
.opo-plan--destacado { background: var(--opo-marino); color: #fff; border-color: var(--opo-oro); box-shadow: 0 20px 45px rgba(8,21,48,0.25); }
.opo-plan--destacado h3 { color: var(--opo-oro); }
.opo-plan .opo-precio { font-family: var(--wp--preset--font-family--titulos); font-size: 2.6rem; line-height: 1; color: var(--opo-marino); }
.opo-plan--destacado .opo-precio { color: #fff; }
.opo-plan .wp-block-buttons { margin-top: auto; justify-content: center; }

/* ---------- Pagos seguros ---------- */
.opo-pagos { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.opo-pagos span {
	border: 2px solid currentColor; border-radius: 10px; padding: 0.3rem 0.8rem;
	font-weight: 700; font-size: 0.8rem; text-transform: uppercase;
}

/* ---------- Pie (franja gris con logo, como en los posts) ---------- */
.opo-franja-logo {
	background: var(--opo-gris); text-align: center; padding-block: 1.5rem;
}
.opo-franja-logo .wp-block-site-logo { display: flex; justify-content: center; }
.opo-franja-logo .wp-block-site-logo img { max-height: 70px; width: auto; }
.opo-lema { font-style: italic; font-weight: 600; color: var(--opo-marino); margin-top: 0.25rem !important; }
.opo-pie { background: var(--opo-marino-900); color: rgba(255,255,255,0.85); font-size: 0.92rem; }
.opo-pie h4 { color: var(--opo-oro); font-size: 1.1rem; }
.opo-pie a { color: #fff; text-decoration: none; }
.opo-pie a:hover { color: var(--opo-oro); }
.opo-pie ul { list-style: none; padding-left: 0; }
.opo-pie li { margin-bottom: 0.35rem; }
.opo-legal { border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.8rem; opacity: 0.8; }

/* ---------- Botón contorno ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: currentColor; border: 3px solid currentColor;
}
.opo-azul .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.opo-azul .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--opo-marino-900); }

/* ---------- Títulos de página ---------- */
.opo-cabecera-pagina { padding-block: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.opo-cabecera-pagina h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin: 0; }

/* ---------- WooCommerce ---------- */
.woocommerce .wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
	background: var(--opo-oro) !important; color: var(--opo-marino-900) !important;
	border-radius: 12px !important; font-weight: 800 !important; text-transform: uppercase;
}
.wc-block-components-product-price, .wc-block-grid__product-price { color: var(--opo-marino); font-weight: 800; }

/* ---------- Accesibilidad ---------- */
:focus-visible { outline: 3px solid var(--opo-oro); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .opo-tarjeta { transition: none; } .opo-tarjeta:hover { transform: none; } }

/* ---------- Marca de texto (se oculta sola cuando subes el logo) ---------- */
.wp-block-site-logo + .opo-marca-texto { display: none; }
.opo-marca--pie { color: var(--opo-marino) !important; font-size: 2.2rem; display: block; text-align: center; text-decoration: none; }
.opo-marca--pie span { color: var(--opo-marino-700); }
.opo-carrito { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.opo-carrito span { background: var(--opo-oro); color: var(--opo-marino-900); border-radius: 99px; padding: 0 0.45rem; margin-left: 0.2rem; }
.opo-datos-contacto { list-style: none; padding-left: 0; }
.opo-datos-contacto li { margin-bottom: 0.4rem; }
.opo-redes a { margin-right: 0.8rem; font-weight: 700; }
.opo-precio { margin: 0.25rem 0 0.5rem; }
