/*
Theme Name: Arriba Cyan
Theme URI: https://arribamichoacan.com/
Author: Luis Fernando Gutiérrez Villaseñor · PurepechApps
Author URI: https://purepechapps.com/
Description: Tema de noticias para Arriba Michoacán. Diseño moderno en blanco y cyan: portada editorial, notas destacadas, secciones, agenda y boletín. Noticias con identidad purépecha.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: arriba
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, sticky-post, threaded-comments
*/

/* ---------- Tokens ---------- */
:root {
	--am-accent: #22D3EE;          /* cyan brillante: solo rellenos, nunca texto */
	--am-cyan-text: #0E7490;       /* cyan legible para texto y enlaces */
	--am-cyan-text-hover: #155E75;
	--am-cyan-50: #F7FCFD;
	--am-cyan-100: #E6F8FB;
	--am-cyan-200: #CFF5FB;
	--am-cyan-300: #BDE9F1;
	--am-cyan-400: #8FD9E6;
	--am-badge-text: #0B4F5E;
	--am-ink: #0B1F2A;
	--am-ink-2: #23404C;
	--am-muted: #47606B;
	--am-muted-2: #5A707A;
	--am-line: #E2EEF1;
	--am-line-2: #D5E7EC;
	--am-chip: #F1F8FA;
	--am-white: #FFFFFF;
	--am-radius: 20px;
	--am-radius-sm: 12px;
	--am-shadow: 0 1px 2px rgba(11, 31, 42, .04), 0 8px 24px rgba(11, 31, 42, .05);
	--am-font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
	--am-font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--am-max: 1240px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--am-white);
	color: var(--am-ink);
	font-family: var(--am-font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--am-cyan-text); text-decoration: none; }
a:hover { color: var(--am-cyan-text-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--am-cyan-text);
	outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--am-font-display); letter-spacing: -0.02em; line-height: 1.15; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto;
	display: block; left: 8px; top: 8px; z-index: 100000;
	padding: 12px 20px; background: var(--am-ink); color: var(--am-white); border-radius: 8px;
}

.am-container { max-width: var(--am-max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.am-main { padding-top: 40px; }

/* ---------- Barra superior ---------- */
.am-topbar { border-bottom: 1px solid var(--am-line); background: var(--am-cyan-50); }
.am-topbar__inner {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
	gap: 8px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; color: var(--am-muted);
}
.am-topbar__place { display: flex; align-items: center; gap: 8px; }
.am-topbar__tag { font-weight: 600; color: var(--am-cyan-text); }
.am-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--am-accent); flex-shrink: 0; }

