/*
Theme Name: Cual Conviene
Theme URI: https://cualconviene.com/
Author: Cual Conviene
Description: Tema editorial ligero para comparativas y guías de compra en México.
Version: 1.0.3
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: cualconviene
*/

:root {
  --cc-ink: #163438;
  --cc-ink-2: #315156;
  --cc-teal: #075e61;
  --cc-teal-dark: #06494b;
  --cc-mint: #dff4ec;
  --cc-cream: #fffaf0;
  --cc-paper: #ffffff;
  --cc-sand: #f4ead8;
  --cc-yellow: #f7c948;
  --cc-terracotta: #c8694c;
  --cc-line: #d9e2df;
  --cc-muted: #667a7c;
  --cc-shadow: 0 18px 50px rgba(18, 53, 55, .11);
  --cc-radius: 22px;
  --cc-radius-sm: 14px;
  --cc-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cc-ink);
  background: var(--cc-cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cc-teal); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--cc-teal-dark); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--cc-yellow); outline-offset: 3px; }
.cc-container { width: min(calc(100% - 36px), var(--cc-max)); margin-inline: auto; }
.cc-narrow { width: min(calc(100% - 36px), 780px); margin-inline: auto; }
.cc-main { min-height: 60vh; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 10000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px 18px; clip: auto; background: #fff; }

/* Header */
.cc-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(7,94,97,.12); background: rgba(255,250,240,.93); backdrop-filter: blur(14px); }
.cc-header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cc-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cc-ink); font-weight: 850; font-size: 1.23rem; letter-spacing: -.035em; text-decoration: none; }
.cc-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--cc-teal); box-shadow: 0 7px 18px rgba(7,94,97,.2); }
.cc-brand-mark svg { width: 22px; }
.cc-nav { display: flex; align-items: center; gap: 6px; }
.cc-nav ul { display: flex; align-items: center; gap: 3px; list-style: none; margin: 0; padding: 0; }
.cc-nav a { display: block; padding: 10px 12px; border-radius: 11px; color: var(--cc-ink); font-size: .92rem; font-weight: 700; text-decoration: none; }
.cc-nav a:hover, .cc-nav .current-menu-item > a { background: var(--cc-mint); color: var(--cc-teal-dark); }
.cc-menu-toggle { display: none; padding: 9px 11px; color: var(--cc-ink); border: 1px solid var(--cc-line); border-radius: 10px; background: #fff; cursor: pointer; }

/* Hero */
.cc-hero { position: relative; overflow: hidden; min-height: 620px; display: grid; align-items: center; background: #f7efe2; }
.cc-hero-media { position: absolute; inset: 0; }
.cc-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cc-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,250,240,.98) 0%, rgba(255,250,240,.94) 35%, rgba(255,250,240,.38) 62%, rgba(255,250,240,.04) 100%); }
.cc-hero-content { position: relative; z-index: 1; width: min(650px, 58%); padding: 100px 0; }
.cc-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--cc-teal); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.cc-eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--cc-yellow); }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; }
.cc-hero h1 { margin: 0; max-width: 640px; font-size: clamp(3rem, 6vw, 5.6rem); letter-spacing: -.065em; }
.cc-hero h1 span { color: var(--cc-teal); }
.cc-hero-lead { max-width: 580px; margin: 24px 0 30px; color: var(--cc-ink-2); font-size: clamp(1.08rem, 2vw, 1.28rem); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cc-button, .cc-offer-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border: 2px solid var(--cc-teal); border-radius: 13px; color: #fff; background: var(--cc-teal); font-weight: 800; line-height: 1.2; text-decoration: none; box-shadow: 0 9px 24px rgba(7,94,97,.18); transition: transform .2s, box-shadow .2s, background .2s; }
.cc-button:hover, .cc-offer-button:hover { transform: translateY(-2px); color: #fff; background: var(--cc-teal-dark); box-shadow: 0 13px 28px rgba(7,94,97,.22); }
.cc-button--ghost { color: var(--cc-teal); background: rgba(255,255,255,.75); box-shadow: none; }
.cc-button--ghost:hover { color: #fff; }
.cc-trust-row { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 35px; color: var(--cc-ink-2); font-size: .88rem; font-weight: 650; }
.cc-trust-row span::before { content: "✓"; margin-right: 7px; color: var(--cc-teal); font-weight: 900; }

/* Sections and cards */
.cc-section { padding: 86px 0; }
.cc-section--paper { background: var(--cc-paper); }
.cc-section--mint { background: var(--cc-mint); }
.cc-section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.cc-section-head h2 { max-width: 700px; margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); }
.cc-section-head p { max-width: 500px; margin: 0; color: var(--cc-muted); }
.cc-grid { display: grid; gap: 24px; }
.cc-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cc-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cc-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cc-card { position: relative; overflow: hidden; border: 1px solid var(--cc-line); border-radius: var(--cc-radius); background: #fff; box-shadow: 0 8px 25px rgba(18,53,55,.06); }
.cc-card-link { display: flex; height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.cc-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cc-sand); }
.cc-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.cc-card:hover .cc-card-media img { transform: scale(1.035); }
.cc-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.cc-card-kicker { margin-bottom: 8px; color: var(--cc-terracotta); font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.cc-card h3 { margin: 0 0 10px; font-size: 1.35rem; }
.cc-card p { margin: 0; color: var(--cc-muted); font-size: .95rem; }
.cc-card-more { margin-top: auto; padding-top: 20px; color: var(--cc-teal); font-weight: 800; }
.cc-stat { padding: 28px; border-radius: var(--cc-radius); background: var(--cc-ink); color: #fff; }
.cc-stat strong { display: block; color: var(--cc-yellow); font-size: 2.3rem; line-height: 1; }
.cc-stat span { display: block; margin-top: 9px; color: #dce9e7; }
.cc-process { counter-reset: steps; }
.cc-process .cc-card-body::before { counter-increment: steps; content: counter(steps); display: grid; width: 42px; height: 42px; margin-bottom: 18px; place-items: center; border-radius: 50%; color: var(--cc-teal-dark); background: var(--cc-yellow); font-weight: 900; }

/* Page and article */
.cc-page-hero { padding: 80px 0 55px; background: linear-gradient(145deg, var(--cc-mint), var(--cc-cream)); }
.cc-page-hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 54px; }
.cc-page-hero h1 { margin: 0; max-width: 800px; font-size: clamp(2.6rem, 5vw, 4.7rem); }
.cc-page-intro { max-width: 720px; margin: 20px 0 0; color: var(--cc-ink-2); font-size: 1.15rem; }
.cc-page-hero-image { overflow: hidden; border-radius: 30px; box-shadow: var(--cc-shadow); }
.cc-page-hero-image img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.cc-product-image-link { position: relative; display: block; color: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.cc-product-image-link:hover { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(15, 23, 42, .2); }
.cc-product-image-link:focus-visible { outline: 4px solid var(--cc-accent); outline-offset: 4px; }
.cc-product-image-action { position: absolute; right: 16px; bottom: 16px; padding: 10px 14px; border-radius: 999px; background: rgba(15, 23, 42, .9); color: #fff; font-size: .82rem; font-weight: 750; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.cc-image-caption { margin: 10px 4px 0; color: var(--cc-muted); font-size: .73rem; line-height: 1.45; }
.cc-breadcrumbs { padding: 17px 0; color: var(--cc-muted); font-size: .82rem; }
.cc-breadcrumbs a { color: inherit; }
.cc-content-wrap { padding: 55px 0 100px; }
.cc-prose { font-size: 1.04rem; }
.cc-prose > *:first-child { margin-top: 0; }
.cc-prose h2 { margin: 2.5em 0 .75em; font-size: clamp(1.8rem, 3vw, 2.55rem); }
.cc-prose h3 { margin: 2em 0 .65em; font-size: 1.45rem; }
.cc-prose p, .cc-prose ul, .cc-prose ol { margin: 0 0 1.3em; }
.cc-prose li + li { margin-top: .45em; }
.cc-prose blockquote, .cc-note { margin: 30px 0; padding: 22px 24px; border-left: 5px solid var(--cc-yellow); border-radius: 0 var(--cc-radius-sm) var(--cc-radius-sm) 0; background: #fff8de; }
.cc-prose table { width: 100%; margin: 30px 0; border-collapse: collapse; background: #fff; font-size: .92rem; }
.cc-prose th, .cc-prose td { padding: 13px 14px; border: 1px solid var(--cc-line); text-align: left; vertical-align: top; }
.cc-prose th { background: var(--cc-mint); }
.cc-disclosure { margin: 25px 0; padding: 16px 20px; border: 1px solid #edddb4; border-radius: var(--cc-radius-sm); color: #68572e; background: #fff8e8; font-size: .86rem; }
.cc-byline { display: flex; flex-wrap: wrap; gap: 7px 20px; margin-top: 23px; color: var(--cc-muted); font-size: .86rem; }
.cc-toc { margin: 30px 0; padding: 24px; border: 1px solid var(--cc-line); border-radius: var(--cc-radius); background: #fff; }
.cc-toc strong { display: block; margin-bottom: 10px; }
.cc-toc ol { margin: 0; padding-left: 22px; }

/* Offers */
.cc-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; margin: 30px 0; padding: 24px; border: 2px solid var(--cc-mint); border-radius: var(--cc-radius); background: #fff; box-shadow: 0 12px 32px rgba(18,53,55,.08); }
.cc-offer h3 { margin: 0 0 7px; font-size: 1.22rem; }
.cc-offer-meta { display: flex; flex-wrap: wrap; gap: 6px 15px; color: var(--cc-muted); font-size: .84rem; }
.cc-offer-price { margin-top: 11px; color: var(--cc-ink); font-size: 1.55rem; font-weight: 900; line-height: 1; }
.cc-offer-price small { display: block; margin-top: 7px; color: var(--cc-muted); font-size: .72rem; font-weight: 600; line-height: 1.35; }
.cc-offer-actions { text-align: center; }
.cc-offer-note { display: block; max-width: 190px; margin-top: 8px; color: var(--cc-muted); font-size: .72rem; line-height: 1.35; }
.cc-score { display: inline-flex; align-items: center; gap: 5px; color: #725800; font-weight: 800; }

/* Calculator */
.cc-calculator { margin: 34px 0; padding: 28px; border-radius: var(--cc-radius); color: #fff; background: var(--cc-ink); box-shadow: var(--cc-shadow); }
.cc-calculator h3 { margin-top: 0; font-size: 1.55rem; }
.cc-calculator p { color: #d6e3e1; }
.cc-calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.cc-field label { display: block; margin-bottom: 6px; color: #e6efed; font-size: .85rem; font-weight: 750; }
.cc-field input, .cc-field select { width: 100%; min-height: 47px; padding: 10px 12px; border: 1px solid #789092; border-radius: 10px; color: var(--cc-ink); background: #fff; }
.cc-calc-button { margin-top: 15px; border-color: var(--cc-yellow); color: var(--cc-ink); background: var(--cc-yellow); cursor: pointer; box-shadow: none; }
.cc-calc-result { display: none; margin-top: 20px; padding: 18px; border-radius: 12px; color: var(--cc-ink); background: var(--cc-mint); font-weight: 750; }
.cc-calc-result.is-visible { display: block; }

/* Footer */
.cc-site-footer { padding: 58px 0 25px; color: #dce9e7; background: var(--cc-ink); }
.cc-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.cc-site-footer .cc-brand { color: #fff; }
.cc-footer-about { max-width: 360px; margin-top: 16px; color: #b9ccca; font-size: .9rem; }
.cc-site-footer h2 { margin: 5px 0 14px; color: #fff; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.cc-site-footer ul { list-style: none; margin: 0; padding: 0; }
.cc-site-footer li + li { margin-top: 8px; }
.cc-site-footer a { color: #dce9e7; font-size: .88rem; text-decoration: none; }
.cc-site-footer a:hover { color: var(--cc-yellow); }
.cc-footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 45px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); color: #9fb6b4; font-size: .77rem; }

/* Misc */
.cc-empty { padding: 80px 0; text-align: center; }
.cc-legal-placeholder { padding: 2px 5px; border-radius: 4px; color: #7a2400; background: #ffe2d5; font-weight: 800; }
.cc-updated { display: inline-block; padding: 6px 10px; border-radius: 999px; color: var(--cc-teal-dark); background: var(--cc-mint); font-size: .76rem; font-weight: 800; }
@media (max-width: 980px) {
  .cc-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cc-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cc-page-hero-grid { grid-template-columns: 1fr; }
  .cc-page-hero-image { max-width: 700px; }
  .cc-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-menu-toggle { display: inline-flex; }
  .cc-nav { position: absolute; top: 76px; left: 18px; right: 18px; display: none; padding: 14px; border: 1px solid var(--cc-line); border-radius: var(--cc-radius-sm); background: #fff; box-shadow: var(--cc-shadow); }
  .cc-nav.is-open { display: block; }
  .cc-nav ul { align-items: stretch; flex-direction: column; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .cc-hero { min-height: 620px; align-items: end; }
  .cc-hero-media::after { background: linear-gradient(0deg, rgba(255,250,240,.99) 12%, rgba(255,250,240,.9) 55%, rgba(255,250,240,.25) 100%); }
  .cc-hero-media img { object-position: 68% center; }
  .cc-hero-content { width: 100%; padding: 230px 0 55px; }
  .cc-section { padding: 62px 0; }
  .cc-section-head { align-items: start; flex-direction: column; }
  .cc-grid--4, .cc-grid--3, .cc-grid--2 { grid-template-columns: 1fr; }
  .cc-page-hero { padding: 60px 0 40px; }
  .cc-page-hero-grid { gap: 30px; }
  .cc-offer { grid-template-columns: 1fr; }
  .cc-offer-actions { text-align: left; }
  .cc-offer-note { max-width: none; }
  .cc-calc-grid { grid-template-columns: 1fr; }
  .cc-footer-grid { grid-template-columns: 1fr; }
  .cc-footer-bottom { flex-direction: column; }
  .cc-prose table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
