:root {
  --bg: #FFF4E4;
  --text: #181A18;
  --muted: #5F625C;
  --line: #D9C8AD;
  --accent: #00A889;
  --accent-deep: #006B62;
  --warm: #D9791F;
  --warm-soft: #FFE0AF;
  --card: #FFFFFF;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.65;
}

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

a:hover {
  color: var(--accent);
}

.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.post {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2rem;
}

.post-header {
  margin-bottom: 2rem;
}

.section-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0.3rem 0 1rem;
}

.description {
  color: var(--muted);
  font-size: 1.15rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  gap: 0.5rem;
}

.post h2 {
  margin-top: 2rem;
  font-size: 1.6rem;
}

.post p {
  margin: 1rem 0;
}

.post a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .post {
    padding: 1.25rem;
    border-radius: 16px;
  }
}

.listing {
  max-width: 760px;
  margin: 0 auto;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.post-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}

.post-list h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.post-list p {
  margin: 0.5rem 0;
  color: var(--muted);
}

.post-list time {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  margin-top: 2rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: var(--card);
}

.featured-image {
  margin: 0 0 2rem;
}

.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.post-thumb {
  display: block;
  margin-bottom: 1rem;
}

.post-thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.article-video,
.references {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.article-video video {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #000;
}

.video-caption {
  color: var(--muted);
  font-size: 0.95rem;
}

.references ul {
  padding-left: 1.25rem;
}

.references li {
  margin: 0.5rem 0;
}

.references a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* --- Visual refresh: home editorial --- */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: center;
  min-height: 68vh;
  padding: 2rem 0 3rem;
}

.home-hero-copy {
  max-width: 680px;
}

.hero-description {
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  max-width: 620px;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  border: 1px solid var(--accent);
}

.button-primary {
  background: var(--accent);
  color: var(--bg);
}

.button-primary:hover {
  color: var(--bg);
  filter: brightness(1.08);
}

.button-secondary {
  color: var(--accent);
  background: transparent;
}

.home-hero-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(25, 23, 21, 0.14);
}

.home-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 3rem;
}

.section-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.35rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.section-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent), var(--line) 45%);
  box-shadow: 0 14px 38px rgba(25, 23, 21, 0.10);
}

.section-card h2 {
  margin: 0.35rem 0 0.6rem;
  font-size: 1.4rem;
}

.section-card p {
  margin: 0;
  color: var(--muted);
}

.latest-section {
  margin-top: 2rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.article-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--line);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.035);
}

.article-card-body {
  padding: 1.25rem;
}

.article-card h3 {
  margin: 0.3rem 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.article-card p {
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.article-card time {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Mejora suave para listados existentes --- */

.post-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  background: var(--line);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Respeta usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .section-card,
  .article-card-image img {
    transition: none;
  }

  .section-card:hover,
  .article-card:hover .article-card-image img {
    transform: none;
  }
}

@media (max-width: 820px) {
  .home-hero,
  .home-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .home-hero-media img {
    min-height: 280px;
  }
}


/* --- Hero mosaico dinámico --- */

.home-hero-mosaic {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(0, 143, 122, 0.22);
  background: var(--line);
  box-shadow: 0 24px 64px rgba(24, 26, 24, 0.10);
}

.mosaic-cell {
  display: block;
  overflow: hidden;
  background: var(--line);
  min-height: 0;
}

.mosaic-cell:first-child {
  grid-row: 1 / 3;
}

.mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.04) brightness(1.03) contrast(0.98);
  transition: transform 280ms ease, filter 280ms ease;
}

.mosaic-cell:hover img {
  transform: scale(1.04);
  filter: saturate(1.10) brightness(1.04) contrast(1);
}

.mosaic-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 143, 122, 0.22), transparent 40%),
    linear-gradient(135deg, var(--line), rgba(217, 120, 34, 0.18));
}

@media (max-width: 820px) {
  .home-hero-mosaic {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 3 / 2;
    border-radius: 18px;
  }
}

