/* ==========================================================================
   Pádel Guía — hoja de estilos principal
   Diseño: mobile-first, sin dependencias, optimizado para Core Web Vitals
   ========================================================================== */

:root {
  --navy:      #0A1B33;
  --navy-2:    #12294A;
  --navy-3:    #1D4070;
  --lime:      #C6F24E;
  --lime-2:    #A8DC2E;
  --lime-text: #4F7A08; /* variante oscura para texto sobre fondos claros (contraste AA) */
  --bg:        #F6F8FB;
  --card:      #FFFFFF;
  --text:      #17212E;
  --muted:     #5A6675;
  --border:    #E3E9F0;
  --amber-bg:  #FFF8E1;
  --amber-bd:  #F2D47E;
  --amber-tx:  #6B5312;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 6px 24px rgba(10, 27, 51, .08);
  --shadow-lg: 0 18px 50px rgba(10, 27, 51, .14);
  --max:       1160px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-disp: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--navy-3); }
a:hover { color: var(--navy); }

h1, h2, h3 { font-family: var(--font-disp); letter-spacing: .01em; line-height: 1.15; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; margin: .4rem 0 1rem; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; margin: 2.6rem 0 1rem; text-transform: uppercase; }
h3 { font-size: 1.35rem; font-weight: 700; margin: 1.6rem 0 .5rem; }
p  { margin: 0 0 1rem; }

