/*
Theme Name: El Anglicano
Theme URI: https://elanglicano.cl
Template: twentytwentyfive
Version: 1.0.0
Description: Tema hijo de Twenty Twenty-Five con portada y articulos inspirados en el diseno de Crossway (crossway.org/articles).
Author: El Anglicano
Text Domain: elanglicano
*/

:root {
	--elg-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--elg-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
	--elg-text: #514d47;
	--elg-muted: #a4a4a4;
	--elg-accent: #ae5251;
	--elg-line: #ececec;
	--elg-soft: #f8f8f8;
}

body {
	font-family: var(--elg-serif);
	color: var(--elg-text);
	background: #ffffff;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
}
a:hover {
	color: var(--elg-accent);
}

/* ===== Layout general ===== */
.elg-main {
	margin-top: 2.5rem;
}

/* ===== Header (estilo Crossway) ===== */
.wp-block-site-title {
	font-family: var(--elg-serif);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.wp-block-navigation {
	font-family: var(--elg-sans);
}
.wp-block-navigation-item {
	letter-spacing: 0.03em;
}

/* ===== Desplegable "Categorías" ===== */
.elg-cat-dropdown {
	position: relative;
}
.elg-cat-dropdown-title {
	font-family: var(--elg-sans);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--elg-text);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem 0;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.elg-cat-dropdown-title::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.2rem;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid var(--elg-muted);
}
.elg-cat-dropdown .wp-block-categories {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	background: #ffffff;
	border: 1px solid var(--elg-line);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	min-width: 230px;
	margin: 0.35rem 0 0;
	padding: 0.9rem 1rem;
	list-style: none;
	z-index: 20;
}
.elg-cat-dropdown:hover .wp-block-categories,
.elg-cat-dropdown:focus-within .wp-block-categories {
	display: block;
}
.elg-cat-dropdown .wp-block-categories li {
	margin-bottom: 0.5rem;
}
.elg-cat-dropdown .wp-block-categories li:last-child {
	margin-bottom: 0;
}
.elg-cat-dropdown .wp-block-categories a {
	text-decoration: none;
	font-family: var(--elg-sans);
	font-size: 0.92rem;
}
.elg-cat-dropdown .wp-block-categories a:hover {
	color: var(--elg-accent);
}
@media (max-width: 781px) {
	.elg-cat-dropdown .wp-block-categories {
		position: static;
		box-shadow: none;
		border: none;
		padding: 0;
	}
}

/* ===== Hero (ultimo articulo) ===== */
.elg-hero {
	margin-bottom: 3rem;
}
.elg-hero-card .wp-block-post-featured-image {
	margin-bottom: 1.5rem;
}
.elg-hero-card h1,
.elg-hero-card .wp-block-post-title {
	font-family: var(--elg-serif);
	font-size: clamp(2rem, 5vw, 3.4rem);
	line-height: 1.1;
	font-weight: 600;
	margin: 0 0 0.75rem;
}
.elg-hero-card h1 a,
.elg-hero-card .wp-block-post-title a {
	text-decoration: none;
}
.elg-hero-card .elg-byline {
	margin-bottom: 1rem;
}
.elg-hero-card .wp-block-post-excerpt p {
	font-size: 1.15rem;
	line-height: 1.65;
}

/* ===== Byline (fecha / autor) ===== */
.elg-byline {
	font-family: var(--elg-sans);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--elg-muted);
	gap: 0.5rem;
	align-items: baseline;
}
.elg-byline .wp-block-post-date {
	color: var(--elg-muted);
}
.elg-byline-sep {
	color: var(--elg-accent);
}
.elg-byline .wp-block-post-author-name a {
	color: var(--elg-text);
	text-decoration: none;
}
.elg-byline .wp-block-post-author-name a:hover {
	color: var(--elg-accent);
}

/* ===== Titulos de seccion (estilo Crossway) ===== */
.elg-section-title {
	font-family: var(--elg-sans);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--elg-text);
	border-bottom: 2px solid var(--elg-text);
	padding-bottom: 0.6rem;
	margin-top: 0;
	margin-bottom: 1.75rem;
}

