/* ============================================================
   Leñas Solórzano — Blog + Legal pages stylesheet
   Mirrors the production Next.js design (lenas-solorzano.com)
   Uses tokens defined in main.css
   ============================================================ */

/* ─────────────────────────────────────────────
   Shared: body background for blog / legal pages
   ───────────────────────────────────────────── */
body.blog,
body.single-post,
body.page:not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.home) {
  background: #FAF3EB;
}

/* ─────────────────────────────────────────────
   HERO (dark) — used by blog index + optionally single header
   ───────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, #2C1A0E 0%, #3D2010 60%, #5C3018 100%);
  padding: 3.5rem 1rem 3rem;
  text-align: center;
}
.blog-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(196, 86, 26, 0.15);
  border: 1px solid rgba(196, 86, 26, 0.35);
  border-radius: 9999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.25rem;
  color: #C4561A;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.blog-hero-eyebrow svg { stroke: #C4561A; }
.blog-hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}
.blog-hero-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
}

/* ─────────────────────────────────────────────
   BLOG INDEX
   ───────────────────────────────────────────── */
.blog-main {
  background: #FAF3EB;
  min-height: 50vh;
  padding: 3rem 1rem 4rem;
}
.blog-container {
  max-width: 1100px;
  margin: 0 auto;
}
.blog-count {
  margin-bottom: 2.5rem;
  text-align: center;
}
.blog-count p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

/* Cards grid — 1 col mobile, 2 col md, 3 col lg */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Card */
.blog-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #E8DDD0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(44, 26, 14, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 26, 14, 0.12);
}
.blog-card__media {
  display: block;
  overflow: hidden;
  height: 200px;
  background: #F0E6D3;
}
.blog-card__media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__media img {
  transform: scale(1.03);
}
.blog-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(196, 86, 26, 0.35);
  background: linear-gradient(135deg, #F0E6D3, #E5D8C4);
}
.blog-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card__meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.blog-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(196, 86, 26, 0.09);
  color: var(--color-teal);
  border: 1px solid rgba(196, 86, 26, 0.25);
}
.blog-card__date {
  color: #9A8A7A;
  font-size: 0.78rem;
}
.blog-card__title {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.65rem;
}
.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-card__title a:hover { color: var(--color-teal); }
.blog-card__excerpt {
  color: #5A4A3A;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #F0E6D3;
  margin-top: auto;
}
.blog-card__read-time {
  color: #9A8A7A;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.blog-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-teal);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: gap 0.2s;
}
.blog-card__cta:hover { gap: 0.55rem; }

/* Pagination */
.blog-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  border: 1px solid #E8DDD0;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.blog-pagination .page-numbers:hover {
  background: rgba(196, 86, 26, 0.1);
  color: var(--color-teal);
}
.blog-pagination .page-numbers.current {
  background: var(--color-teal);
  color: #fff;
  border-color: var(--color-teal);
}

/* Bottom CTA card (blog index + single) */
.blog-cta-card {
  margin-top: 3.5rem;
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, #2C1A0E 0%, #3D2010 100%);
  border-radius: 1.25rem;
}
.blog-cta-card p { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0 0 0.5rem; }
.blog-cta-card h3 { color: #fff; font-size: 1.4rem; font-weight: 700; margin: 0 0 1.5rem; }
.blog-cta-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(145deg, rgba(196,86,26,0.9), rgba(168,70,26,0.95));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(196,86,26,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-cta-card__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,86,26,0.5);
}

/* ─────────────────────────────────────────────
   SINGLE POST
   ───────────────────────────────────────────── */
.single-post-main { background: #FAF3EB; min-height: 70vh; }

.single-post-cover {
  width: 100%;
  height: 420px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #3D2010, #5C3018);
}
.single-post-cover img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.single-post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(44,26,14,0.65));
  pointer-events: none;
}
@media (max-width: 640px) {
  .single-post-cover, .single-post-cover img { height: 240px; }
}

.single-post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.single-post-breadcrumb {
  padding: 1.25rem 0 0;
  margin-bottom: 1.5rem;
}
.single-post-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-teal);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.single-post-breadcrumb a:hover { color: var(--color-teal-dark); }

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.single-post-meta__item {
  color: #9A8A7A;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.single-post-title {
  color: var(--color-text);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}