/* ---------- Encabezado ---------- */
.am-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--am-line);
}
.admin-bar .am-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .am-header { top: 0; } }
.am-header__row {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px; padding-top: 16px; padding-bottom: 16px;
}
.am-brand { display: flex; align-items: center; gap: 12px; color: var(--am-ink); }
.am-brand:hover { color: var(--am-ink); }
.am-brand__mark {
	width: 44px; height: 44px; border-radius: var(--am-radius-sm); background: var(--am-accent);
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.am-brand .custom-logo { width: auto; max-height: 44px; display: block; }
.am-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.am-brand__name { font-family: var(--am-font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.am-brand__tagline { font-size: 12px; color: var(--am-muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.am-header__actions { display: flex; align-items: center; gap: 8px; }

.am-icon-btn {
	width: 44px; height: 44px; border-radius: var(--am-radius-sm);
	border: 1px solid var(--am-line-2); background: var(--am-white);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--am-ink);
}
.am-icon-btn:hover { background: var(--am-cyan-50); }

.am-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: var(--am-radius-sm); border: 0;
	font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.am-btn--accent { background: var(--am-accent); color: var(--am-ink); }
.am-btn--accent:hover { color: var(--am-ink); filter: brightness(.95); }
.am-btn--dark { background: var(--am-ink); color: var(--am-white); }
.am-btn--dark:hover { color: var(--am-white); background: var(--am-ink-2); }

/* Buscador desplegable */
.am-search-panel { border-top: 1px solid var(--am-line); background: var(--am-white); }
.am-search-panel[hidden] { display: none; }
.am-search-panel__inner { padding-top: 16px; padding-bottom: 16px; }
.am-searchform { display: flex; flex-wrap: wrap; gap: 10px; }
.am-searchform input[type="search"] {
	flex: 1 1 240px; height: 48px; padding: 0 16px; border-radius: var(--am-radius-sm);
	border: 1px solid var(--am-cyan-400); font: inherit; font-size: 16px; color: var(--am-ink); background: var(--am-white);
}

/* Navegación de secciones */
.am-nav { padding-bottom: 12px; }
.am-nav__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; gap: 6px; overflow-x: auto; white-space: nowrap;
	scrollbar-width: none; font-size: 15px; font-weight: 600;
}
.am-nav__list::-webkit-scrollbar { display: none; }
.am-nav__list li { flex-shrink: 0; }
.am-nav__list a {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
	color: var(--am-ink-2); background: var(--am-chip);
}
.am-nav__list a:hover { background: var(--am-cyan-200); color: var(--am-ink); }
.am-nav__list .current-menu-item > a,
.am-nav__list .current-cat > a,
.am-nav__list .is-active > a { background: var(--am-ink); color: var(--am-white); }
.am-nav__list .sub-menu { display: none; }

/* ---------- Etiquetas y meta ---------- */
.am-badge {
	display: inline-block; padding: 4px 10px; border-radius: 999px;
	background: var(--am-cyan-200); color: var(--am-badge-text);
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4;
}
a.am-badge:hover { color: var(--am-ink); background: var(--am-cyan-300); }
.am-meta { color: var(--am-muted-2); font-size: 13px; }
.am-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--am-cyan-text); }

.am-placeholder {
	background: var(--am-cyan-100); display: flex; align-items: center; justify-content: center;
	color: var(--am-cyan-text); width: 100%; height: 100%;
}
.am-placeholder svg { opacity: .55; }

/* ---------- Portada ---------- */
.am-hero { display: flex; flex-wrap: wrap; gap: 32px; }
.am-hero__lead { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.am-hero__media { display: block; aspect-ratio: 16 / 9; border-radius: var(--am-radius); overflow: hidden; }
.am-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.am-hero__media:hover img { transform: scale(1.02); }
.am-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.am-hero__title { margin: 0; font-weight: 800; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -0.025em; }
.am-hero__title a { color: var(--am-ink); }
.am-hero__title a:hover { color: var(--am-cyan-text-hover); }
.am-hero__dek { margin: 0; font-size: 19px; color: #3A525C; max-width: 720px; }
.am-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-height: 44px; align-self: flex-start; }

.am-latest { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.am-latest__head {
	display: flex; align-items: center; justify-content: space-between;
	padding-bottom: 12px; border-bottom: 2px solid var(--am-ink);
}
.am-latest__head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.am-live { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--am-cyan-text); }
.am-latest__list { list-style: none; margin: 0; padding: 0; }
.am-latest__item a { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--am-line); color: var(--am-ink); }
.am-latest__item a:hover .am-latest__title { color: var(--am-cyan-text-hover); }
.am-latest__num { font-family: var(--am-font-display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--am-cyan-text); min-width: 32px; }
.am-latest__body { display: flex; flex-direction: column; gap: 4px; }
.am-latest__cat { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--am-cyan-text); }
.am-latest__title { font-weight: 600; font-size: 16px; line-height: 1.35; }

.am-section { margin-top: 72px; }
.am-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.am-section__title { margin: 4px 0 0; font-size: 36px; font-weight: 800; }
.am-section__title--sm { font-size: 28px; margin: 0 0 20px; }

/* Tarjetas */
.am-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.am-grid--fill { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.am-card {
	display: flex; flex-direction: column; border: 1px solid var(--am-line); border-radius: var(--am-radius);
	overflow: hidden; background: var(--am-white); box-shadow: var(--am-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}
.am-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,31,42,.05), 0 14px 32px rgba(11,31,42,.08); }
.am-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.am-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.am-card__body .am-badge { align-self: flex-start; }
.am-card__title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.am-card__title a { color: var(--am-ink); }
.am-card__title a:hover { color: var(--am-cyan-text-hover); }
.am-card__excerpt { margin: 0; color: var(--am-muted); font-size: 15px; flex-grow: 1; }
.am-card__foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--am-muted-2); padding-top: 12px; border-top: 1px solid #EEF5F7; }

