/*
Theme Name: Consejos Top
Theme URI: https://consejostop.com
Author: Consejos Top
Description: Tema de blog para consejos de salud, belleza y bienestar. Ligero, responsive, sin dependencias y listo para SEO.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: consejostop
*/

:root {
  --ink: #1f2a26;
  --ink-soft: #55635d;
  --paper: #fafbf8;
  --white: #ffffff;
  --forest: #1f4a3d;
  --sage: #6f9a88;
  --mist: #e4eee9;
  --blush: #f4dad5;
  --rose: #b9435a;
  --lavender: #e5e0f1;
  --butter: #f5e7c8;
  --line: #dde5e0;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-underline-offset: 3px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--forest); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--forest); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--forest); text-decoration: none; letter-spacing: -.02em; }
.brand-name:hover { color: var(--rose); }
.primary-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-cat > a, .primary-nav .current_page_item > a { background: var(--mist); color: var(--forest); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; color: var(--forest); cursor: pointer; }

/* Placeholder de imagen */
.ph { position: relative; aspect-ratio: 3 / 2; display: grid; place-items: center; overflow: hidden; background: var(--mist); border-radius: var(--radius); }
.ph::before { content: ""; position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.55); right: -14%; bottom: -34%; }
.ph span { position: relative; font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--forest); opacity: .65; }
.cat-salud .ph, .tint-salud { background: var(--mist); }
.cat-belleza .ph, .tint-belleza { background: var(--blush); }
.cat-bienestar .ph, .tint-bienestar { background: var(--lavender); }
.cat-alimentacion .ph, .tint-alimentacion { background: var(--butter); }
.thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* Etiquetas y metadatos */
.cat-label { font-weight: 600; font-size: .95rem; color: var(--rose); text-decoration: none; }
.cat-label:hover { text-decoration: underline; }
.meta { color: var(--ink-soft); font-size: .92rem; }
.meta span + span::before { content: "\00a0\2022\00a0"; }

/* Portada: destacado */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 a { color: inherit; text-decoration: none; }
.hero h1 a:hover { color: var(--rose); }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.hero .intro { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 18px; }
.btn { display: inline-block; background: var(--forest); color: #fff; padding: 12px 24px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 0; font-family: inherit; font-size: 1rem; cursor: pointer; }
.btn:hover { background: var(--rose); color: #fff; }

/* Franja de categorías */
.cat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 56px; }
.cat-tile { display: block; padding: 22px 22px 20px; border-radius: var(--radius); text-decoration: none; color: var(--forest); }
.cat-tile strong { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.cat-tile small { color: var(--ink-soft); font-size: .92rem; }
.cat-tile:hover { color: var(--rose); }

/* Secciones */
.section { padding: 40px 0 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
.card .thumb, .card .ph { margin-bottom: 14px; }
.card h3 { margin: 4px 0 8px; font-size: 1.3rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--rose); }
.card p.excerpt { color: var(--ink-soft); font-size: 1rem; margin-bottom: 8px; }

/* Listas por categoría */
.cat-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 56px; }
.cat-row h2 { display: flex; align-items: baseline; justify-content: space-between; }
.cat-row h2 a { color: inherit; text-decoration: none; }
.cat-row ul { list-style: none; margin: 0; padding: 0; }
.cat-row li { padding: 14px 0 14px 16px; border-left: 4px solid var(--blush); margin-bottom: 10px; }
.row-salud li { border-color: var(--sage); }
.row-belleza li { border-color: #e6a9a8; }
.row-bienestar li { border-color: #b3a7d6; }
.row-alimentacion li { border-color: #e2c27a; }
.cat-row li a { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--forest); text-decoration: none; display: block; line-height: 1.3; }
.cat-row li a:hover { color: var(--rose); }

/* Suscripción */
.newsletter { background: var(--forest); color: #fff; padding: 56px 0; }
.newsletter h2, .newsletter h3 { color: #fff; }
.newsletter p { color: #d6e4dd; max-width: 56ch; }
.newsletter input[type="email"], .newsletter input[type="text"] { padding: 12px 16px; border-radius: 999px; border: 0; font: inherit; min-width: 260px; }
.newsletter input[type="submit"], .newsletter button { background: var(--blush); color: var(--forest); border: 0; border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 700; cursor: pointer; }

/* Entrada */
.entry-head { max-width: 760px; margin: 0 auto; padding: 56px 24px 24px; }
.entry-head h1 { margin: 6px 0 14px; }
.entry-thumb { max-width: 960px; margin: 0 auto 32px; padding: 0 24px; }
.entry-thumb img { width: 100%; border-radius: var(--radius); }
.prose { max-width: 700px; margin: 0 auto; padding: 0 24px 24px; font-family: var(--sans); font-size: 1.125rem; line-height: 1.78; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--sage); font-family: var(--serif); font-size: 1.2rem; color: var(--forest); }
.prose img { border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1.4em; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.disclaimer { max-width: 700px; margin: 12px auto 0; padding: 0 24px; }
.disclaimer p { background: var(--mist); border-radius: var(--radius); padding: 16px 20px; font-size: .95rem; color: var(--ink-soft); margin: 0; }
.entry-foot { max-width: 700px; margin: 20px auto 0; padding: 0 24px; }
.tags a { display: inline-block; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; margin: 0 6px 6px 0; font-size: .9rem; text-decoration: none; color: var(--ink-soft); }
.related { margin-top: 56px; padding: 40px 0 56px; background: var(--white); border-top: 1px solid var(--line); }

/* Archivo y búsqueda */
.archive-head { padding: 56px 0 28px; }
.archive-head p { color: var(--ink-soft); max-width: 60ch; font-size: 1.1rem; }
.pagination { display: flex; gap: 8px; justify-content: center; padding: 40px 0 0; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--white); }
.pagination .current, .pagination a:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input[type="search"] { flex: 1; min-width: 200px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
.empty { padding: 56px 0; }

/* Comentarios */
.comments { max-width: 700px; margin: 48px auto 0; padding: 0 24px; }
.comments ol { list-style: none; padding: 0; }
.comments li.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comments .children { padding-left: 24px; }
.comments input[type="text"], .comments input[type="email"], .comments input[type="url"], .comments textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; margin-bottom: 12px; }
.comments input[type="submit"] { background: var(--forest); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 600; cursor: pointer; }

/* Pie */
.site-footer { background: var(--white); border-top: 1px solid var(--line); margin-top: 0; padding: 48px 0 24px; font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h3 { font-size: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--rose); text-decoration: underline; }
.copyright { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; color: var(--ink-soft); font-size: .9rem; }

/* Alineaciones de WordPress */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .9rem; color: var(--ink-soft); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
  .cat-rows { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: inline-block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; z-index: 50; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .site-header { position: relative; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter input[type="email"] { min-width: 0; width: 100%; margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