/* Prose */
.entry-content {
  color: #3A2A1A;
  font-size: 1rem;
  line-height: 1.75;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content p {
  color: #3A2A1A;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1rem;
}
.entry-content h2 {
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
  border-left: 3px solid var(--color-teal);
  padding-left: 0.75rem;
}
.entry-content h3 {
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  line-height: 1.35;
}
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
  color: #3A2A1A;
  line-height: 1.65;
}
.entry-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-teal);
}
.entry-content ol li {
  margin-bottom: 0.6rem;
  color: #3A2A1A;
  line-height: 1.65;
}
.entry-content a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--color-teal-dark); }
.entry-content strong { color: var(--color-text); }
.entry-content blockquote {
  border-left: 3px solid var(--color-teal);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
  font-style: italic;
  background: rgba(196, 86, 26, 0.04);
  border-radius: 0 8px 8px 0;
}
.entry-content code {
  background: #F0E6D3;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}
.entry-content pre {
  background: #2C1A0E;
  color: #FAF3EB;
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content img {
  border-radius: 12px;
  margin: 1.25rem auto;
  box-shadow: var(--shadow-card);
}
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}
.entry-content table thead tr { background: #2C1A0E; }
.entry-content table th {
  color: #fff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
}
.entry-content table td {
  padding: 0.6rem 1rem;
  color: var(--color-text);
  border-bottom: 1px solid #E8DDD0;
}
.entry-content table tbody tr:nth-child(odd) { background: #FAF3EB; }
.entry-content table tbody tr:nth-child(even) { background: #F0E6D3; }
.entry-content table {
  display: block;
  overflow-x: auto;
}

/* Related posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E8DDD0;
}
.related-posts h3 {
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .related-posts-grid { grid-template-columns: repeat(3, 1fr); }
}
.related-card {
  background: #fff;
  border: 1px solid #E8DDD0;
  border-radius: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(44,26,14,0.1);
}
.related-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}
.related-card span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────
   LEGAL / PAGE
   ───────────────────────────────────────────── */
.page-legal-wrap {
  background: #FAF3EB;
  min-height: 60vh;
  padding: 2.5rem 1rem 4rem;
}
.page-legal-container {
  max-width: 800px;
  margin: 0 auto;
}
.page-legal-breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.page-legal-breadcrumb a {
  color: var(--color-teal);
  font-weight: 600;
  text-decoration: none;
}
.page-legal-breadcrumb a:hover { color: var(--color-teal-dark); }
.page-legal-breadcrumb .sep { margin: 0 0.4rem; color: #C8B99F; }

.page-legal-title {
  color: var(--color-text);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}

.page-legal-card {
  background: #fff;
  border: 1px solid #E8DDD0;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) {
  .page-legal-card { padding: 1.5rem 1.25rem; }
}

/* Table of contents */
.legal-with-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .legal-with-toc {
    grid-template-columns: minmax(0, 1fr) 240px;
    max-width: 1080px;
  }
}
.legal-toc {
  order: -1;
}
@media (min-width: 1024px) {
  .legal-toc {
    order: 2;
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid #E8DDD0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
  }
}
.legal-toc__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}
.legal-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-toc li { margin-bottom: 0.35rem; }
.legal-toc a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  color: var(--color-text);
  font-size: 0.85rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.legal-toc a:hover {
  background: rgba(196, 86, 26, 0.08);
  border-left-color: var(--color-teal);
  color: var(--color-teal);
}

.legal-content { min-width: 0; }

/* Company info card at bottom of legal pages */
.legal-company-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(196,86,26,0.06), rgba(196,86,26,0.02));
  border: 1px solid rgba(196,86,26,0.2);
  border-radius: 12px;
}
.legal-company-info h4 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-teal);
  font-weight: 700;
}
.legal-company-info p {
  margin: 0.25rem 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.6;
}
.legal-company-info a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────────────
   FAQ ACCORDION
   ───────────────────────────────────────────── */
.faq-accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: #fff;
  border: 1px solid #E8DDD0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.faq-item.is-open {
  border-color: rgba(196, 86, 26, 0.4);
  box-shadow: 0 4px 14px rgba(44, 26, 14, 0.08);
}
.faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
}
.faq-item__trigger:hover { color: var(--color-teal); }
.faq-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(196,86,26,0.1);
  color: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s;
}
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); background: var(--color-teal); color: #fff; }
.faq-item__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.is-open .faq-item__panel { max-height: 800px; }
.faq-item__panel-inner {
  padding: 0 1.25rem 1.25rem;
  color: #3A2A1A;
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid #F0E6D3;
}
.faq-item__panel-inner p { margin: 1rem 0 0; }
.faq-item__panel-inner p:first-child { margin-top: 1rem; }

/* ─────────────────────────────────────────────
   CONTACT FORM (page-contacto)
   ───────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.contact-form {
  background: #fff;
  border: 1px solid #E8DDD0;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}
.contact-form h2 {
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
  color: var(--color-text);
}
.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #E8DDD0;
  border-radius: 8px;
  background: #FAF7F2;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(196,86,26,0.15);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .field { margin-bottom: 1rem; }
.contact-form .field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .contact-form .field-grid { grid-template-columns: 1fr 1fr; }
}
.contact-form button[type=submit] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.contact-form button[type=submit]:hover {
  background: var(--color-teal-dark);
  transform: translateY(-1px);
}
.contact-form .form-notice {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.contact-form .form-notice.success {
  background: rgba(37, 169, 107, 0.1);
  border: 1px solid rgba(37, 169, 107, 0.35);
  color: #1a7a4d;
}
.contact-form .form-notice.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.contact-aside {
  background: linear-gradient(135deg, #2C1A0E 0%, #3D2010 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
}
.contact-aside h2 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 1rem;
}
.contact-aside .info-block { margin-bottom: 1.1rem; }
.contact-aside .info-block:last-child { margin-bottom: 0; }
.contact-aside .info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  margin: 0 0 0.25rem;
}
.contact-aside .info-value {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
.contact-aside a {
  color: #F5B78A;
  text-decoration: none;
}
.contact-aside a:hover { text-decoration: underline; }
