/*
Theme Name: Enfoque Campechano
Theme URI: https://enfoquecampechano.com
Author: Enfoque Campechano
Description: Tema editorial ligero para portal de noticias de Campeche.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: enfoque-campechano
*/

:root {
  --ec-magenta: #d80b5b;
  --ec-magenta-2: #f00668;
  --ec-purple: #211438;
  --ec-purple-2: #341d57;
  --ec-ink: #171321;
  --ec-muted: #6d6678;
  --ec-gold: #f2a23a;
  --ec-bg: #ffffff;
  --ec-soft: #f8f3f7;
  --ec-border: #ece4ec;
  --ec-radius: 18px;
  --ec-shadow: 0 18px 45px rgba(33, 20, 56, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ec-bg);
  color: var(--ec-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--ec-magenta); }

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

.ec-container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.ec-topbar {
  background: linear-gradient(90deg, var(--ec-purple), #120b22);
  color: white;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ec-topbar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ec-date {
  color: rgba(255,255,255,.78);
}

.ec-social {
  color: white;
  font-weight: 800;
}

.ec-header {
  background: white;
  border-bottom: 1px solid var(--ec-border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 20px rgba(33,20,56,.06);
}

.ec-header-inner {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
}

.ec-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ec-brand-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ec-magenta);
}

.ec-brand-text strong {
  display: block;
  font-size: clamp(22px, 3vw, 36px);
  line-height: .95;
  letter-spacing: .02em;
  color: white;
  -webkit-text-stroke: 1px var(--ec-purple);
  text-shadow: 0 2px 0 rgba(33,20,56,.14);
}

.ec-brand-text span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--ec-purple);
  text-transform: uppercase;
}

.ec-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ec-nav a {
  display: block;
  padding: 32px 0;
  color: var(--ec-purple);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ec-nav a:hover {
  color: var(--ec-magenta);
}

.ec-search {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: var(--ec-soft);
  color: var(--ec-purple);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.ec-hero {
  position: relative;
  min-height: 390px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ec-purple);
}

.ec-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-banner.jpg") center / cover no-repeat;
  transform: scale(1.01);
}

.ec-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33,20,56,.12), rgba(33,20,56,.86));
}

.ec-hero-content {
  position: relative;
  z-index: 1;
  color: white;
  padding: 96px 0 46px;
}

.ec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(216, 11, 91, .95);
  color: white;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ec-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: .92;
  letter-spacing: -.04em;
}

.ec-hero p {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.86);
  font-size: 18px;
}

.ec-main {
  padding: 42px 0 70px;
}

.ec-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.ec-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 22px;
  letter-spacing: -.02em;
  color: var(--ec-purple);
  text-transform: uppercase;
}

.ec-section-title::before {
  content: "";
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ec-magenta), var(--ec-gold));
}

.ec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.ec-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ec-border);
  border-radius: var(--ec-radius);
  background: white;
  box-shadow: 0 8px 24px rgba(33,20,56,.06);
}

.ec-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 285px;
  background: var(--ec-soft);
  overflow: hidden;
}

.ec-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.ec-card:hover .ec-card-image img {
  transform: scale(1.04);
}

.ec-card-body {
  flex: 1;
  padding: 18px;
}

