/*
Theme Name: LCRA
Theme URI: https://lcra.org.co/
Author: Liga Colombiana de Radioaficionados
Author URI: https://lcra.org.co/
Description: Tema de bloques (Full Site Editing) para la Liga Colombiana de Radioaficionados, la entidad gremial de la radioafición colombiana y miembro de IARU para Colombia. Diseñado para editarse por completo con el Editor del Sitio: cabecera, pie, plantillas y patrones listos para reutilizar.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lcra
Tags: Full Site Editing, Block Patterns, Custom Colors, Custom Logo, Custom Menu, Editor Style, Featured Images, Footer, Translation Ready, Wide Blocks
*/

/*
 * La mayor parte del diseño se define en theme.json (estilos globales).
 * Este archivo contiene únicamente los estilos de componentes que el
 * sistema de bloques no puede expresar y que se encolan en el sitio y
 * en el editor.
 */

/* ---------------------------------------------------------------------
 * Tipografías locales (Inter para texto, Sora para títulos)
 * ------------------------------------------------------------------- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Sora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/sora-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------------
 * Accesibilidad
 * ------------------------------------------------------------------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: var(--wp--custom--radius--sm);
}

.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--primary-deep);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 var(--wp--custom--radius--sm) var(--wp--custom--radius--sm);
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 0;
}

/* ---------------------------------------------------------------------
 * Cabecera pegajosa
 * ------------------------------------------------------------------- */
.lcra-header {
	position: sticky;
	top: 0;
	z-index: 99999;
	transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.lcra-header[data-lcra-scrolled="true"] {
	box-shadow: 0 10px 30px -18px rgb(27 30 43 / 55%);
}

.lcra-header .lcra-brand__title {
	letter-spacing: -0.02em;
}

/* Subrayado animado de los enlaces del menú principal */
.lcra-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > .wp-block-navigation__responsive-container-open,
.lcra-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > .wp-block-navigation-item__content {
	position: relative;
	display: inline-block;
	padding: 0.35rem 0.15rem;
}

.lcra-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 2px;
	background: var(--wp--preset--color--accent);
	transition: right 0.25s ease;
}

.lcra-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > .wp-block-navigation-item__content:hover::after,
.lcra-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
	right: 0;
}

/* ---------------------------------------------------------------------
 * Botones
 * ------------------------------------------------------------------- */
.wp-block-button__link {
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--custom--shadow--md);
}

.is-style-lcra-arrow .wp-block-button__link::after {
	content: "\2192";
	margin-left: 0.6em;
	display: inline-block;
	transition: transform 0.2s ease;
}

.is-style-lcra-arrow .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* ---------------------------------------------------------------------
 * Portada
 * ------------------------------------------------------------------- */
.lcra-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.lcra-hero::before,
.lcra-hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	z-index: -1;
}

.lcra-hero::before {
	width: 46vw;
	aspect-ratio: 1;
	top: -18vw;
	right: -12vw;
	background: radial-gradient(circle at 30% 30%, rgb(247 240 101 / 22%), transparent 65%);
}

.lcra-hero::after {
	width: 38vw;
	aspect-ratio: 1;
	bottom: -20vw;
	left: -10vw;
	background: radial-gradient(circle at 60% 40%, rgb(203 57 52 / 20%), transparent 62%);
}

/* Rejilla tecnica y halo pulsante, dibujados por CSS (sin marcado extra) */
.lcra-hero {
	background-image:
		repeating-linear-gradient(to right, rgb(245 246 250 / 8%) 0 1px, transparent 1px 64px),
		repeating-linear-gradient(to bottom, rgb(245 246 250 / 8%) 0 1px, transparent 1px 64px);
}

@keyframes lcra-pulse {
	0% { transform: scale(0.86); opacity: 0.4; }
	50% { transform: scale(1.06); opacity: 0.85; }
	100% { transform: scale(0.86); opacity: 0.4; }
}

.lcra-hero::after {
	animation: lcra-pulse 8s ease-in-out infinite;
}

/* ---------------------------------------------------------------------
 * Cifras destacadas
 * ------------------------------------------------------------------- */
.lcra-stat {
	position: relative;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--pale);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--custom--shadow--sm);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lcra-stat::before {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 3px;
	background: var(--wp--preset--color--accent);
	border-radius: 0 0 var(--wp--custom--radius--lg) var(--wp--custom--radius--lg);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.lcra-stat:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--custom--shadow--md);
	border-color: var(--wp--preset--color--primary);
}

.lcra-stat:hover::before {
	opacity: 1;
}

/* ---------------------------------------------------------------------
 * Tarjetas de noticia
 * ------------------------------------------------------------------- */
