/*
Theme Name: CMMD Central 2026
Theme URI: https://cmmd.online/
Author: Maya Comunicación
Author URI: https://mayacomunicacion.com.mx/
Description: Tema institucional y editorial para la Central Mexicana de Medios Digitales. Portada modular, red de medios, membresías, equipo estratégico y sala de prensa.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: cmmd-central
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --cmmd-ink: #07191d;
  --cmmd-night: #0b2529;
  --cmmd-night-2: #10343a;
  --cmmd-teal: #16b8a6;
  --cmmd-teal-dark: #0b8f82;
  --cmmd-green: #7bd66f;
  --cmmd-gold: #d8b267;
  --cmmd-paper: #f4f7f5;
  --cmmd-white: #ffffff;
  --cmmd-muted: #607176;
  --cmmd-line: #dce6e3;
  --cmmd-danger: #a83b3b;
  --cmmd-radius: 20px;
  --cmmd-radius-sm: 12px;
  --cmmd-shadow: 0 18px 50px rgba(4, 28, 31, .12);
  --cmmd-container: 1320px;
  --cmmd-serif: Georgia, 'Times New Roman', serif;
  --cmmd-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cmmd-ink);
  background: var(--cmmd-paper);
  font-family: var(--cmmd-sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--cmmd-teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cmmd-ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto !important; width: auto; height: auto; top: 10px; left: 10px; z-index: 9999;
  padding: 10px 14px; background: var(--cmmd-white); color: var(--cmmd-ink); border-radius: 8px;
}
.container { width: min(calc(100% - 32px), var(--cmmd-container)); margin-inline: auto; }
.narrow { width: min(calc(100% - 32px), 860px); margin-inline: auto; }
.section { padding: 84px 0; }
.section--tight { padding: 52px 0; }
.section--dark { background: var(--cmmd-night); color: var(--cmmd-white); }
.section--white { background: var(--cmmd-white); }
.section-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px;
  color: var(--cmmd-teal-dark); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}
.section-kicker::before { content: ''; width: 34px; height: 3px; border-radius: 3px; background: var(--cmmd-teal); }
.section--dark .section-kicker { color: var(--cmmd-green); }
.section-title {
  margin: 0; font-family: var(--cmmd-serif); font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.03; letter-spacing: -.035em;
}
.section-intro { max-width: 760px; margin: 18px 0 0; color: var(--cmmd-muted); font-size: 1.08rem; }
.section--dark .section-intro { color: rgba(255,255,255,.73); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }

.topbar { background: #041316; color: rgba(255,255,255,.72); font-size: .78rem; }
.topbar__inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar a { color: rgba(255,255,255,.82); text-decoration: none; }
.topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar__links ul { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(11,37,41,.97); color: var(--cmmd-white);
  border-bottom: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(14px);
  transition: transform .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 35px rgba(0,0,0,.18); }
.header-main { min-height: 82px; display: flex; align-items: center; gap: 24px; }
.site-branding { flex: 0 0 auto; }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo { width: auto; max-height: 58px; }
.brand-fallback { display: flex; align-items: center; gap: 12px; color: var(--cmmd-white); text-decoration: none; }
.brand-fallback img { width: 50px; height: 50px; }
.brand-fallback__text { display: grid; line-height: 1.05; }
.brand-fallback__name { font-family: var(--cmmd-serif); font-size: 1rem; font-weight: 700; }
.brand-fallback__tagline { margin-top: 5px; color: var(--cmmd-green); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.main-navigation { margin-left: auto; }
.main-navigation ul { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.main-navigation a {
  display: block; padding: 11px 12px; color: rgba(255,255,255,.86); font-size: .88rem; font-weight: 700; text-decoration: none; border-radius: 9px;
}
.main-navigation a:hover, .main-navigation .current-menu-item > a, .main-navigation .current_page_item > a { color: var(--cmmd-white); background: rgba(255,255,255,.08); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle, .search-toggle {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%; background: transparent; color: var(--cmmd-white);
}
.menu-toggle { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 20px;
  border: 1px solid transparent; border-radius: 999px; background: var(--cmmd-teal); color: #031819;
  font-weight: 850; font-size: .9rem; text-decoration: none; box-shadow: none; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { color: #031819; background: var(--cmmd-green); transform: translateY(-2px); }
.btn--outline { border-color: rgba(255,255,255,.32); background: transparent; color: var(--cmmd-white); }
.btn--outline:hover { background: var(--cmmd-white); color: var(--cmmd-ink); }
.btn--dark { background: var(--cmmd-night); color: var(--cmmd-white); }
.btn--dark:hover { background: var(--cmmd-teal-dark); color: var(--cmmd-white); }
.btn--ghost { border-color: var(--cmmd-line); background: var(--cmmd-white); color: var(--cmmd-ink); }
.btn--ghost:hover { background: var(--cmmd-paper); color: var(--cmmd-ink); }
.search-panel { display: none; padding: 14px 0 18px; border-top: 1px solid rgba(255,255,255,.08); }
.search-panel.is-open { display: block; }

.category-navigation { border-top: 1px solid rgba(255,255,255,.08); background: #082025; }
.category-navigation .container { overflow-x: auto; scrollbar-width: none; }
.category-navigation .container::-webkit-scrollbar { display: none; }
.category-navigation ul { display: flex; align-items: center; gap: 4px; min-width: max-content; margin: 0; padding: 0; list-style: none; }
.category-navigation a { display: block; padding: 10px 12px; color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; text-decoration: none; }
.category-navigation a:hover, .category-navigation .current-menu-item > a, .category-navigation .current-cat > a { color: var(--cmmd-green); }

.search-form { display: flex; gap: 10px; }
.search-field { width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid var(--cmmd-line); border-radius: 999px; background: var(--cmmd-white); }
.search-submit { padding: 0 22px; border: 0; border-radius: 999px; background: var(--cmmd-teal); color: var(--cmmd-ink); font-weight: 800; }

.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 690px; display: grid; align-items: center;
  background:
    radial-gradient(circle at 83% 18%, rgba(22,184,166,.28), transparent 29%),
    radial-gradient(circle at 70% 80%, rgba(123,214,111,.14), transparent 25%),
    linear-gradient(135deg, #06181b 0%, #0b2d32 58%, #0e3c40 100%);
  color: var(--cmmd-white);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(to right, transparent 7%, #000 55%, #000 100%);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 70px; align-items: center; padding: 94px 0 102px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--cmmd-green); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.hero__eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--cmmd-green); box-shadow: 0 0 0 7px rgba(123,214,111,.12); }
.hero h1 { max-width: 860px; margin: 24px 0; font-family: var(--cmmd-serif); font-size: clamp(3rem, 6.2vw, 6.3rem); line-height: .95; letter-spacing: -.055em; }
.hero__lead { max-width: 720px; margin: 0; color: rgba(255,255,255,.78); font-size: clamp(1.05rem, 1.7vw, 1.3rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__visual { position: relative; min-height: 480px; display: grid; place-items: center; }
.hero__orbit { position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; animation: cmmd-spin 38s linear infinite; }
.hero__orbit--one { width: 410px; height: 410px; }
.hero__orbit--two { width: 310px; height: 310px; animation-direction: reverse; animation-duration: 27s; }
.hero__orbit span { position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--cmmd-teal); box-shadow: 0 0 22px var(--cmmd-teal); }
.hero__mark { position: relative; width: min(290px, 70vw); filter: drop-shadow(0 25px 45px rgba(0,0,0,.35)); }
.hero__badge {
  position: absolute; right: 0; bottom: 35px; max-width: 210px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px; background: rgba(6,24,27,.72); backdrop-filter: blur(15px); font-size: .82rem; color: rgba(255,255,255,.76);
}
.hero__badge strong { display: block; color: var(--cmmd-white); font-size: 1.05rem; }
@keyframes cmmd-spin { to { transform: rotate(360deg); } }

.stats-strip { margin-top: -46px; position: relative; z-index: 4; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border-radius: var(--cmmd-radius); background: var(--cmmd-white); box-shadow: var(--cmmd-shadow); }
.stat { padding: 27px 30px; border-right: 1px solid var(--cmmd-line); }
.stat:last-child { border-right: 0; }
.stat__value { display: block; color: var(--cmmd-teal-dark); font-family: var(--cmmd-serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1; }
.stat__label { display: block; margin-top: 7px; color: var(--cmmd-muted); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }

.news-feature-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.feature-card { position: relative; min-height: 570px; overflow: hidden; border-radius: var(--cmmd-radius); background: var(--cmmd-night); color: var(--cmmd-white); box-shadow: var(--cmmd-shadow); }
.feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,18,20,.96), rgba(3,18,20,.05) 68%); }
.feature-card__content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 38px; }
.feature-card h2 { margin: 12px 0 12px; font-family: var(--cmmd-serif); font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.02; }
.feature-card a { color: var(--cmmd-white); text-decoration: none; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.story-card { overflow: hidden; border-radius: var(--cmmd-radius-sm); background: var(--cmmd-white); box-shadow: 0 10px 30px rgba(4,28,31,.08); }
.story-card__image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #dfe9e6; }
.story-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.story-card:hover img { transform: scale(1.04); }
.story-card__body { padding: 17px 18px 20px; }
.story-card h3 { margin: 8px 0; font-family: var(--cmmd-serif); font-size: 1.2rem; line-height: 1.17; }
.story-card h3 a { color: var(--cmmd-ink); text-decoration: none; }
.story-card h3 a:hover { color: var(--cmmd-teal-dark); }
.story-card__excerpt { margin: 8px 0 0; color: var(--cmmd-muted); font-size: .88rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--cmmd-muted); font-size: .75rem; }
.section--dark .meta { color: rgba(255,255,255,.65); }
.category-badge {
  display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(22,184,166,.12); color: var(--cmmd-teal-dark);
  font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.feature-card .category-badge { background: var(--cmmd-teal); color: var(--cmmd-ink); }

.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pillar-card { min-height: 255px; padding: 28px; border: 1px solid rgba(255,255,255,.11); border-radius: var(--cmmd-radius); background: rgba(255,255,255,.045); }
.pillar-card__icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 14px; background: rgba(22,184,166,.15); color: var(--cmmd-green); font-size: 1.4rem; }
.pillar-card h3 { margin: 0 0 10px; font-family: var(--cmmd-serif); font-size: 1.45rem; }
.pillar-card p { margin: 0; color: rgba(255,255,255,.68); font-size: .94rem; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-grid .story-card { height: 100%; }
.news-grid .story-card__body { padding: 22px; }
.news-grid .story-card h3 { font-size: 1.45rem; }

.network-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.network-card {
  display: flex; align-items: center; gap: 18px; min-height: 132px; padding: 23px; border: 1px solid var(--cmmd-line); border-radius: 17px;
  background: var(--cmmd-white); color: var(--cmmd-ink); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.network-card:hover { transform: translateY(-4px); border-color: var(--cmmd-teal); box-shadow: 0 15px 35px rgba(4,28,31,.09); color: var(--cmmd-ink); }
.network-card__logo { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: var(--cmmd-night); color: var(--cmmd-white); font-family: var(--cmmd-serif); font-size: 1.25rem; font-weight: 800; }
.network-card__logo img { width: 100%; height: 100%; object-fit: contain; background: var(--cmmd-white); }
.network-card h3 { margin: 0; font-size: 1rem; }
.network-card p { margin: 5px 0 0; color: var(--cmmd-muted); font-size: .8rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; margin-top: 42px; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 32px; border-radius: var(--cmmd-radius); background: var(--cmmd-white); color: var(--cmmd-ink); box-shadow: 0 15px 44px rgba(0,0,0,.13); }
.price-card--featured { transform: translateY(-14px); border: 2px solid var(--cmmd-teal); }
.price-card__tag { position: absolute; top: 18px; right: 18px; padding: 5px 9px; border-radius: 99px; background: var(--cmmd-gold); color: #39270a; font-size: .67rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.price-card h3 { margin: 0; font-family: var(--cmmd-serif); font-size: 2rem; }
.price-card__audience { color: var(--cmmd-muted); font-size: .88rem; }
.price-card__price { margin: 22px 0; font-family: var(--cmmd-serif); font-size: 2.8rem; font-weight: 800; line-height: 1; }
.price-card__price small { font-family: var(--cmmd-sans); font-size: .75rem; font-weight: 700; color: var(--cmmd-muted); }
.price-card ul { display: grid; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.price-card li { position: relative; padding-left: 25px; font-size: .9rem; }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--cmmd-teal-dark); font-weight: 900; }
.price-card .btn { margin-top: auto; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.team-card { overflow: hidden; border-radius: var(--cmmd-radius); background: var(--cmmd-white); box-shadow: 0 10px 32px rgba(4,28,31,.08); }
.team-card__photo { aspect-ratio: 4 / 4.4; background: linear-gradient(145deg, var(--cmmd-night), var(--cmmd-teal-dark)); overflow: hidden; }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__body { padding: 22px; }
.team-card h3 { margin: 0; font-family: var(--cmmd-serif); font-size: 1.35rem; }
.team-card__role { margin-top: 6px; color: var(--cmmd-teal-dark); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.team-card p { margin: 12px 0 0; color: var(--cmmd-muted); font-size: .88rem; }

.cta-band { position: relative; overflow: hidden; padding: 65px 0; background: var(--cmmd-teal); color: #032021; }
.cta-band::after { content: ''; position: absolute; width: 330px; height: 330px; right: -100px; top: -120px; border: 60px solid rgba(255,255,255,.13); border-radius: 50%; }
.cta-band__inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.cta-band h2 { max-width: 780px; margin: 0; font-family: var(--cmmd-serif); font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.02; }
.cta-band p { max-width: 720px; margin: 14px 0 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.page-hero { padding: 90px 0 70px; background: linear-gradient(135deg, #06181b, #104047); color: var(--cmmd-white); }
.page-hero__crumbs { margin-bottom: 18px; color: rgba(255,255,255,.58); font-size: .8rem; }
.page-hero__crumbs a { color: rgba(255,255,255,.75); }
.page-hero h1 { max-width: 980px; margin: 0; font-family: var(--cmmd-serif); font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: .97; letter-spacing: -.045em; }
.page-hero p { max-width: 760px; margin: 22px 0 0; color: rgba(255,255,255,.74); font-size: 1.1rem; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 55px; padding: 70px 0; }
.entry-content { min-width: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--cmmd-serif); line-height: 1.12; }
.entry-content h2 { margin-top: 1.8em; font-size: 2.2rem; }
.entry-content h3 { margin-top: 1.6em; font-size: 1.55rem; }
.entry-content p, .entry-content li { color: #26383c; }
.entry-content blockquote { margin: 35px 0; padding: 26px 28px; border-left: 4px solid var(--cmmd-teal); background: var(--cmmd-white); font-family: var(--cmmd-serif); font-size: 1.3rem; }
.entry-content img { border-radius: 14px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--cmmd-line); text-align: left; }
.wp-caption, .gallery-caption { max-width: 100%; }
.alignwide { width: min(1100px, 100%); max-width: 1100px; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.sidebar { display: grid; align-content: start; gap: 22px; }
.widget { padding: 24px; border-radius: 16px; background: var(--cmmd-white); box-shadow: 0 10px 30px rgba(4,28,31,.07); }
.widget-title { margin: 0 0 16px; font-family: var(--cmmd-serif); font-size: 1.35rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--cmmd-line); }

.article-header { max-width: 980px; padding: 72px 0 34px; }
.article-header h1 { margin: 12px 0 18px; font-family: var(--cmmd-serif); font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.045em; }
.article-deck { max-width: 850px; margin: 0 0 20px; color: var(--cmmd-muted); font-size: 1.15rem; }
.article-cover { width: min(calc(100% - 32px), var(--cmmd-container)); margin: 0 auto; }
.article-cover img { width: 100%; max-height: 760px; object-fit: cover; border-radius: var(--cmmd-radius); }
.article-shell { display: grid; grid-template-columns: minmax(0, 820px) 300px; justify-content: space-between; gap: 60px; padding: 55px 0 90px; }
.author-box { display: flex; gap: 18px; margin-top: 45px; padding: 24px; border-radius: 16px; background: var(--cmmd-white); }
.author-box img { width: 70px; height: 70px; border-radius: 50%; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; }
.post-navigation a { display: block; height: 100%; padding: 20px; border-radius: 14px; background: var(--cmmd-white); color: var(--cmmd-ink); text-decoration: none; }

.archive-header { padding: 70px 0 30px; }
.archive-header h1 { margin: 0; font-family: var(--cmmd-serif); font-size: clamp(2.7rem, 5vw, 4.7rem); }
.archive-description { max-width: 760px; color: var(--cmmd-muted); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 80px; }
.pagination { margin: 40px 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { min-width: 40px; min-height: 40px; display: grid; place-items: center; padding: 6px 11px; border-radius: 9px; background: var(--cmmd-white); color: var(--cmmd-ink); text-decoration: none; }
.page-numbers.current { background: var(--cmmd-teal); }
.empty-state { padding: 70px 0; text-align: center; }
.empty-state h1 { font-family: var(--cmmd-serif); font-size: 3.5rem; }

.site-footer { background: #031416; color: rgba(255,255,255,.72); }
.footer-main { display: grid; grid-template-columns: 1.25fr .75fr .75fr 1fr; gap: 42px; padding: 70px 0 55px; }
.footer-brand p { max-width: 410px; }
.footer-title { margin: 0 0 18px; color: var(--cmmd-white); font-size: .78rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.footer-menu, .footer-list { margin: 0; padding: 0; list-style: none; }
.footer-menu li + li, .footer-list li + li { margin-top: 8px; }
.site-footer a { color: rgba(255,255,255,.76); text-decoration: none; }
.site-footer a:hover { color: var(--cmmd-green); }
.footer-bottom { padding: 18px 0 24px; border-top: 1px solid rgba(255,255,255,.09); font-size: .78rem; }
.footer-bottom__inner { display: flex; justify-content: space-between; gap: 22px; }
.back-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 45px; height: 45px; display: none; place-items: center; border: 0; border-radius: 50%; background: var(--cmmd-teal); color: var(--cmmd-ink); box-shadow: var(--cmmd-shadow); }
.back-to-top.is-visible { display: grid; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-card { padding: 30px; border-radius: var(--cmmd-radius); background: var(--cmmd-white); box-shadow: var(--cmmd-shadow); }
.contact-card h2 { margin-top: 0; }

.comments-area { margin-top: 50px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { margin-bottom: 16px; padding: 22px; background: var(--cmmd-white); border-radius: 14px; }
.comment-form input:not([type=submit]), .comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--cmmd-line); border-radius: 10px; }
.form-submit .submit { padding: 12px 22px; border: 0; border-radius: 99px; background: var(--cmmd-teal); font-weight: 800; }

@media (max-width: 1120px) {
  .header-actions .btn { display: none; }
  .main-navigation a { padding-inline: 8px; font-size: .8rem; }
  .hero__inner { gap: 30px; }
  .feature-card { min-height: 520px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-main > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .topbar__links { display: none; }
  .menu-toggle { display: inline-grid; }
  .main-navigation { position: absolute; left: 0; right: 0; top: 100%; display: none; margin: 0; padding: 12px 16px 20px; background: var(--cmmd-night); border-top: 1px solid rgba(255,255,255,.08); }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { display: grid; }
  .main-navigation a { padding: 13px 12px; }
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; padding: 78px 0 125px; }
  .hero__visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--cmmd-line); }
  .news-feature-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid, .news-grid, .network-grid, .pricing-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card--featured { transform: none; }
  .content-layout, .article-shell { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, 1fr); }
  .cta-band__inner { display: block; }
  .cta-band__actions { margin-top: 25px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :last-child { grid-column: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .narrow { width: min(calc(100% - 24px), var(--cmmd-container)); }
  .section { padding: 62px 0; }
  .section-head { display: block; }
  .section-head .btn { margin-top: 18px; }
  .topbar__inner { justify-content: center; }
  .header-main { min-height: 70px; }
  .custom-logo { max-height: 48px; max-width: 190px; }
  .brand-fallback__name { font-size: .82rem; }
  .brand-fallback__tagline { display: none; }
  .brand-fallback img { width: 42px; height: 42px; }
  .hero__inner { padding: 65px 0 108px; }
  .hero h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .hero__actions .btn { width: 100%; }
  .stats-strip { margin-top: -50px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 17px; }
  .stat__value { font-size: 2rem; }
  .feature-card { min-height: 460px; }
  .feature-card__content { padding: 24px; }
  .feature-list, .pillars-grid, .news-grid, .network-grid, .pricing-grid, .team-grid, .archive-grid, .sidebar, .contact-grid, .post-navigation { grid-template-columns: 1fr; }
  .page-hero { padding: 68px 0 52px; }
  .content-layout, .article-shell { padding: 45px 0 65px; }
  .article-header { padding: 52px 0 25px; }
  .article-cover { width: 100%; }
  .article-cover img { border-radius: 0; }
  .alignwide, .alignfull { width: 100%; margin-left: 0; transform: none; }
  .cta-band__actions .btn { width: 100%; }
  .footer-main { grid-template-columns: 1fr; padding-top: 55px; }
  .footer-bottom__inner { display: block; }
  .footer-bottom__inner > :last-child { margin-top: 8px; }
}

/* CMMD 1.1: colaboraciones, compartir y asistente FAQ */
.topbar-collaboration {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid rgba(123,214,111,.36);
  border-radius: 999px; color: var(--cmmd-green) !important; font-weight: 850; white-space: nowrap;
}
.topbar-collaboration:hover { border-color: var(--cmmd-green); background: rgba(123,214,111,.1); color: var(--cmmd-white) !important; }

