/*
Theme Name: En Contexto Theme
Theme URI: https://encontextomedia.com
Author: En Contexto Media
Description: Tema inicial ligero para En Contexto Media, medio cristiano de noticias y analisis.
Version: 0.1.6
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: en-contexto-theme
*/

:root {
  --ecm-ink: #111418;
  --ecm-muted: #606873;
  --ecm-subtle: #8a929c;
  --ecm-line: #e6e8ec;
  --ecm-soft: #f5f6f8;
  --ecm-paper: #ffffff;
  --ecm-accent: #b3202a;
  --ecm-accent-dark: #841821;
  --ecm-gold: #c09a42;
  --ecm-blue: #1b4f9c;
  --ecm-cyan: #1677a8;
  --ecm-green: #177245;
  --ecm-teal: #0f766e;
  --ecm-purple: #5b4aa0;
  --ecm-pr: #0f5d8f;
  --ecm-wine: #7a1f3d;
  --ecm-max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(180deg, #fbfaf7 0, #fff 210px);
  color: var(--ecm-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--ecm-accent);
  text-decoration-color: currentColor;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.ecm-container {
  margin: 0 auto;
  max-width: var(--ecm-max);
  padding: 0 20px;
}

.ecm-topbar {
  background: linear-gradient(90deg, #111418 0, #172233 45%, #111418 100%);
  border-bottom: 1px solid rgba(192, 154, 66, 0.35);
  color: #fff;
  font-size: 0.82rem;
}

.ecm-topbar-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 36px;
  gap: 16px;
}

.ecm-motto {
  color: rgba(255, 255, 255, 0.82);
}

.ecm-date {
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(17, 20, 24, 0.12);
  box-shadow: 0 14px 34px rgba(17, 20, 24, 0.06);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.ecm-header-inner {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 96px;
}

.site-branding {
  align-items: center;
  display: flex;
  min-width: 260px;
}

.custom-logo,
.ecm-default-logo img {
  height: auto;
  max-height: 74px;
  object-fit: contain;
  width: auto;
}

.custom-logo-link,
.ecm-default-logo {
  background: linear-gradient(180deg, #ffffff, #f8f4e8);
  border: 1px solid rgba(192, 154, 66, 0.36);
  box-shadow: 0 12px 30px rgba(17, 20, 24, 0.08);
  display: inline-flex;
  padding: 10px 14px;
  position: relative;
}

.custom-logo-link::after,
.ecm-default-logo::after {
  background: var(--ecm-gold);
  bottom: -1px;
  content: "";
  height: 3px;
  left: 14px;
  position: absolute;
  right: 14px;
}

.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.site-title a {
  text-decoration: none;
}

.site-description {
  color: var(--ecm-muted);
  font-size: 0.82rem;
  margin: 6px 0 0;
}

.main-navigation ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  border: 1px solid transparent;
  color: #2b3138;
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.main-navigation a:hover {
  background: #f7f1e3;
  border-color: rgba(192, 154, 66, 0.35);
  color: var(--ecm-ink);
}

.ecm-breaking {
  background: #111418;
  border-bottom: 3px solid var(--ecm-gold);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  padding: 10px 0;
}

.ecm-breaking strong {
  background: var(--ecm-accent);
  color: #fff;
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-right: 10px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.ecm-section {
  padding: 34px 0;
}

.ecm-home-hero {
  background:
    linear-gradient(90deg, rgba(17, 20, 24, 0.06), transparent 42%),
    linear-gradient(180deg, #fff 0, #f7f4ed 100%);
  border-bottom: 1px solid rgba(17, 20, 24, 0.08);
  padding: 42px 0 38px;
}

.ecm-section-header {
  align-items: end;
  border-bottom: 2px solid var(--ecm-ink);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 9px;
}

.ecm-section-topic .ecm-section-header {
  border-bottom-color: var(--ecm-green);
}

.ecm-section-title {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.ecm-section-link {
  color: var(--ecm-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.ecm-hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
}

.ecm-featured {
  background: #fff;
  border: 1px solid rgba(17, 20, 24, 0.1);
  border-top: 5px solid var(--ecm-accent);
  box-shadow: 0 18px 42px rgba(17, 20, 24, 0.08);
  padding: 18px;
}

.ecm-featured-image {
  aspect-ratio: 16 / 9;
  background: #e9edf1;
  display: block;
  margin-bottom: 16px;
  overflow: hidden;
}

.ecm-featured-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ecm-label {
  color: var(--ecm-accent);
  border-left: 4px solid currentColor;
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-left: 8px;
  text-transform: uppercase;
}

.ecm-category-puerto-rico {
  color: var(--ecm-pr);
}

.ecm-category-estados-unidos {
  color: var(--ecm-accent);
}

.ecm-category-latinoamerica {
  color: var(--ecm-green);
}

.ecm-category-internacional {
  color: var(--ecm-purple);
}

.ecm-category-iglesia {
  color: var(--ecm-gold);
}

.ecm-category-esperanza-en-contexto {
  color: var(--ecm-teal);
}

.ecm-category-tecnologia-e-ia,
.ecm-category-tecnologia {
  color: var(--ecm-cyan);
}

.ecm-category-economia-y-finanzas {
  color: var(--ecm-green);
}

.ecm-category-opinion {
  color: var(--ecm-wine);
}

.ecm-category-contexto,
.ecm-category-editorial {
  color: var(--ecm-accent);
}

.ecm-featured-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0 0 12px;
}

.ecm-excerpt {
  color: var(--ecm-muted);
  font-size: 1rem;
  margin: 0;
}

.ecm-side-list {
  display: grid;
  gap: 16px;
}

.ecm-story {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 20, 24, 0.09);
  border-left: 4px solid var(--ecm-gold);
  padding: 14px;
}

.ecm-story-title {
  font-size: 1.08rem;
  line-height: 1.22;
  margin: 0 0 8px;
}

.ecm-story-title a,
.ecm-featured-title a,
.ecm-card-title a {
  text-decoration: none;
}

.ecm-meta {
  color: var(--ecm-subtle);
  font-size: 0.78rem;
  font-weight: 650;
}

.ecm-card-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ecm-card-image {
  aspect-ratio: 16 / 10;
  background: var(--ecm-soft);
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
}

.ecm-story .ecm-card-image {
  aspect-ratio: 16 / 8;
  margin-bottom: 10px;
}

.ecm-card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ecm-card-title {
  font-size: 1.12rem;
  line-height: 1.22;
  margin: 0 0 8px;
}

.ecm-band {
  background: var(--ecm-soft);
  border: 1px solid var(--ecm-line);
  border-left: 4px solid var(--ecm-accent);
  padding: 22px;
}

.ecm-sponsor-section {
  padding-top: 10px;
}

.ecm-sponsor-card {
  background: linear-gradient(135deg, #111418, #242a33);
  border-top: 4px solid var(--ecm-gold);
  color: #fff;
  padding: 24px;
}

.ecm-sponsor-kicker,
.ecm-sponsor-label {
  color: var(--ecm-gold);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ecm-sponsor-main {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr) auto;
  margin-top: 12px;
}

.ecm-sponsor-logo {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(192, 154, 66, 0.42);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  display: flex;
  justify-content: center;
  min-height: 162px;
  padding: 24px;
}

.ecm-sponsor-logo img {
  display: block;
  height: auto;
  max-height: 126px;
  max-width: 100%;
  object-fit: contain;
}

.ecm-sponsor-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 6px 0 10px;
}

.ecm-sponsor-card p {
  color: rgba(255, 255, 255, 0.76);
  margin: 0;
  max-width: 760px;
}

.ecm-sponsor-button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: center;
  letter-spacing: 0.08em;
  min-width: 144px;
  padding: 12px 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.ecm-sponsor-button:hover {
  background: #fff;
  color: var(--ecm-ink);
  text-decoration: none;
}

.ecm-sponsor-note {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  margin-top: 18px;
  padding-top: 12px;
}

.ecm-membership-section {
  padding-top: 10px;
}

.ecm-membership-card {
  align-items: center;
  background: #f8faf9;
  border: 1px solid #dfe7e4;
  border-left: 5px solid var(--ecm-teal);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 26px;
}

.ecm-membership-label {
  color: var(--ecm-teal);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ecm-membership-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 10px;
}

.ecm-membership-card p {
  color: var(--ecm-muted);
  margin: 0;
  max-width: 760px;
}

.ecm-membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.ecm-membership-primary,
.ecm-membership-secondary {
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: center;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.ecm-membership-primary {
  background: var(--ecm-teal);
  color: #fff;
}

.ecm-membership-secondary {
  border: 1px solid var(--ecm-line);
  color: var(--ecm-ink);
}

.ecm-topic-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ecm-topic-panel {
  border-top: 5px solid var(--ecm-accent);
  color: #fff;
  min-height: 220px;
  padding: 24px;
}

.ecm-topic-panel span {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.ecm-topic-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 16px;
}

.ecm-topic-panel p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.ecm-topic-economia {
  background: linear-gradient(135deg, #123b2a, #177245);
  border-top-color: #9ad4a6;
}

.ecm-topic-esperanza {
  background: linear-gradient(135deg, #0d3b3a, #0f766e);
  border-top-color: #87dfd4;
}

.ecm-topic-tecnologia {
  background: linear-gradient(135deg, #102f45, #1677a8);
  border-top-color: #92d3f0;
}

.ecm-topic-iglesia {
  background: linear-gradient(135deg, #3a2b0b, #9d7626);
  border-top-color: #f0cf7a;
}

.ecm-topic-empty {
  background: linear-gradient(135deg, #f3faf5, #ffffff);
  border: 1px solid #d8eadf;
  border-left: 5px solid var(--ecm-green);
  padding: 24px;
}

.ecm-topic-empty h3 {
  color: var(--ecm-green);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.ecm-topic-empty p {
  color: var(--ecm-muted);
  margin: 0;
}

.ecm-band h2 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0 0 8px;
}

.ecm-band p {
  color: var(--ecm-muted);
  margin: 0;
}

.content-area {
  padding: 38px 0 54px;
}

.ecm-article-wrap {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 760px) minmax(240px, 1fr);
}

.single .entry-header {
  border-bottom: 1px solid var(--ecm-line);
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.single .entry-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0 0 14px;
}

.single .entry-content {
  font-size: 1.06rem;
}

.single .entry-content > p:first-of-type {
  color: var(--ecm-muted);
  font-size: 1.22rem;
  line-height: 1.58;
}

.single .entry-content h2 {
  border-top: 1px solid var(--ecm-line);
  font-size: 1.5rem;
  line-height: 1.16;
  margin-top: 2.2rem;
  padding-top: 1.2rem;
}

.single .entry-content blockquote {
  border-left: 4px solid var(--ecm-accent);
  color: var(--ecm-muted);
  margin-left: 0;
  padding-left: 18px;
}

.ecm-sidebar-box {
  border-top: 2px solid var(--ecm-ink);
  margin-bottom: 24px;
  padding-top: 12px;
}

.ecm-sidebar-box h2 {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.ecm-sidebar-box p,
.ecm-sidebar-box li {
  color: var(--ecm-muted);
  font-size: 0.92rem;
}

.archive .page-title,
.search .page-title {
  border-bottom: 2px solid var(--ecm-ink);
  font-size: 1.45rem;
  letter-spacing: 0;
  margin: 0 0 22px;
  padding-bottom: 10px;
}

.ecm-archive-list {
  display: grid;
  gap: 22px;
}

.ecm-archive-item {
  border-bottom: 1px solid var(--ecm-line);
  display: grid;
  gap: 18px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding-bottom: 22px;
}

.site-footer {
  background: var(--ecm-ink);
  color: #fff;
  padding: 34px 0;
}

.ecm-footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.3fr 1fr 1fr;
}

.site-footer h2,
.site-footer h3 {
  margin-top: 0;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 860px) {
  .ecm-header-inner,
  .ecm-topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px 0;
  }

  .site-header {
    position: static;
  }

  .main-navigation ul {
    justify-content: flex-start;
  }

  .ecm-hero-grid,
  .ecm-article-wrap,
  .ecm-footer-grid,
  .ecm-topic-grid,
  .ecm-sponsor-main,
  .ecm-membership-card {
    grid-template-columns: 1fr;
  }

  .ecm-membership-actions {
    justify-content: flex-start;
  }

  .ecm-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ecm-container {
    padding: 0 16px;
  }

  .ecm-card-grid,
  .ecm-archive-item {
    grid-template-columns: 1fr;
  }

  .ecm-featured-title,
  .single .entry-title {
    font-size: 2.15rem;
  }
}
