/*
Theme Name: xelmundo
Theme URI: https://xelmundo.com.ar/blog/
Author: xelmundo
Author URI: https://xelmundo.com.ar/
Description: Tema del blog Inspiración de xelmundo: mismos colores, tipografías y navegación que xelmundo.com.ar.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xelmundo
*/

:root {
	--xm-turq: #00C5D5;
	--xm-turq-dark: #009AAA;
	--xm-navy: #1F2A30;
	--xm-navy-deep: #141C21;
	--xm-gris: #6B7C85;
	--xm-claro: #E6F2F4;
	--xm-crema: #F7FAFB;
	--xm-borde: #D4E8EC;
	--xm-playfair: 'Playfair Display', Georgia, serif;
	--xm-ancho: 1180px;
	--xm-gutter: 20px;
}

body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
.xm-main { padding-bottom: 72px; }

/* ── Botón ─────────────────────────────────────────── */
.xm-btn {
	display: inline-block;
	background: var(--xm-turq);
	color: var(--xm-navy) !important;
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none !important;
	padding: 0.65em 1.4em;
	border-radius: 999px;
	transition: background .2s, color .2s, transform .2s;
	white-space: nowrap;
}
.xm-btn:hover { background: #fff; transform: translateY(-1px); }

/* ── Encabezado ────────────────────────────────────── */
.xm-nav {
	position: sticky; top: 0; z-index: 50;
	background: rgba(31, 42, 48, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(0, 197, 213, 0.18);
}
body.admin-bar .xm-nav { top: 32px; }
.xm-nav-in {
	max-width: var(--xm-ancho); margin: 0 auto;
	padding: 14px var(--xm-gutter);
	display: flex; align-items: center; gap: 28px;
}
.xm-logo img { display: block; height: 34px; width: auto; }
.xm-links { display: flex; gap: 24px; margin-left: auto; }
.xm-links a {
	color: rgba(255, 255, 255, 0.78); text-decoration: none; font-weight: 600; font-size: 0.92rem;
	padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.xm-links a:hover { color: #fff; }
.xm-links a.activo { color: var(--xm-turq); border-bottom-color: var(--xm-turq); }

/* ── Hero (azul con brillo turquesa) ───────────────── */
.xm-hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(ellipse 60% 70% at 50% 0%, rgba(0, 197, 213, 0.28), transparent 70%),
		radial-gradient(ellipse 40% 50% at 90% 100%, rgba(0, 197, 213, 0.10), transparent 70%),
		var(--xm-navy);
	color: #fff;
	text-align: center;
	padding: 84px var(--xm-gutter) 96px;
	margin: 0 !important;
}
.xm-hero > * { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.xm-hero-eyebrow, .xm-hero .xm-hero-eyebrow a {
	color: var(--xm-turq) !important; font-size: 0.78rem !important; font-weight: 700;
	letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none !important; margin: 0 auto 14px !important;
}
.xm-hero-titulo, .xm-hero h1 {
	font-family: var(--xm-playfair); color: #fff !important;
	font-size: clamp(2.1rem, 5.2vw, 3.4rem) !important; line-height: 1.12 !important; margin: 0 auto 16px !important;
}
.xm-hero-titulo em { font-style: italic; color: var(--xm-turq); font-weight: 600; }
.xm-hero-sub, .xm-hero-sub p {
	color: rgba(255, 255, 255, 0.72); font-size: 1.1rem; line-height: 1.6; margin: 0 auto !important; max-width: 560px;
}
.xm-hero-fecha { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; font-weight: 600; }
.xm-hero-chico { padding: 64px var(--xm-gutter) 72px; }
.xm-hero .xm-btn { margin-top: 24px; }

/* ── Grilla de notas ───────────────────────────────── */
.xm-grilla {
	max-width: var(--xm-ancho) !important;
	margin: -44px auto 0 !important;
	padding: 0 var(--xm-gutter);
	position: relative; z-index: 2;
}
.xm-grilla .wp-block-post-template { gap: 24px !important; margin: 0; padding: 0; }
.xm-card {
	height: 100%;
	background: #fff;
	border: 1.5px solid var(--xm-borde);
	border-radius: 18px;
	overflow: hidden;
	display: flex; flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
	box-shadow: 0 2px 10px rgba(31, 42, 48, 0.04);
}
.xm-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(31, 42, 48, 0.12); border-color: rgba(0, 197, 213, 0.45); }
.xm-card > * { margin: 0 !important; }
.xm-card-img { border-radius: 0 !important; background: var(--xm-claro); }
.xm-card-img img { border-radius: 0 !important; transition: transform .5s ease; }
.xm-card:hover .xm-card-img img { transform: scale(1.04); }
.xm-card-img a { display: block; overflow: hidden; }
.xm-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.xm-card-body > * { margin: 0 !important; }
.xm-eyebrow, .xm-eyebrow a {
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--xm-turq-dark) !important; text-decoration: none !important;
}
.xm-card-titulo { font-size: 1.35rem !important; line-height: 1.25 !important; }
.xm-card-titulo a { color: var(--xm-navy) !important; text-decoration: none !important; }
.xm-card-titulo a:hover { color: var(--xm-turq-dark) !important; }
.xm-card-extracto p { color: var(--xm-gris); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.xm-fecha { color: var(--xm-gris); font-size: 0.8rem; font-weight: 600; margin-top: auto !important; padding-top: 6px; }

/* Primera nota de la portada: tarjeta grande en dos columnas */
@media (min-width: 900px) {
	.home .xm-grilla .wp-block-post-template > li:first-child,
	.blog .xm-grilla .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
	.home .xm-grilla li:first-child .xm-card,
	.blog .xm-grilla li:first-child .xm-card { flex-direction: row; }
	.home .xm-grilla li:first-child .xm-card-img,
	.blog .xm-grilla li:first-child .xm-card-img { flex: 1.3; aspect-ratio: auto !important; min-height: 360px; }
	.home .xm-grilla li:first-child .xm-card-img a,
	.blog .xm-grilla li:first-child .xm-card-img a,
	.home .xm-grilla li:first-child .xm-card-img img,
	.blog .xm-grilla li:first-child .xm-card-img img { height: 100% !important; }
	.home .xm-grilla li:first-child .xm-card-body,
	.blog .xm-grilla li:first-child .xm-card-body { flex: 1; padding: 40px; justify-content: center; }
	.home .xm-grilla li:first-child .xm-card-titulo,
	.blog .xm-grilla li:first-child .xm-card-titulo { font-size: 2.1rem !important; }
	.home .xm-grilla li:first-child .xm-fecha,
	.blog .xm-grilla li:first-child .xm-fecha { margin-top: 8px !important; }
}

.xm-paginacion { margin-top: 48px !important; gap: 8px; font-weight: 600; }
.xm-paginacion a, .xm-paginacion .page-numbers {
	text-decoration: none; color: var(--xm-navy); padding: 8px 14px; border-radius: 999px;
}
.xm-paginacion a:hover { background: var(--xm-claro); }
.xm-paginacion .current { background: var(--xm-turq); color: var(--xm-navy); }
.xm-vacio {
	background: #fff; border: 1.5px dashed var(--xm-borde); border-radius: 18px;
	padding: 48px 24px; color: var(--xm-gris);
}

/* ── Nota individual ───────────────────────────────── */
.xm-hero-nota { padding-bottom: 150px; }
.xm-nota-portada {
	max-width: 1000px !important; margin: -110px auto 0 !important;
	padding: 0 var(--xm-gutter); position: relative; z-index: 2;
}
.xm-nota-portada img { border-radius: 20px !important; box-shadow: 0 24px 60px rgba(20, 28, 33, 0.25); }
.xm-nota-contenido {
	padding: 48px var(--xm-gutter) 0 !important;
	font-size: 1.1rem; line-height: 1.8;
}
.xm-nota-contenido > p:first-child::first-letter {
	font-family: var(--xm-playfair); font-weight: 700; float: left;
	font-size: 3.6em; line-height: 0.9; margin: 6px 10px 0 0; color: var(--xm-turq-dark);
}
.xm-nota-contenido h2 { margin-top: 2em; }
.xm-nota-contenido h2::after {
	content: ''; display: block; width: 44px; height: 3px; background: var(--xm-turq); border-radius: 2px; margin-top: 12px;
}
.xm-nota-contenido figure.wp-block-image { margin-top: 2em; margin-bottom: 2em; }
.xm-nota-contenido .alignwide { max-width: 1000px; }
.xm-nota-contenido ul li::marker, .xm-nota-contenido ol li::marker { color: var(--xm-turq-dark); font-weight: 700; }
.xm-nota-final { padding: 56px var(--xm-gutter) 0 !important; }

/* ── Invitación a la app ───────────────────────────── */
.xm-cta {
	display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
	background:
		radial-gradient(ellipse 80% 120% at 0% 0%, rgba(0, 197, 213, 0.25), transparent 60%),
		var(--xm-navy);
	color: #fff; border-radius: 22px; padding: 28px 30px;
}
.xm-cta-icono { width: 64px; height: 64px; flex-shrink: 0; }
.xm-cta-texto { flex: 1; min-width: 220px; }
.xm-cta p { margin: 0; }
.xm-cta-eyebrow { color: var(--xm-turq); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.xm-cta-titulo { font-family: var(--xm-playfair); font-size: 1.55rem; font-weight: 700; line-height: 1.25; margin-top: 4px !important; }
.xm-cta-titulo em { color: var(--xm-turq); }
.xm-cta-sub { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; line-height: 1.5; margin-top: 6px !important; }
.xm-cta-botones { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.xm-pronto { color: rgba(255, 255, 255, 0.55); font-size: 0.78rem; font-weight: 600; }
.xm-volver { text-align: center; margin-top: 32px !important; }
.xm-volver a { text-decoration: none; }

/* ── Pie ───────────────────────────────────────────── */
.xm-footer { background: var(--xm-navy-deep); color: rgba(255, 255, 255, 0.7); padding: 56px var(--xm-gutter) 28px; }
.xm-footer-in {
	max-width: var(--xm-ancho); margin: 0 auto;
	display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.xm-footer-marca { max-width: 320px; }
.xm-footer-marca img { height: 30px; width: auto; display: block; }
.xm-footer-marca p { font-size: 0.92rem; line-height: 1.6; margin: 14px 0 0; }
.xm-footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 40px; align-content: start; }
.xm-footer-links a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.xm-footer-links a:hover { color: var(--xm-turq); }
.xm-copy {
	max-width: var(--xm-ancho); margin: 40px auto 0; padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.82rem; color: rgba(255, 255, 255, 0.45);
}

/* ── Celular ───────────────────────────────────────── */
@media (max-width: 781px) {
	body.admin-bar .xm-nav { top: 46px; }
	.xm-nav-in { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; padding-bottom: 0; }
	.xm-logo img { height: 28px; }
	.xm-nav-in .xm-btn { margin-left: auto; padding: 0.5em 1.1em; font-size: 0.85rem; }
	.xm-links {
		order: 3; width: 100%; margin: 0; gap: 20px;
		overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
	}
	.xm-links::-webkit-scrollbar { display: none; }
	.xm-links a { padding: 8px 0 10px; white-space: nowrap; }
	.xm-hero { padding: 56px var(--xm-gutter) 80px; }
	.xm-hero-nota { padding-bottom: 110px; }
	.xm-nota-portada { margin-top: -80px !important; }
	.xm-nota-contenido { font-size: 1.05rem; padding-top: 36px !important; }
	.xm-cta { padding: 24px; text-align: center; justify-content: center; }
	.xm-cta-botones { width: 100%; }
	.xm-footer-links { grid-template-columns: 1fr 1fr; gap: 10px 20px; }
}
@media (max-width: 640px) {
	.xm-grilla .wp-block-post-template { grid-template-columns: 1fr !important; }
}
@media (min-width: 641px) and (max-width: 999px) {
	.xm-grilla .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 1000px) {
	.xm-grilla .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