.container { width: min(100% - 2.2rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: .7rem 1rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--lime-2); outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font: 700 .95rem/1 var(--font-body); padding: .95rem 1.4rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--lime); color: var(--navy); }
.btn-primary:hover { background: var(--lime-2); color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-block { width: 100%; }

.chip {
  display: inline-block; background: rgba(198, 242, 78, .22); color: var(--navy);
  border: 1px solid rgba(168, 220, 46, .55); border-radius: 999px;
  padding: .28rem .75rem; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}

/* --------------------------------------------------------------- Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; min-height: 66px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #EDFFB0, var(--lime) 55%, var(--lime-2));
  position: relative; flex: none; box-shadow: inset 0 0 0 2px rgba(10, 27, 51, .12);
}
.brand-mark::before, .brand-mark::after {
  content: ''; position: absolute; inset: 3px 11px; border-radius: 50%;
  border: 2px solid rgba(10, 27, 51, .35); border-top: 0; border-bottom: 0;
}
.brand-mark::after { transform: rotate(90deg); }
.brand-name { font-family: var(--font-disp); font-weight: 800; font-size: 1.45rem; text-transform: uppercase; color: var(--navy); line-height: 1; }
.brand-name span { color: var(--lime-text); }

.main-nav { display: none; align-items: center; gap: 1.1rem; }
.main-nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy-3); box-shadow: inset 0 -3px 0 var(--lime-2); }

.pais-btn {
  display: inline-flex; align-items: center; gap: .45rem; background: #fff;
  border: 1.5px solid var(--border); border-radius: 999px; padding: .5rem .85rem;
  font: 600 .88rem var(--font-body); color: var(--navy); cursor: pointer;
}
.pais-btn:hover { border-color: var(--lime-2); }

/* --------------------------------------------------------------- Hero */
.hero {
  background:
    linear-gradient(120deg, rgba(10, 27, 51, .96), rgba(18, 41, 74, .92)),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(255, 255, 255, .05) 84px 86px);
  color: #fff; padding: clamp(2.6rem, 7vw, 5rem) 0;
  border-bottom: 5px solid var(--lime);
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero p { color: #C9D6E8; max-width: 56ch; font-size: 1.08rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.8rem; color: #9FB3CC; font-size: .86rem; }
.hero-trust b { color: #fff; }

/* --------------------------------------------------------------- Secciones */
.section { padding: clamp(2.4rem, 6vw, 4rem) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: 1.8rem; }
.section-head p { color: var(--muted); }
.eyebrow { font: 800 .78rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--lime-text); }

.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 a { text-decoration: none; color: var(--navy); }
.card p { color: var(--muted); font-size: .95rem; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; text-decoration: none; }
.card-link::after { content: '→'; transition: transform .15s ease; }
.card-link:hover::after { transform: translateX(3px); }

/* Tarjetas de categoría (home) */
.cat-card { position: relative; overflow: hidden; display: block; text-decoration: none; padding: 1.5rem; min-height: 168px; }
.cat-card .cat-emoji { font-size: 2rem; }
.cat-card h3 { margin: .6rem 0 .3rem; color: var(--navy); }
.cat-card p { margin: 0; }
.cat-card::after {
  content: ''; position: absolute; right: -30px; bottom: -40px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(198, 242, 78, .35); transition: transform .25s ease;
}
.cat-card:hover { border-color: var(--lime-2); }
.cat-card:hover::after { transform: scale(1.25); }

/* --------------------------------------------------------------- Ficha de producto */
.product {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative;
}
.product + .product { margin-top: 1.3rem; }
.product-rank {
  position: absolute; top: 12px; left: 12px; z-index: 2; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--lime);
  font: 800 1.25rem var(--font-disp);
}
.product-head { display: flex; gap: 1rem; padding: 1.1rem 1.1rem 0; align-items: flex-start; }
.product-thumb {
  flex: none; width: 92px; height: 92px; border-radius: var(--radius-sm);
  background: linear-gradient(140deg, var(--navy-2), var(--navy-3));
  display: grid; place-items: center; font-size: 2.4rem;
}
.product-meta { flex: 1; min-width: 0; }
.product-award { font: 800 .72rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--lime-text); }
.product-meta h3 { margin: .2rem 0 .35rem; }
.product-score { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--muted); }
.stars { color: #F5A623; letter-spacing: .08em; font-size: .95rem; }
.product-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.product-verdict { font-size: .96rem; margin: 0; }
.product-cols { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.pros, .cons { list-style: none; margin: 0; padding: .85rem .95rem; border-radius: var(--radius-sm); font-size: .88rem; }
.pros { background: #F2FBE0; }
.cons { background: #FDEFEF; }
.pros li::before { content: '✔ '; color: #4E8A12; font-weight: 700; }
.cons li::before { content: '✘ '; color: #B23B3B; font-weight: 700; }
.product-buy {
  margin-top: auto; border-top: 1px dashed var(--border); padding-top: .95rem;
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
}
.price { font: 800 1.35rem var(--font-disp); color: var(--navy); }
.price small { display: block; font: 500 .72rem var(--font-body); color: var(--muted); }
.product-buy .btn { flex: 1; min-width: 190px; }

/* --------------------------------------------------------------- Tabla comparativa */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .9rem; }
table.compare th, table.compare td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
table.compare thead th {
  background: var(--navy); color: #fff; font: 700 .8rem var(--font-body);
  letter-spacing: .06em; text-transform: uppercase; position: sticky; top: 0;
}
table.compare tbody tr:nth-child(even) { background: #FAFCFF; }
table.compare td b { color: var(--navy); }

/* --------------------------------------------------------------- Artículo */
.article-layout { display: grid; gap: 2rem; }
.article-body { max-width: 72ch; }
.article-body ul, .article-body ol { padding-left: 1.2rem; }
.article-body li { margin-bottom: .45rem; }
.article-body h2 { scroll-margin-top: 90px; }
.article-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; color: var(--muted); font-size: .85rem; align-items: center; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy-3); color: #fff;
  display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem;
}

.aviso-afiliado {
  background: var(--amber-bg); border: 1px solid var(--amber-bd); color: var(--amber-tx);
  border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .85rem; margin: 1.2rem 0;
}
.aviso-afiliado b { text-transform: uppercase; letter-spacing: .05em; }

.toc {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; font-size: .92rem;
}
.toc h2 { font-size: 1rem; margin: 0 0 .6rem; letter-spacing: .08em; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin-bottom: .35rem; }
.toc a { text-decoration: none; }

.callout {
  border-left: 5px solid var(--lime-2); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem; box-shadow: var(--shadow); margin: 1.4rem 0;
}
.callout h3 { margin-top: 0; }
.callout h2 { font-size: 1.3rem; margin: 0 0 .5rem; }

/* --------------------------------------------------------------- FAQ */
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .2rem 1.1rem; margin-bottom: .7rem;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: .85rem 0; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--lime-2); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: .9rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------- Newsletter */
.newsletter {
  background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-lg);
}
.newsletter h2 { color: #fff; margin-top: 0; }
.newsletter p { color: #B9C8DC; }
.newsletter-form { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.newsletter-form input {
  flex: 1; min-width: 240px; border: none; border-radius: 999px; padding: .95rem 1.2rem;
  font: 500 1rem var(--font-body);
}
.newsletter-note { font-size: .78rem; color: #8FA3BD; margin: .8rem 0 0; }

/* --------------------------------------------------------------- Pie */
.site-footer { background: var(--navy); color: #AFC0D6; margin-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; padding: 3rem 0 2rem; grid-template-columns: 1fr; }
.site-footer h3 { color: #fff; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .9rem; }
.site-footer a { color: #AFC0D6; text-decoration: none; display: block; margin-bottom: .5rem; font-size: .92rem; }
.site-footer a:hover { color: var(--lime); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.3rem 0 2rem; font-size: .8rem; color: #8497B1; }

/* --------------------------------------------------------------- Selector de país (inyectado por JS) */
.pais-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: var(--navy);
  color: #fff; padding: .9rem 1rem; box-shadow: 0 -8px 30px rgba(10, 27, 51, .35);
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: center;
  transform: translateY(0); transition: transform .3s ease;
}
.pais-banner[hidden] { display: none; }
.pais-banner--flash { animation: paisFlash 1.1s ease 2; }
@keyframes paisFlash {
  0%, 100% { box-shadow: 0 -8px 30px rgba(10, 27, 51, .35); }
  50% { box-shadow: 0 -8px 40px rgba(198, 242, 78, .95), inset 0 0 0 2px var(--lime); }
}
.pais-banner p { margin: 0; font-size: .9rem; }
.pais-opciones { display: flex; gap: .45rem; flex-wrap: wrap; }
.pais-opciones button {
  background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: .4rem .8rem; font: 600 .85rem var(--font-body); cursor: pointer;
}
.pais-opciones button:hover { background: var(--lime); color: var(--navy); border-color: var(--lime); }

/* --------------------------------------------------------------- Utilidades */
.notas-fuente { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: .9rem; margin-top: 1.6rem; }
.relacionados { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------- Responsive */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-cols { grid-template-columns: 1fr 1fr; }
  .relacionados { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .article-aside { order: 2; }
  .article-aside .toc { position: sticky; top: 90px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .pais-banner, .newsletter { display: none !important; }
  body { background: #fff; }
}