.ec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
  color: var(--ec-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ec-cat {
  color: var(--ec-magenta);
}

.ec-card h2,
.ec-card h3 {
  margin: 0;
  color: var(--ec-ink);
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.22;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ec-card h2 a,
.ec-card h3 a,
.ec-mini strong,
.ec-article h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.ec-card p {
  margin: 12px 0 0;
  color: var(--ec-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-featured {
  margin-bottom: 30px;
}

.ec-featured .ec-card {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.ec-featured .ec-card-image {
  aspect-ratio: auto;
  max-height: none;
  min-height: 360px;
}

.ec-featured .ec-card-body {
  padding: 30px;
  align-self: center;
}

.ec-featured h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
}

.ec-featured .ec-card p {
  -webkit-line-clamp: 4;
}

.ec-sidebar {
  position: sticky;
  top: 112px;
}

.ec-widget {
  padding: 22px;
  border-radius: var(--ec-radius);
  border: 1px solid var(--ec-border);
  background: var(--ec-soft);
  box-shadow: var(--ec-shadow);
  margin-bottom: 24px;
}

.ec-widget-dark {
  background: linear-gradient(145deg, var(--ec-purple), #11091d);
  color: white;
}

.ec-widget h3 {
  margin: 0 0 16px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ec-list {
  display: grid;
  gap: 14px;
}

.ec-mini {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.ec-mini img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.ec-mini strong {
  display: block;
  font-size: 14px;
  line-height: 1.18;
}

.ec-mini span {
  display: block;
  margin-top: 5px;
  color: var(--ec-muted);
  font-size: 12px;
  font-weight: 700;
}

.ec-widget-dark .ec-mini span {
  color: rgba(255,255,255,.62);
}

.ec-category-strip {
  margin: 34px 0;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--ec-magenta), #b0064a);
  color: white;
}

.ec-category-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ec-category-strip a {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: white;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ec-article {
  max-width: 860px;
  margin-inline: auto;
}

.ec-article-header {
  padding: 46px 0 28px;
}

.ec-article h1 {
  margin: 0;
  color: var(--ec-purple);
  font-size: clamp(31px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.ec-article-image {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--ec-shadow);
  margin-bottom: 32px;
}

.ec-content {
  font-size: 19px;
}

.ec-content p {
  margin: 0 0 1.25em;
}

.ef-nota-entrada {
  font-size: clamp(20px, 2.1vw, 24px);
  line-height: 1.48;
  color: var(--ec-purple);
  font-weight: 700;
}

.ef-nota-claves {
  margin: 0 0 1.6em;
  padding: 20px 24px 20px 46px;
  border-radius: 20px;
  background: var(--ec-soft);
  border: 1px solid var(--ec-border);
  color: var(--ec-ink);
}

.ef-nota-claves li {
  margin: 0 0 .8em;
}

.ef-nota-claves li:last-child {
  margin-bottom: 0;
}

.ec-content a {
  color: var(--ec-magenta);
  font-weight: 800;
}

.ec-content blockquote {
  margin: 32px 0;
  padding: 22px 26px;
  border-left: 6px solid var(--ec-magenta);
  background: var(--ec-soft);
  border-radius: 16px;
  color: var(--ec-purple);
  font-size: 22px;
  font-weight: 800;
}

.ec-pagination {
  margin-top: 34px;
}

.ec-pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ec-pagination a,
.ec-pagination span {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ec-soft);
  color: var(--ec-purple);
  font-weight: 900;
}

.ec-pagination .current {
  background: var(--ec-magenta);
  color: white;
}

.ec-footer {
  margin-top: 70px;
  padding: 42px 0;
  background: var(--ec-purple);
  color: white;
}

.ec-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ec-footer p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.7);
}

@media (max-width: 980px) {
  .ec-header-inner {
    grid-template-columns: 1fr auto;
  }

  .ec-nav {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .ec-nav ul {
    justify-content: flex-start;
    min-width: max-content;
  }

  .ec-nav a {
    padding: 0 0 18px;
  }

  .ec-layout,
  .ec-featured .ec-card {
    grid-template-columns: 1fr;
  }

  .ec-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .ec-topbar-inner {
    justify-content: center;
    text-align: center;
  }

  .ec-social {
    display: none;
  }

  .ec-header-inner {
    min-height: 74px;
    gap: 12px;
  }

  .ec-brand-icon {
    width: 48px;
    height: 48px;
  }

  .ec-brand-text strong {
    font-size: 24px;
  }

  .ec-brand-text span {
    font-size: 10px;
  }

  .ec-hero {
    min-height: 310px;
  }

  .ec-grid {
    grid-template-columns: 1fr;
  }

  .ec-featured .ec-card-image {
    min-height: 220px;
  }

  .ec-featured .ec-card-body {
    padding: 20px;
  }

  .ec-content {
    font-size: 17px;
  }
}