/* Secciones (categorías) */
.am-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.am-cats a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 18px; min-height: 44px; border-radius: 16px; border: 1px solid var(--am-line-2);
	background: var(--am-white); color: var(--am-ink); font-weight: 600;
}
.am-cats a:hover { border-color: var(--am-cyan-400); background: var(--am-cyan-50); color: var(--am-ink); }

/* Agenda */
.am-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.am-event { display: flex; gap: 16px; padding: 20px; border-radius: 18px; background: var(--am-cyan-50); border: 1px solid var(--am-line); color: var(--am-ink); }
.am-event:hover { border-color: var(--am-cyan-400); color: var(--am-ink); }
.am-event__date {
	flex-shrink: 0; width: 64px; height: 72px; border-radius: 14px; background: var(--am-white);
	border: 1px solid var(--am-cyan-300); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.am-event__month { font-size: 12px; font-weight: 700; color: var(--am-cyan-text); text-transform: uppercase; }
.am-event__day { font-family: var(--am-font-display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.am-event__body { display: flex; flex-direction: column; gap: 4px; }
.am-event__title { font-weight: 700; }
.am-event__place { font-size: 14px; color: var(--am-muted-2); }

/* Boletín */
.am-newsletter {
	margin-top: 72px; border-radius: 28px; background: var(--am-cyan-100); border: 1px solid var(--am-cyan-300);
	padding: 48px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
}
.am-newsletter__text { flex: 1 1 380px; max-width: 560px; }
.am-newsletter__text h2 { margin: 0 0 10px; font-size: 36px; font-weight: 800; line-height: 1.1; }
.am-newsletter__text p { margin: 0; color: #3A525C; font-size: 17px; }
.am-newsletter__form { flex: 1 1 360px; }
.am-newsletter__form input[type="email"],
.am-newsletter__form input[type="text"] {
	height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid #9FDCE8;
	background: var(--am-white); font: inherit; font-size: 16px; color: var(--am-ink); width: 100%;
}
.am-newsletter__form button, .am-newsletter__form input[type="submit"] {
	min-height: 52px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--am-ink); color: var(--am-white);
	font: inherit; font-weight: 700; cursor: pointer;
}
@media (max-width: 600px) { .am-newsletter { padding: 32px 22px; } .am-newsletter__text h2 { font-size: 28px; } }

/* ---------- Archivo / búsqueda ---------- */
.am-archive-head { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--am-line); }
.am-archive-head h1 { margin: 6px 0 0; font-size: clamp(32px, 4vw, 48px); font-weight: 800; }
.am-archive-head .am-archive-desc { color: var(--am-muted); font-size: 17px; max-width: 720px; margin-top: 10px; }
.am-empty { padding: 48px 0; color: var(--am-muted); font-size: 18px; }

.navigation.pagination { margin-top: 48px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nav-links .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; border-radius: var(--am-radius-sm);
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--am-line-2); color: var(--am-ink); font-weight: 600;
}
.nav-links .page-numbers.current { background: var(--am-ink); color: var(--am-white); border-color: var(--am-ink); }
.nav-links a.page-numbers:hover { background: var(--am-cyan-50); }

/* ---------- Nota individual ---------- */
.am-article { max-width: 780px; margin: 0 auto; }
.am-article__head { display: flex; flex-direction: column; gap: 16px; }
.am-article__title { margin: 0; font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1.06; letter-spacing: -0.025em; }
.am-article__dek { margin: 0; font-size: 20px; color: #3A525C; }
.am-article__byline {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 0;
	border-top: 1px solid var(--am-line); border-bottom: 1px solid var(--am-line); font-size: 14px; color: var(--am-muted);
}
.am-article__byline strong { color: var(--am-ink); }
.am-article__media { margin: 32px auto 0; max-width: 1080px; }
.am-article__media img { width: 100%; border-radius: var(--am-radius); display: block; }
.am-article__media figcaption { margin-top: 8px; font-size: 13px; color: var(--am-muted-2); text-align: center; }

.am-prose { font-size: 18px; line-height: 1.75; color: #1B323D; margin-top: 32px; }
.am-prose > * + * { margin-top: 1.1em; }
.am-prose p { margin: 0; }
.am-prose h2 { font-size: 30px; margin: 1.6em 0 .2em; color: var(--am-ink); }
.am-prose h3 { font-size: 24px; margin: 1.4em 0 .2em; color: var(--am-ink); }
.am-prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.am-prose blockquote {
	margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--am-accent);
	font-family: var(--am-font-display); font-size: 24px; line-height: 1.35; color: var(--am-ink);
}
.am-prose img { border-radius: 14px; }
.am-prose ul, .am-prose ol { padding-left: 1.3em; }
.am-prose li + li { margin-top: .4em; }
.am-prose figure { margin: 1.6em 0; }
.am-prose figcaption, .wp-caption-text { font-size: 13px; color: var(--am-muted-2); margin-top: 8px; text-align: center; }
.am-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.am-prose th, .am-prose td { border: 1px solid var(--am-line); padding: 10px 12px; text-align: left; }
.am-prose th { background: var(--am-cyan-50); }
.am-prose pre { background: var(--am-cyan-50); padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 15px; }
.am-prose .alignwide { max-width: 1080px; margin-left: 50%; transform: translateX(-50%); width: min(1080px, 100vw - 48px); }
.am-prose .alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky, .gallery-caption, .bypostauthor { }

.am-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.am-tags a { padding: 6px 12px; border-radius: 999px; background: var(--am-chip); color: var(--am-ink-2); font-size: 14px; font-weight: 600; }
.am-tags a:hover { background: var(--am-cyan-200); color: var(--am-ink); }

.am-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--am-line); }
.am-share__label { font-weight: 700; margin-right: 4px; }
.am-share a {
	min-height: 44px; padding: 0 16px; border-radius: var(--am-radius-sm); border: 1px solid var(--am-line-2);
	display: inline-flex; align-items: center; gap: 8px; color: var(--am-ink); font-weight: 600; font-size: 14px;
}
.am-share a:hover { background: var(--am-cyan-50); color: var(--am-ink); }

