/*
Theme Name: MYC Revista Clásica
Theme URI: https://maderaycuerdasco.es/
Author: Madera y Cuerdas Co.
Description: Portada editorial sobria para el blog de Madera y Cuerdas Co., inspirada en la maqueta 02 Revista Clásica.
Version: 0.1.5
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: myc-revista-clasica
*/

:root {
  --myc-paper: #f4efe6;
  --myc-card: #fffaf1;
  --myc-card-soft: #fffdf8;
  --myc-ink: #16120d;
  --myc-muted: #62594a;
  --myc-line: #dbcdb9;
  --myc-green: #485640;
  --myc-red: #8b1d12;
  --myc-gold: #b28d3a;
  --myc-max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--myc-ink);
  background: var(--myc-paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration-color: rgba(139, 29, 18, 0.45);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--myc-red);
  text-decoration-color: currentColor;
}

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

.site-header {
  padding: 52px 24px 0;
  background: var(--myc-paper);
}

.site-header__inner {
  max-width: var(--myc-max);
  margin: 0 auto;
}

.site-branding {
  padding-bottom: 28px;
}

.site-title {
  margin: 0;
  font-size: clamp(2.35rem, 4.6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 700;
}

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

.site-description {
  margin: 10px 0 0;
  color: var(--myc-muted);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.25;
}

.site-nav {
  border-top: 1px solid rgba(72, 86, 64, 0.18);
  border-bottom: 1px solid rgba(72, 86, 64, 0.18);
  background: rgba(255, 250, 241, 0.72);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  max-width: var(--myc-max);
  margin: 0 auto;
  padding: 14px 24px;
  list-style: none;
}

.site-nav a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--myc-green);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-main {
  max-width: var(--myc-max);
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.section-kicker,
.post-card__meta,
.post-list__meta,
.entry-meta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--myc-green);
  text-transform: uppercase;
}

.featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 36px;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--myc-line);
  background: var(--myc-card);
}

.featured-post__image {
  min-height: 320px;
  background: #e6dfcf;
}

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

.featured-post__content {
  align-self: center;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-right: 10px;
  padding: 5px 13px;
  border-radius: 4px;
  color: #fff;
  background: var(--myc-green);
}

.post-card__meta,
.post-list__meta,
.entry-meta {
  color: var(--myc-muted);
}

.featured-post__title {
  margin: 18px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.04;
}

.featured-post__title a,
.post-card__title a,
.post-list__title a {
  text-decoration: none;
}

.featured-post__excerpt {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.read-more {
  display: inline-block;
  margin-top: 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--myc-red);
  text-decoration: none;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
}

.post-card {
  border: 1px solid var(--myc-line);
  background: var(--myc-card-soft);
}

.post-card__image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e6dfcf;
}

.post-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  padding: 18px;
}

.post-card__title {
  margin: 12px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.22;
}

.archive-band {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--myc-line);
}

.post-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(219, 205, 185, 0.72);
}

.post-list__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.site-footer {
  padding: 34px 24px;
  border-top: 1px solid var(--myc-line);
  color: var(--myc-muted);
  background: #eee6d9;
  font-size: 0.95rem;
  text-align: center;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 310px;
  gap: 42px;
  align-items: start;
}

.entry-wrap {
  min-width: 0;
}

.entry-title {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1;
}

.entry-featured-image {
  margin: 24px 0;
}

.entry-featured-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  margin: 0 auto;
}

.entry-content {
  margin-top: 34px;
}

.entry-content h2 {
  margin: 2.1em 0 0.65em;
  font-size: 1.85rem;
  line-height: 1.16;
}

.entry-content h3 {
  margin: 1.8em 0 0.55em;
  font-size: 1.35rem;
  line-height: 1.22;
}

.entry-content p,
.entry-content li {
  font-size: 1.08rem;
}

.entry-content table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--myc-line);
  vertical-align: top;
}

.entry-content th {
  background: #eee6d9;
  text-align: left;
}

.entry-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 5px solid var(--myc-green);
  background: var(--myc-card);
  font-size: 1.12rem;
}

.entry-content figure {
  margin: 34px 0;
}

.entry-content .wp-block-image img,
.entry-content figure img {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
}

.entry-content figcaption {
  margin-top: 9px;
  color: var(--myc-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
}

.entry-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

.sidebox {
  border: 1px solid var(--myc-line);
  border-radius: 7px;
  background: var(--myc-card);
  padding: 18px 19px;
  box-shadow: 0 12px 28px rgba(54, 35, 16, 0.08);
}

.sidebox h2 {
  margin: 0 0 11px;
  color: var(--myc-ink);
  font-size: 1.12rem;
  line-height: 1.15;
}

.sidebox p,
.sidebox li {
  margin: 0 0 10px;
  color: #443a31;
  font-size: 0.88rem;
  line-height: 1.48;
}

.sidebox ul,
.sidebox ol {
  margin: 0;
  padding-left: 18px;
}

.sidebox-index ol {
  counter-reset: myc-index;
  padding-left: 0;
  list-style: none;
}

.sidebox-index li {
  position: relative;
  padding-left: 27px;
}

.sidebox-index li::before {
  counter-increment: myc-index;
  content: counter(myc-index);
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--myc-green);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.sideposts {
  display: grid;
  gap: 0;
}

.sidepost {
  display: block;
  padding: 12px 0 11px;
  border-top: 1px solid rgba(219, 205, 185, 0.9);
  text-decoration: none;
}

.sidepost span,
.sidepost small {
  display: block;
}

.sidepost span {
  color: var(--myc-red);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.22;
}

.sidepost small {
  margin-top: 5px;
  color: var(--myc-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 920px) {
  .featured-post {
    grid-template-columns: 1fr;
  }

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

  .entry-layout {
    grid-template-columns: 1fr;
  }

  .entry-sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

  .site-header {
    padding-top: 32px;
  }

  .featured-post {
    padding: 18px;
  }

  .featured-post__image {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

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

  .post-list li {
    grid-template-columns: 1fr;
  }
}

.post-card__meta, .post-list__meta, .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-topics { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.post-topics .post-tag { margin: 0; padding: 4px 8px; min-height: 0; line-height: 1.35; }
.post-list li { grid-template-columns: minmax(0, 1fr) minmax(180px, 40%); }
@media (max-width: 620px) { .post-list li { grid-template-columns: 1fr; } }