.share-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 25px;
}
.share-tools--footer { margin: 38px 0 0; padding-top: 25px; border-top: 1px solid var(--cmmd-line); }
.share-tools__label { margin-right: 4px; color: var(--cmmd-muted); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.share-button {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--cmmd-line); border-radius: 999px; background: var(--cmmd-white); color: var(--cmmd-ink);
  font-size: .82rem; font-weight: 800; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.share-button > span:first-child { min-width: 20px; font-size: 1rem; font-weight: 900; text-align: center; }
.share-button:hover { transform: translateY(-2px); border-color: var(--cmmd-teal); box-shadow: 0 8px 22px rgba(4,28,31,.1); color: var(--cmmd-ink); }
.share-button--whatsapp { border-color: rgba(11,143,130,.35); }

.collaboration-callout {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 34px; padding: 28px;
  border: 1px solid rgba(22,184,166,.24); border-radius: var(--cmmd-radius); background: linear-gradient(135deg, #e7f7f3, #f8fbfa);
}
.collaboration-callout__kicker { color: var(--cmmd-teal-dark); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.collaboration-callout h2 { margin: 5px 0 7px; font-family: var(--cmmd-serif); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.08; }
.collaboration-callout p { margin: 0; color: var(--cmmd-muted); }
.collaboration-callout .btn { flex: 0 0 auto; }

.cmmd-chatbot { position: fixed; right: 20px; bottom: 20px; z-index: 1200; display: grid; justify-items: end; gap: 12px; }
.cmmd-chatbot__toggle {
  min-height: 54px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 0; border-radius: 999px;
  background: var(--cmmd-teal); color: #032021; box-shadow: 0 16px 38px rgba(4,28,31,.28); font-weight: 900;
}
.cmmd-chatbot__toggle:hover { background: var(--cmmd-green); transform: translateY(-2px); }
.cmmd-chatbot.is-open .cmmd-chatbot__toggle span { display: none; }
.cmmd-chatbot.is-open .cmmd-chatbot__toggle { width: 54px; padding: 0; justify-content: center; }
.cmmd-chatbot__panel {
  width: min(390px, calc(100vw - 28px)); max-height: min(670px, calc(100vh - 110px)); overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: var(--cmmd-white); box-shadow: 0 25px 70px rgba(0,0,0,.3);
}
.cmmd-chatbot__header {
  display: flex; justify-content: space-between; gap: 18px; padding: 20px; background: linear-gradient(135deg, #07191d, #104047); color: var(--cmmd-white);
}
.cmmd-chatbot__header strong { display: block; margin-top: 4px; font-family: var(--cmmd-serif); font-size: 1.15rem; }
.cmmd-chatbot__status { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cmmd-chatbot__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--cmmd-green); box-shadow: 0 0 0 5px rgba(123,214,111,.13); }
.cmmd-chatbot__close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: transparent; color: var(--cmmd-white); font-size: 1.45rem; line-height: 1; }
.cmmd-chatbot__body { max-height: 390px; overflow-y: auto; padding: 18px; background: #f3f7f6; }
.cmmd-chatbot__messages { display: grid; gap: 10px; }
.cmmd-chatbot__message { width: fit-content; max-width: 88%; padding: 11px 13px; border-radius: 15px; font-size: .85rem; line-height: 1.45; }
.cmmd-chatbot__message p { margin: 0; }
.cmmd-chatbot__message--bot { justify-self: start; border-bottom-left-radius: 4px; background: var(--cmmd-white); color: #24373a; box-shadow: 0 6px 18px rgba(4,28,31,.07); }
.cmmd-chatbot__message--user { justify-self: end; border-bottom-right-radius: 4px; background: var(--cmmd-teal); color: #032021; }
.cmmd-chatbot__message-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.cmmd-chatbot__message-actions a { padding: 6px 9px; border-radius: 999px; background: var(--cmmd-night); color: var(--cmmd-white); font-size: .72rem; font-weight: 800; text-decoration: none; }
.cmmd-chatbot__quick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.cmmd-chatbot__quick button { padding: 7px 10px; border: 1px solid var(--cmmd-line); border-radius: 999px; background: var(--cmmd-white); color: var(--cmmd-ink); font-size: .72rem; font-weight: 750; text-align: left; }
.cmmd-chatbot__quick button:hover { border-color: var(--cmmd-teal); background: #e7f7f3; }
.cmmd-chatbot__form { display: grid; grid-template-columns: 1fr 44px; gap: 8px; padding: 12px; border-top: 1px solid var(--cmmd-line); background: var(--cmmd-white); }
.cmmd-chatbot__form input { min-width: 0; height: 44px; padding: 8px 13px; border: 1px solid var(--cmmd-line); border-radius: 999px; outline: none; }
.cmmd-chatbot__form input:focus { border-color: var(--cmmd-teal); box-shadow: 0 0 0 3px rgba(22,184,166,.13); }
.cmmd-chatbot__form button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--cmmd-teal); color: var(--cmmd-ink); font-weight: 900; }
.cmmd-chatbot__links { display: flex; justify-content: center; gap: 18px; padding: 10px 14px 13px; background: var(--cmmd-white); font-size: .72rem; font-weight: 800; }
.cmmd-chatbot__links a { color: var(--cmmd-teal-dark); }
.back-to-top { right: 88px; }

@media (max-width: 1120px) {
  .topbar__links > span { display: none; }
}

@media (max-width: 900px) {
  .topbar__inner > span:first-child { display: none; }
  .topbar__inner { justify-content: center; padding-block: 5px; }
  .topbar-collaboration { font-size: .72rem; }
  .collaboration-callout { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .share-tools { align-items: stretch; }
  .share-tools__label { width: 100%; }
  .share-button { flex: 1 1 calc(33.333% - 7px); padding-inline: 9px; }
  .share-button > span:last-child { display: none; }
  .collaboration-callout { padding: 22px; }
  .collaboration-callout .btn { width: 100%; }
  .cmmd-chatbot { right: 12px; bottom: 12px; }
  .cmmd-chatbot__panel { width: calc(100vw - 24px); max-height: calc(100vh - 84px); }
  .cmmd-chatbot__body { max-height: calc(100vh - 315px); }
  .cmmd-chatbot__toggle { width: 54px; padding: 0; justify-content: center; }
  .cmmd-chatbot__toggle span { display: none; }
  .back-to-top { right: 76px; bottom: 16px; }
}
