/*
Theme Name: Coches10 Minimal — Kadence Child
Theme URI: https://coches10.eu/
Description: Tema hijo minimalista para Coches10.eu. Solo estilos y tokens visuales: todas las páginas se maquetan en Gutenberg. Compatible por diseño con Kadence, GeoDirectory y NexoPress Ads (sin asumir APIs ni shortcodes).
Author: Coches10
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Template: kadence
Text Domain: coches10-minimal
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* 01. Tokens: este child theme NO crea páginas, menús, bloques ni anuncios. */
:root {
  --c10-bg: #f8faf8;
  --c10-surface: #ffffff;
  --c10-ink: #172522;
  --c10-muted: #52655f;
  --c10-action: #14675a;
  --c10-action-hover: #0b483e;
  --c10-tint: #edf5f1;
  --c10-border: #dae5df;
  --c10-radius-sm: 8px;
  --c10-radius: 14px;
  --c10-radius-lg: 20px;
  --c10-shadow: 0 10px 32px rgb(21 62 47 / 5%);
  --c10-space-1: .5rem;
  --c10-space-2: 1rem;
  --c10-space-3: 1.5rem;
  --c10-space-4: 2.25rem;
  --c10-space-5: clamp(2.75rem, 5vw, 5rem);
  --c10-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 02. Base: heredar estructura y cabeceras de Kadence. */
html { scroll-behavior: smooth; }
body { background-color: var(--c10-bg); color: var(--c10-ink); font-family: var(--c10-font); -webkit-font-smoothing: antialiased; }
:where(.site, #wrapper) { background-color: transparent; }
:where(p, li, dd) { overflow-wrap: break-word; }
:where(a) { text-underline-offset: .19em; }
:where(a:hover) { text-decoration-thickness: 1.5px; }
:where(img, svg, video) { max-width: 100%; }
:where(.site-header, #masthead) { background-color: var(--c10-surface); }
:where(.site-header, #masthead) :where(a, button) { transition: color .16s ease, background-color .16s ease; }
:where(.site-footer, #colophon) { background: var(--c10-surface); border-top: 1px solid var(--c10-border); }
:where(.site-footer, #colophon) a { color: var(--c10-ink); }

/* 03. Jerarquía y legibilidad. No forzar anchos de directorios/CPT ajenos. */
:where(.entry-title, .page-title) { font-weight: 750; letter-spacing: -.035em; line-height: 1.11; text-wrap: balance; }
.entry-content :where(h2, h3, h4, .wp-block-heading) { color: var(--c10-ink); letter-spacing: -.024em; line-height: 1.22; text-wrap: pretty; }
.entry-content :where(p, li) { line-height: 1.72; }
.entry-content :where(p, li, figcaption) { color: inherit; }
.entry-content :where(.wp-block-quote, blockquote) { border-inline-start: 3px solid var(--c10-action); padding-inline-start: var(--c10-space-3); color: var(--c10-muted); }
:where(.wp-block-image figcaption, .wp-block-gallery figcaption, .wp-block-table figcaption) { color: var(--c10-muted); font-size: .875rem; }
:where(.entry-meta, .posted-on, .byline) { color: var(--c10-muted); }
.entry-content :where(.wp-block-separator) { border-color: var(--c10-border); opacity: 1; }

/* 04. Gutenberg: colores y botones. Los colores elegidos manualmente en el bloque prevalecen. */
.entry-content :where(.wp-block-button__link, .wp-element-button) {
  border-radius: var(--c10-radius-sm);
  font-weight: 650;
  line-height: 1.35;
  padding: .85em 1.35em;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.entry-content :where(.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background)) {
  background-color: var(--c10-action);
  color: #ffffff;
}
.entry-content :where(.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background)):hover {
  background-color: var(--c10-action-hover);
  color: #ffffff;
  transform: translateY(-1px);
}
.entry-content :where(.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color)) {
  color: var(--c10-action);
  border-color: var(--c10-action);
  border-width: 1.5px;
}
.entry-content :where(.wp-block-button.is-style-outline .wp-block-button__link):hover { background-color: var(--c10-tint); }
.entry-content :where(.wp-block-buttons) { gap: .8rem; }
.entry-content :where(.wp-block-group) { min-width: 0; }
.entry-content :where(.wp-block-cover) { border-radius: var(--c10-radius); overflow: clip; }
.entry-content :where(.wp-block-table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content :where(.wp-block-table table) { border-collapse: collapse; width: 100%; font-size: .95rem; }
.entry-content :where(.wp-block-table th, .wp-block-table td) { padding: .8rem .9rem; border: 1px solid var(--c10-border); text-align: left; }
.entry-content :where(.wp-block-table thead) { background: var(--c10-tint); }
.entry-content :where(.wp-block-details) { border: 1px solid var(--c10-border); border-radius: var(--c10-radius-sm); padding: .8rem 1rem; background: var(--c10-surface); }
.entry-content :where(.wp-block-details summary) { cursor: pointer; font-weight: 650; }
.entry-content :where(.wp-block-query .wp-block-post-featured-image img) { border-radius: var(--c10-radius-sm); }
.entry-content :where(.wp-block-query .wp-block-post-title a) { color: var(--c10-ink); text-decoration: none; }
.entry-content :where(.wp-block-query .wp-block-post-title a):hover { color: var(--c10-action); }

/* 05. Gutenberg: clases optativas, desde Bloque > Avanzado > Clase CSS adicional. */
.entry-content .c10-section { margin-block: var(--c10-space-5); }
.entry-content .c10-hero {
  background: var(--c10-tint);
  border: 1px solid var(--c10-border);
  border-radius: var(--c10-radius-lg);
  padding: clamp(1.5rem, 5vw, 4.25rem);
}
.entry-content .c10-hero :where(h1, h2) { font-size: clamp(2.1rem, 5vw, 4.3rem); line-height: 1.06; letter-spacing: -.045em; max-width: 18ch; }
.entry-content .c10-hero :where(p) { max-width: 62ch; }
.entry-content .c10-card {
  background: var(--c10-surface);
  border: 1px solid var(--c10-border);
  border-radius: var(--c10-radius);
  padding: clamp(1rem, 2.7vw, 1.65rem);
  height: 100%;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.entry-content .c10-card:hover { border-color: #b6cec1; box-shadow: var(--c10-shadow); transform: translateY(-2px); }
.entry-content .c10-card :where(h2, h3, h4) { margin-block-start: 0; }
.entry-content .c10-card :where(p:last-child) { margin-block-end: 0; }
.entry-content .c10-soft { background: var(--c10-tint); border-radius: var(--c10-radius); padding: clamp(1rem, 3vw, 2rem); }
.entry-content .c10-eyebrow { color: var(--c10-action); text-transform: uppercase; font-size: .78rem; font-weight: 750; letter-spacing: .12em; }
.entry-content .c10-cta-band { background: var(--c10-ink); color: #ffffff; border-radius: var(--c10-radius-lg); padding: clamp(1.5rem, 4vw, 3rem); }
.entry-content .c10-cta-band :where(h2, h3, p) { color: #ffffff; }
.entry-content .c10-cta-band :where(a:not(.wp-block-button__link)) { color: #d4f9e2; }
.entry-content .c10-cta-band :where(.wp-block-button__link:not(.has-background)) { background: #ffffff; color: var(--c10-ink); }
.entry-content .c10-cta-band :where(.wp-block-button__link:not(.has-background)):hover { background: var(--c10-tint); color: var(--c10-ink); }
.entry-content .c10-pill { display: inline-block; width: fit-content; border-radius: 999px; background: var(--c10-tint); padding: .32rem .72rem; font-size: .8rem; font-weight: 650; }
.entry-content .c10-disclosure { border-inline-start: 3px solid var(--c10-action); background: var(--c10-tint); border-radius: 0 var(--c10-radius-sm) var(--c10-radius-sm) 0; padding: .9rem 1rem; font-size: .92rem; }
.entry-content .c10-muted { color: var(--c10-muted); }
.entry-content .c10-rule { border-bottom: 1px solid var(--c10-border); }

/* 06. Formularios nativos Gutenberg/WordPress, sin modificar formularios de GeoDirectory. */
:where(.entry-content .wp-block-search__input, .entry-content .wp-block-query-pagination, .entry-content .wp-block-search__button) { font-family: inherit; }
.entry-content .wp-block-search__input { border: 1px solid var(--c10-border); border-radius: var(--c10-radius-sm); min-height: 2.75rem; padding: .65rem .8rem; }
.entry-content .wp-block-search__button { border-radius: var(--c10-radius-sm); background: var(--c10-action); color: #ffffff; }
.entry-content .wp-block-search__button:hover { background: var(--c10-action-hover); }

/* 07. Accesibilidad, páginas estrechas y movimiento. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #965a0f; outline-offset: 3px; }
::selection { background: #cdebd9; color: var(--c10-ink); }
@media (max-width: 767px) {
  .entry-content .c10-hero { padding: 1.5rem; border-radius: var(--c10-radius); }
  .entry-content .c10-card { height: auto; }
  .entry-content .wp-block-search__inside-wrapper { flex-wrap: wrap; gap: .6rem; }
  .entry-content .wp-block-search__input { min-width: 0; flex: 1 1 12rem; }
  .entry-content .wp-block-search__button { margin: 0; }
  .entry-content :where(.wp-block-table th, .wp-block-table td) { min-width: 7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .entry-content :where(.c10-card, .wp-block-button__link, .wp-element-button) { transition: none; transform: none !important; }
}