.lcra-card {
	height: 100%;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--pale);
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lcra-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--wp--custom--shadow--lg);
}

.lcra-card .wp-block-post-featured-image {
	overflow: hidden;
	margin: 0;
}

.lcra-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.lcra-card:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* Imagen de respaldo cuando la entrada no tiene imagen destacada */
.lcra-card__fallback {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background: var(--wp--custom--gradient--primary);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------------
 * Lista de enlaces con viñetas de frecuencia
 * ------------------------------------------------------------------- */
.lcra-freq-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.lcra-freq-list > li {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	padding: 0.9rem 0;
	border-bottom: 1px dashed var(--wp--preset--color--pale);
}

.lcra-freq-list > li:last-child {
	border-bottom: 0;
}

.lcra-freq-list .lcra-freq-list__band {
	flex: 0 0 auto;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--secondary-deep);
	background: var(--wp--preset--color--accent-soft);
	padding: 0.2rem 0.6rem;
	border-radius: var(--wp--custom--radius--pill);
}

/* ---------------------------------------------------------------------
 * Acordeón de preguntas frecuentes
 * ------------------------------------------------------------------- */
.lcra-faq {
	border: 1px solid var(--wp--preset--color--pale);
	border-radius: var(--wp--custom--radius--base);
	background: var(--wp--preset--color--base);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lcra-faq:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--sm);
}

.lcra-faq summary {
	list-style: none;
	cursor: pointer;
}

.lcra-faq summary::-webkit-details-marker {
	display: none;
}

.lcra-faq summary::after {
	content: "+";
	flex: 0 0 auto;
	width: 1.75rem;
	height: 1.75rem;
	display: grid;
	place-items: center;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	line-height: 1;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.lcra-faq[open] summary::after {
	content: "\2212";
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------
 * Pie de página
 * ------------------------------------------------------------------- */
.lcra-footer .wp-block-social-links .wp-social-link {
	transition: transform 0.2s ease;
}

.lcra-footer .wp-block-social-links .wp-social-link a {
	opacity: 1;
}

.lcra-footer .wp-block-social-links .wp-social-link:hover {
	transform: translateY(-3px);
}

/* Franja tricolor superior del pie, dibujada por CSS */
.lcra-footer::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--wp--preset--color--accent) 0 33.33%, var(--wp--preset--color--base) 33.33% 66.66%, var(--wp--preset--color--secondary) 66.66% 100%);
}

/* ---------------------------------------------------------------------
 * Aparición al hacer scroll
 * ------------------------------------------------------------------- */
.lcra-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.lcra-reveal[data-lcra-visible="true"] {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.lcra-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.lcra-hero::after {
		animation: none;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
	}
}
/* ---------------------------------------------------------------------
 * Componentes de patrones (piezas complementarias)
 * ------------------------------------------------------------------- */
.lcra-eyebrow {
	align-items: center;
	color: var(--wp--preset--color--secondary);
	display: flex;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.4;
	margin: 0 0 0.75rem;
	text-transform: uppercase;
}

.lcra-eyebrow::before {
	background: currentColor;
	border-radius: 2px;
	content: "";
	flex: 0 0 auto;
	height: 2px;
	margin-right: 0.8em;
	width: 28px;
}

.lcra-stat__value {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	margin: 0;
}

.lcra-stat__label {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	margin: 0.4rem 0 0;
}

.lcra-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: var(--wp--preset--spacing--md);
}

.lcra-card__body .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	margin: 0;
}

.lcra-card__body .wp-block-post-title a {
	text-decoration: none;
}

.lcra-card__body .wp-block-post-date {
	margin: 0;
}

.lcra-card__body .wp-block-post-excerpt {
	margin: 0;
}

/* Acordeon de preguntas frecuentes */
.lcra-faq summary {
	align-items: center;
	display: flex;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.02rem;
	font-weight: 600;
	gap: 1rem;
	justify-content: space-between;
	padding: 1.05rem 1.3rem;
}

.lcra-faq p {
	color: var(--wp--preset--color--muted);
	line-height: 1.65;
	margin: 0;
	padding: 0 1.3rem 1.3rem;
}

/* Enlaces dentro del pie oscuro */
.lcra-footer a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.lcra-footer a:hover {
	text-decoration: underline;
}

.lcra-footer .wp-block-social-links .wp-social-link a {
	color: currentColor;
}

/* Contenido principal */
.lcra-main {
	padding-bottom: var(--wp--preset--spacing--xl);
	padding-top: clamp(2rem, 1rem + 4vw, 4rem);
}

/* Seleccion de texto */
::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-deep);
}

/* Tarjetas de noticia: la imagen ocupa el ancho de la tarjeta */
.lcra-card .wp-block-post-featured-image {
	margin: 0;
}