/* Páginas */
.am-page { max-width: 780px; margin: 0 auto; }
.am-page h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin: 0; }

/* ---------- Comentarios ---------- */
.am-comments { max-width: 780px; margin: 64px auto 0; }
.am-comments h2 { font-size: 26px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; padding-left: 24px; border-left: 2px solid var(--am-line); }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--am-line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: 13px; margin: 4px 0 8px; }
.comment-metadata a { color: var(--am-muted-2); }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border-radius: var(--am-radius-sm); border: 1px solid var(--am-line-2); font: inherit; color: var(--am-ink);
}
.comment-form .submit {
	min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--am-radius-sm);
	background: var(--am-ink); color: var(--am-white); font: inherit; font-weight: 700; cursor: pointer;
}

/* ---------- Pie ---------- */
.am-footer { margin-top: 80px; border-top: 1px solid var(--am-line); }
.am-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.am-footer__brand { display: flex; flex-direction: column; gap: 6px; }
.am-footer__name { font-family: var(--am-font-display); font-weight: 800; font-size: 22px; }
.am-footer__brand span { color: var(--am-muted); font-size: 14px; }
.am-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; font-weight: 600; }
.am-footer__menu a { min-height: 44px; display: inline-flex; align-items: center; }
.am-footer__bar { height: 6px; background: var(--am-accent); }

/* 404 */
.am-404 { text-align: center; padding: 48px 0; }
.am-404 h1 { font-size: clamp(40px, 6vw, 72px); margin: 0 0 12px; }
.am-404 p { color: var(--am-muted); font-size: 18px; }
.am-404 .am-searchform { max-width: 560px; margin: 24px auto 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
