/* =========================================================
   Llaveya.es — Hoja de estilos principal
   ========================================================= */

:root {
  --black: #0d0d0d;
  --black-soft: #181818;
  --black-elev: #232323;
  --yellow: #f6c500;
  --yellow-dark: #d9ad00;
  --yellow-soft: #fff4cc;
  --white: #ffffff;
  --gray-50: #f7f7f5;
  --gray-100: #efeee9;
  --gray-300: #d8d6cf;
  --gray-600: #5c594f;
  --gray-800: #2b2a25;

  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 10px 30px rgba(13, 13, 13, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(13, 13, 13, 0.14);

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--black);
}

h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: none;
}

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

ul { margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--tight { padding: 56px 0; }

.section--dark {
  background: var(--black);
  color: var(--gray-100);
}

.section--dark h2, .section--dark h3 { color: var(--white); }

.section--alt { background: var(--gray-100); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-800);
  margin-bottom: 14px;
}

.hero .eyebrow, .section--dark .eyebrow { color: var(--yellow); }

.section-head {
  max-width: 700px;
  margin-bottom: 46px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lede {
  font-size: 1.08rem;
  color: var(--gray-600);
}

.section--dark .lede { color: #cfcdc4; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 8px 20px rgba(246, 197, 0, 0.35);
}

.btn-primary:hover {
  background: var(--yellow-dark);
  box-shadow: 0 10px 26px rgba(246, 197, 0, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-dark {
  background: var(--black);
  color: var(--white);
}

.btn-dark:hover { background: var(--black-elev); }

.btn-whatsapp {
  background: #0e7a41;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 122, 65, 0.35);
}

.btn-whatsapp:hover {
  background: #0a5f32;
  box-shadow: 0 10px 26px rgba(14, 122, 65, 0.45);
}

.btn-whatsapp svg { flex-shrink: 0; }

.btn-block { width: 100%; }

.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  height: 34px;
  width: auto;
  border-radius: 6px;
  display: block;
}

.site-header .brand-logo,
.site-footer .brand-logo {
  border: 1px solid var(--yellow);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #e7e5dd;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--yellow);
  border-color: var(--yellow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(circle at 82% 20%, #262319 0%, var(--black) 55%);
  color: var(--white);
  padding: 92px 0 76px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 { color: var(--white); }

.hero h1 mark {
  background: none;
  color: var(--yellow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-note {
  margin-top: 22px;
  font-size: 0.86rem;
  color: #b8b6ac;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--yellow);
}

.hero-stat span {
  font-size: 0.8rem;
  color: #b8b6ac;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art .key-badge {
  width: min(420px, 100%);
  aspect-ratio: 972 / 317;
  border-radius: 24px;
  background: linear-gradient(155deg, #1c1a12, var(--black) 60%);
  border: 1px solid rgba(246, 197, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.hero-logo { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cards / grids ---------- */

.grid {
  display: grid;
  gap: 26px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

/* Tarjetas de "casos habituales" con botón de WhatsApp: el botón
   siempre queda alineado al fondo, aunque el texto de cada tarjeta
   tenga distinta longitud. */
.grid-4 .card {
  display: flex;
  flex-direction: column;
}

.grid-4 .card .btn {
  margin-top: auto;
  padding-top: 12px;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-icon svg { width: 26px; height: 26px; stroke: var(--yellow); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--black);
  border-bottom: 2px solid var(--yellow);
}

.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: var(--gray-800);
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 10px;
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--yellow);
  display: block;
  margin-bottom: 10px;
}

.step h3 { margin-bottom: 8px; }

.step p { color: var(--gray-600); font-size: 0.94rem; margin: 0; }

/* ---------- Brands ---------- */

.brands-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-input input:focus {
  outline: none;
  border-color: var(--yellow-dark);
  box-shadow: 0 0 0 3px rgba(246, 197, 0, 0.25);
}

.result-count {
  font-size: 0.85rem;
  color: var(--gray-600);
  white-space: nowrap;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.brand-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 22px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.brand-card:hover, .brand-card[aria-expanded="true"] {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--yellow-dark);
}

.brand-card h3 {
  font-size: 1.04rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-card .chev {
  transition: transform 0.2s ease;
  color: var(--gray-600);
}

.brand-card[aria-expanded="true"] .chev { transform: rotate(180deg); }

.brand-card .brand-hint {
  font-size: 0.84rem;
  color: var(--gray-600);
  margin: 0;
}

.brand-detail {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--gray-300);
  font-size: 0.88rem;
  color: var(--gray-800);
}

.brand-card[aria-expanded="true"] .brand-detail { display: block; }

.brand-card.is-hidden { display: none; }

.no-results {
  display: none;
  text-align: center;
  padding: 50px 20px;
  color: var(--gray-600);
}

.no-results.is-visible { display: block; }

/* ---------- Glossary ---------- */

.glossary-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.alpha-nav a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.alpha-nav a:hover, .alpha-nav a.is-active {
  background: var(--yellow);
  color: var(--black);
}

.glossary-group {
  margin-bottom: 34px;
}

.glossary-group h2 {
  font-size: 1.1rem;
  color: var(--yellow-dark);
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.glossary-term {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}

.glossary-term:last-child { border-bottom: none; }

.glossary-term dt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--black);
  margin-bottom: 6px;
}

.glossary-term dd {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.glossary-term.is-hidden { display: none; }

/* ---------- FAQ accordion ---------- */

.faq-list {
  border-top: 1px solid var(--gray-300);
}

.section--dark .faq-list { border-color: #3a382e; }

.faq-item {
  border-bottom: 1px solid var(--gray-300);
}

.section--dark .faq-item { border-color: #3a382e; }

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: inherit;
}

.faq-question .plus {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"] .plus { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 4px 20px;
  color: var(--gray-600);
  font-size: 0.95rem;
  max-width: 720px;
}

.section--dark .faq-answer p { color: #cfcdc4; }

/* ---------- Google rating badge ---------- */

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rating-badge:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.rating-badge-score {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
}

.rating-badge-stars {
  color: var(--yellow-dark);
  letter-spacing: 1px;
}

.rating-badge-count {
  font-size: 0.86rem;
  color: var(--gray-600);
  border-left: 1px solid var(--gray-300);
  padding-left: 10px;
}

/* ---------- Testimonials ---------- */

.testimonial {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-100);
}

.testimonial .stars { color: var(--yellow-dark); letter-spacing: 2px; margin-bottom: 12px; }

.testimonial p { font-style: italic; color: var(--gray-800); }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--black);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-author strong { font-family: var(--font-heading); font-size: 0.9rem; }
.testimonial-author span:not(.avatar) { display: block; font-size: 0.78rem; color: var(--gray-600); }

/* ---------- WhatsApp CTA block ---------- */

.wa-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.wa-card .wa-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.wa-card .wa-icon svg { width: 32px; height: 32px; }

.wa-card ul {
  list-style: none;
  display: inline-block;
  text-align: left;
  margin: 20px 0 28px;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.wa-card ul li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}

.wa-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--yellow-dark);
  font-weight: 700;
}

/* ---------- Contact info blocks ---------- */

.info-list {
  display: grid;
  gap: 22px;
}

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-item .card-icon { flex-shrink: 0; margin-bottom: 0; }

.info-item h3 { margin-bottom: 4px; font-size: 1rem; }
.info-item p { margin: 0; color: var(--gray-600); font-size: 0.92rem; }

.todo-flag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b3261e;
  background: #fdeceb;
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- Models table (brand pages) ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin: 24px 0 8px;
}

.models-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.models-table th,
.models-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.92rem;
  white-space: nowrap;
}

.models-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--black);
  background: var(--gray-50);
}

.models-table td { color: var(--gray-600); }
.models-table tr:last-child td { border-bottom: none; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background: var(--black);
  color: var(--white);
  padding: 64px 0 60px;
}

.page-hero h1 { color: var(--white); margin-bottom: 12px; }

.breadcrumb {
  font-size: 0.82rem;
  color: #a9a79e;
  margin-bottom: 18px;
}

.breadcrumb a { color: var(--yellow); }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--yellow);
  border-radius: var(--radius-lg);
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; color: #4a3d00; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: #a9a79e;
  padding: 64px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid #2a2a26;
}

.footer-brand p { font-size: 0.88rem; margin-top: 14px; max-width: 280px; }

.footer-col h3 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col a {
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--yellow); }

.footer-bottom {
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

.footer-bottom a:hover { color: var(--yellow); }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  z-index: 200;
  display: none;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid rgba(246, 197, 0, 0.25);
}

.cookie-banner.is-visible { display: flex; }

.cookie-banner p { margin: 0; font-size: 0.86rem; color: #cfcdc4; flex: 1; min-width: 220px; }

.cookie-actions { display: flex; gap: 10px; }

/* ---------- Simple content pages (legal) ---------- */

.legal-content h2 { margin-top: 2em; font-size: 1.2rem; }
.legal-content p, .legal-content li { color: var(--gray-600); font-size: 0.95rem; }
.legal-content ul { padding-left: 1.2em; list-style: disc; margin-bottom: 1em; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art .key-badge { width: 220px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-open .main-nav {
    display: flex;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 20px 24px 30px;
    gap: 18px;
    border-top: 1px solid #2a2a26;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .section { padding: 56px 0; }
}