/* ===== Lista de articulos ===== */
.elg-list-item {
	border-bottom: 1px solid var(--elg-line);
	padding: 1.75rem 0;
}
.elg-list-item:first-of-type {
	padding-top: 0;
}
.elg-list-item:last-of-type {
	border-bottom: none;
}
.elg-list-item .wp-block-post-featured-image {
	margin: 0;
}
.elg-list-item h3,
.elg-list-item .wp-block-post-title {
	font-family: var(--elg-serif);
	font-size: 1.35rem;
	line-height: 1.3;
	margin: 0 0 0.5rem;
}
.elg-list-item h3 a,
.elg-list-item .wp-block-post-title a {
	text-decoration: none;
}
.elg-list-item .elg-byline {
	margin-bottom: 0.6rem;
}
.elg-list-item .wp-block-post-excerpt p {
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
}

/* ===== Sidebar: temas ===== */
.elg-article-columns .wp-block-column:last-child {
	border-left: 1px solid var(--elg-line);
	padding-left: 2rem;
}
.wp-block-categories,
.wp-block-tag-cloud {
	font-family: var(--elg-sans);
	font-size: 0.95rem;
	list-style: none;
	padding: 0;
}
.wp-block-categories li {
	margin-bottom: 0.6rem;
}
.wp-block-categories a {
	text-decoration: none;
}

/* ===== Articulo individual ===== */
.elg-article {
	margin-bottom: 3rem;
}
.elg-article > .wp-block-post-title {
	font-family: var(--elg-serif);
	font-size: clamp(2.1rem, 5vw, 3.4rem);
	line-height: 1.08;
	font-weight: 600;
	margin-bottom: 1rem;
}
.elg-article .elg-byline {
	margin-bottom: 1.5rem;
}
.elg-article .wp-block-post-featured-image {
	margin-bottom: 2rem;
}
.elg-article .wp-block-post-content,
.elg-article .entry-content {
	font-size: 1.1rem;
	line-height: 1.75;
}
.elg-article .wp-block-post-content h2,
.elg-article .entry-content h2 {
	font-family: var(--elg-serif);
	font-size: 1.8rem;
	line-height: 1.2;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}
.elg-article .wp-block-post-content h3,
.elg-article .entry-content h3 {
	font-family: var(--elg-serif);
	font-size: 1.4rem;
	margin-top: 2rem;
}
.elg-article .wp-block-post-content p,
.elg-article .entry-content p {
	margin-bottom: 1.4rem;
}
.elg-article blockquote {
	font-family: var(--elg-serif);
	font-size: 1.5rem;
	font-style: italic;
	line-height: 1.45;
	color: var(--elg-text);
	border-left: 4px solid var(--elg-accent);
	padding: 1rem 0 1rem 1.5rem;
	margin: 2.5rem 0;
}
.elg-article blockquote p {
	margin-bottom: 0;
}
.elg-article .wp-block-post-content a,
.elg-article .entry-content a {
	color: var(--elg-accent);
}

/* ===== Caja de autor ===== */
.elg-author-box {
	background: var(--elg-soft);
	border-top: 3px solid var(--elg-accent);
	padding: 2rem;
	margin-bottom: 3rem;
}
.elg-author-box .wp-block-post-author {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
}
.elg-author-box .wp-block-post-author__avatar img {
	border-radius: 50%;
}
.elg-author-box .wp-block-post-author__name {
	font-family: var(--elg-serif);
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 0.35rem;
}
.elg-author-box .wp-block-post-author__bio {
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
}

/* ===== Articulos relacionados ===== */
.elg-related {
	margin-bottom: 3rem;
}
.elg-related .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
.elg-related .elg-rel-card h3,
.elg-related .elg-rel-card .wp-block-post-title {
	font-family: var(--elg-serif);
	font-size: 1.05rem;
	line-height: 1.35;
	margin: 0.75rem 0 0.4rem;
}
.elg-related .elg-rel-card h3 a,
.elg-related .elg-rel-card .wp-block-post-title a {
	text-decoration: none;
}
.elg-related .elg-rel-card .wp-block-post-date {
	font-family: var(--elg-sans);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--elg-muted);
}
.elg-related .elg-rel-card .wp-block-post-excerpt p {
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--elg-muted);
	margin: 0.5rem 0 0;
}

/* ===== Responsive ===== */
@media (max-width: 781px) {
	.elg-related .wp-block-post-template {
		grid-template-columns: 1fr;
	}
	.elg-article-columns .wp-block-column:last-child {
		border-left: none;
		padding-left: 0;
	}
}
