/*
Theme Name:   CasasCordoba Child
Theme URI:    https://www.casascordoba.es
Description:  Tema hijo de GeneratePress para CasasCordoba.es
Author:       CasasCordoba.es
Template:     generatepress
Version:      1.0.0
License:      GNU General Public License v2 or later
Text Domain:  casascordoba
*/

/* ═══════════════════════════════════════════
   VARIABLES & RESET
═══════════════════════════════════════════ */
:root {
  --cream:             #FAF7F2;
  --warm:              #F0EBE1;
  --terracotta:        #B85C38;
  --terracotta-light:  #D4784F;
  --forest:            #2D4A3E;
  --forest-light:      #3D6B5A;
  --ink:               #1A1714;
  --ink-mid:           #3D3730;
  --ink-soft:          #6B6259;
  --border:            #D9D0C4;
  --gold:              #C4933F;
  --white:             #FFFFFF;
  --radius:            8px;
}

body {
  background: var(--cream);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   NAVEGACIÓN
═══════════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-branding .site-title a,
.site-branding .site-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest) !important;
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Acento terracotta en la segunda palabra del logo */
.site-title span { color: var(--terracotta); }

.main-navigation a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft) !important;
  padding: 0.5rem 0.9rem;
  transition: color 0.2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--terracotta) !important; }

/* Botón CTA newsletter en nav */
.menu-item-cta > a {
  background: var(--terracotta) !important;
  color: var(--white) !important;
  border-radius: 4px;
  padding: 0.4rem 1rem !important;
}
.menu-item-cta > a:hover { background: var(--terracotta-light) !important; }

/* ═══════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════ */
.breadcrumb,
.rank-math-breadcrumb,
.yoast-breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 0.6rem 0;
  margin-bottom: 1rem;
}
.breadcrumb a,
.rank-math-breadcrumb a,
.yoast-breadcrumb a { color: var(--terracotta); }

/* ═══════════════════════════════════════════
   LAYOUT GENERAL
═══════════════════════════════════════════ */
.content-area { max-width: 860px; }
.widget-area   { max-width: 320px; }

/* ═══════════════════════════════════════════
   TIPOGRAFÍA DE ARTÍCULOS
═══════════════════════════════════════════ */
.entry-title,
h1.entry-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.entry-content {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-mid);
}

.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
}

.entry-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
}

.entry-content p     { margin-bottom: 1.25rem; }
.entry-content ul,
.entry-content ol    { margin: 1rem 0 1.25rem 1.5rem; }
.entry-content li    { margin-bottom: 0.5rem; }
.entry-content strong { font-weight: 500; color: var(--ink); }

/* ═══════════════════════════════════════════
   META DEL ARTÍCULO
═══════════════════════════════════════════ */
.entry-meta,
.posted-on,
.byline {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════
   IMAGEN DESTACADA (hero)
═══════════════════════════════════════════ */
.post-thumbnail img,
.featured-image img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════
   ETIQUETA DE CATEGORÍA
═══════════════════════════════════════════ */
.cat-label,
.entry-categories a {
  display: inline-block;
  background: var(--terracotta);
  color: var(--white) !important;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   CAJA DE CONSEJO (shortcode [tip])
═══════════════════════════════════════════ */
.tip-box {
  background: var(--warm);
  border-left: 3px solid var(--terracotta);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
}
.tip-box strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
}

/* ═══════════════════════════════════════════
   CAJA DE VEREDICTO
═══════════════════════════════════════════ */
.verdict-box {
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  font-family: 'DM Sans', sans-serif;
}
.verdict-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #8BBFAC;
}
.verdict-box p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

/* ═══════════════════════════════════════════
   TABLA COMPARATIVA
═══════════════════════════════════════════ */
.comp-wrap { overflow-x: auto; margin: 1.5rem 0; }

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
}
.comp-table th {
  background: var(--forest);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.comp-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}
.comp-table tr:nth-child(even) { background: var(--warm); }
.comp-table tr:last-child td   { border-bottom: none; }
.comp-table .win               { color: var(--forest-light); font-weight: 500; }
.comp-table .col-prod          { font-weight: 500; color: var(--ink); }

/* ═══════════════════════════════════════════
   BOTÓN AMAZON
═══════════════════════════════════════════ */
.amazon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #FF9900;
  color: var(--white) !important;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.3rem;
  text-decoration: none !important;
  transition: background 0.2s;
}
.amazon-btn:hover { background: #E68900; }
.amazon-btn::before { content: '🛒'; font-size: 0.8rem; }

/* ═══════════════════════════════════════════
   FAQ
═══════════════════════════════════════════ */
.faq-block { margin: 2.5rem 0; }
.faq-item  {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.faq-q {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.faq-a {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════
   TARJETAS DE ARTÍCULOS (archivo / home)
═══════════════════════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.article-card .card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.article-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body    { padding: 1.1rem 1.2rem; }
.card-cat     { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); font-weight: 500; margin-bottom: 0.4rem; }
.card-title   { font-family: 'Playfair Display', serif; font-size: 1.05rem; line-height: 1.35; margin-bottom: 0.5rem; color: var(--ink); }
.card-excerpt { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 0.75rem; }
.card-meta    { font-size: 0.75rem; color: var(--ink-soft); display: flex; gap: 0.75rem; }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.sidebar-block h3,
.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.widget_categories ul { list-style: none; padding: 0; }
.widget_categories li a {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--warm);
  transition: color 0.2s;
}
.widget_categories li:last-child a { border-bottom: none; }
.widget_categories li a:hover      { color: var(--terracotta); }

/* ═══════════════════════════════════════════
   HERO DE CATEGORÍA
═══════════════════════════════════════════ */
.category-hero {
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.category-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.category-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  margin-top: 4rem;
  padding: 3rem 2rem 1.5rem;
}
.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
}
.footer-widget h3 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.85rem;
  font-family: 'DM Sans', sans-serif;
}
.footer-widget ul  { list-style: none; padding: 0; }
.footer-widget li  { margin-bottom: 0.5rem; }
.footer-widget a   { font-size: 0.85rem; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-widget a:hover { color: rgba(255,255,255,0.95); }
.affiliate-notice {
  background: rgba(255,255,255,0.05);
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  border-radius: 4px;
}
.site-info {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .articles-grid      { grid-template-columns: 1fr; }
  .footer-widgets     { grid-template-columns: 1fr 1fr; }
  .content-area       { max-width: 100%; }
}
@media (max-width: 600px) {
  .footer-widgets     { grid-template-columns: 1fr; }
  .entry-title        { font-size: 1.75rem; }
  .main-navigation    { display: none; }
}
