/* DogQuijote · Centro de adiestramiento, cria y residencia canina
   Paleta sacada del logo: tinta negra, rojo y amarillo del trazo de bandera,
   sobre fondos calidos tipo hueso/arena. Nada de la paleta NoSolo. */

:root {
  --bone: #F7F3EB;
  --arena: #EFE5D3;
  --tinta: #1A1511;
  --gris: #5C544B;
  --navy: #1B2337;
  --navy-2: #131A2B;
  --rojo: #C22A1C;
  --rojo-2: #9E2113;
  --oro: #E8A511;
  --oro-claro: #F2B929;
  --wa: #128140;
  --wa-2: #0E6A34;
  --blanco: #FFFFFF;
  --radius: 14px;
  --shadow: 0 18px 45px rgba(26, 21, 17, .13);
  --shadow-soft: 0 8px 24px rgba(26, 21, 17, .09);
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--bone);
  color: var(--tinta);
  line-height: 1.65;
  font-size: 1.0625rem;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rojo); }

section[id], footer[id] { scroll-margin-top: 80px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.01em; }

h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rojo); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rojo) 55%, var(--oro) 55%);
}
.dark .eyebrow { color: var(--oro-claro); }

.lead { font-size: clamp(1.08rem, 2vw, 1.22rem); color: var(--gris); max-width: 62ch; }
.dark .lead { color: #C8CBD6; }

/* Trazo bandera bajo titulares, como en el logo */
.brush {
  display: block; width: 92px; height: 9px; margin-top: .9rem; border-radius: 3px;
  background: linear-gradient(90deg, var(--rojo) 0 34%, var(--oro) 34% 66%, var(--rojo) 66%);
  transform: skewX(-18deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { flex: none; }

.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 26px rgba(18, 129, 64, .35); }
.btn-wa:hover { background: var(--wa-2); }

.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn-line { border-color: var(--tinta); color: var(--tinta); }
.btn-line:hover { background: var(--tinta); color: var(--bone); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 76px;
  background: rgba(247, 243, 235, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(26, 21, 17, .08);
}
.nav-in { max-width: 1180px; margin: 0 auto; height: 100%; padding: 0 clamp(1rem, 3vw, 2rem); display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--tinta); margin-right: auto; }
.brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: var(--shadow-soft); background: #fff; }
.brand b { font-family: var(--font-display); font-size: 1.18rem; font-weight: 800; letter-spacing: .01em; }
.brand b span { color: var(--rojo); }
.brand small { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; }
.nav-links a:not(.btn) {
  text-decoration: none; color: var(--tinta); font-weight: 600; font-size: .96rem;
  border-bottom: 2px solid transparent; padding: 4px 0; transition: border-color .15s, color .15s;
}
.nav-links a:not(.btn):hover { color: var(--rojo); border-color: var(--oro); }
.nav-links .btn { padding: .6rem 1.2rem; font-size: .92rem; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--tinta); border-radius: 2px; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 76px; right: 0; width: min(320px, 86vw);
    height: calc(100dvh - 76px); background: var(--navy);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 1.4rem 1.6rem; transform: translateX(105%); transition: transform .25s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav-links a:not(.btn) { display: block; padding: .95rem 0; color: #fff; font-size: 1.05rem; }
  .nav-links a:not(.btn):hover { color: var(--oro-claro); }
  .nav-links li:last-child { border: 0; padding-top: 1.2rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(94vh, 860px); display: flex; align-items: flex-end;
  color: #fff; padding: 150px 0 clamp(3rem, 7vh, 5.5rem);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 62%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(19, 26, 43, .46) 0%, rgba(19, 26, 43, .18) 40%, rgba(19, 26, 43, .82) 100%);
}
.hero h1 { max-width: 15ch; text-shadow: 0 3px 22px rgba(0, 0, 0, .45); }
.hero h1 em { font-style: normal; color: var(--oro-claro); }
.hero p {
  margin: 1.3rem 0 2rem; max-width: 52ch; font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  color: #F3EFE7; text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-tag {
  display: inline-block; margin-bottom: 1.1rem; padding: .45rem 1rem; border-radius: 999px;
  background: rgba(19, 26, 43, .55); border: 1px solid rgba(242, 185, 41, .5);
  font-size: .85rem; font-weight: 600; letter-spacing: .06em; color: var(--oro-claro);
}

/* ---------- Franja de confianza ---------- */
.franja { background: var(--navy); color: #fff; padding: clamp(2.4rem, 5vw, 3.4rem) 0; }
.franja-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1.6rem 1.2rem;
}
.franja-item { display: flex; flex-direction: column; gap: .35rem; padding-left: 1rem; border-left: 3px solid var(--oro); }
.franja-item b { font-family: var(--font-display); font-size: 1.02rem; }
.franja-item span { font-size: .88rem; color: #B9BECD; line-height: 1.45; }

/* ---------- Secciones base ---------- */
.sec { padding: clamp(3.4rem, 8vw, 6rem) 0; }
.sec-arena { background: var(--arena); }
.dark { background: var(--navy); color: #fff; }
.dark h2, .dark h3 { color: #fff; }

.sec-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }

/* ---------- Servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.3rem; }
.card {
  background: #fff; border-radius: var(--radius); padding: 1.8rem 1.6rem 1.6rem;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: .8rem;
  border-top: 5px solid var(--rojo); position: relative; transition: transform .2s ease, box-shadow .2s ease;
}
.card:nth-child(2) { border-top-color: var(--oro); }
.card:nth-child(3) { border-top-color: var(--navy); }
.card:nth-child(4) { border-top-color: var(--wa); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bone); font-size: 1.5rem;
}
.card p { color: var(--gris); font-size: .98rem; flex: 1; }
.card a { font-weight: 700; text-decoration: none; color: var(--rojo); font-size: .96rem; }
.card a:hover { text-decoration: underline; }

/* ---------- Split (residencia / adiestramiento) ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.rev { grid-template-columns: .95fr 1.05fr; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.split-media::after {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 120px; height: 12px;
  border-radius: 4px; transform: skewX(-18deg);
  background: linear-gradient(90deg, var(--rojo) 0 34%, var(--oro) 34% 66%, var(--rojo) 66%);
}
@media (max-width: 860px) {
  .split, .split.rev { grid-template-columns: 1fr; }
  .split.rev .split-media { order: -1; }
}

.check-list { list-style: none; display: grid; gap: .75rem; margin: 1.4rem 0 1.8rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
.check-list .tick {
  flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center; background: var(--oro); color: var(--tinta);
  font-size: .8rem; font-weight: 800;
}
.dark .check-list .tick { background: var(--oro); }

.steps { counter-reset: paso; display: grid; gap: 1.1rem; margin: 1.5rem 0 1.8rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step::before {
  counter-increment: paso; content: counter(paso);
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--rojo); color: #fff; font-family: var(--font-display); font-weight: 800;
  display: grid; place-items: center; font-size: 1.05rem;
}
.step b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.step p { color: var(--gris); font-size: .97rem; }
.dark .step p { color: #C8CBD6; }
.dark .step::before { background: var(--oro); color: var(--tinta); }

/* ---------- Sub-bloques de adiestramiento ---------- */
.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.mini-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 1.5rem 1.4rem;
}
.mini-card h3 { color: var(--oro-claro); margin-bottom: .5rem; }
.mini-card p { color: #C8CBD6; font-size: .96rem; margin-bottom: 1rem; }
.mini-card a { color: #fff; font-weight: 700; text-decoration: none; font-size: .95rem; border-bottom: 2px solid var(--wa); padding-bottom: 2px; }
.mini-card a:hover { color: var(--oro-claro); }

/* ---------- Visita ---------- */
.visita { text-align: center; }
.visita .sec-head { margin: 0 auto clamp(1.6rem, 4vw, 2.4rem); }
.visita h2 { max-width: 21ch; margin: 0 auto; }
.visita .brush { margin: 1.1rem auto 0; }

/* ---------- Club / competicion ---------- */
.club-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; margin-top: 1rem; }
.club-card { border-radius: var(--radius); overflow: hidden; background: var(--navy); color: #fff; box-shadow: var(--shadow-soft); }
.club-card img { width: 100%; height: 210px; object-fit: cover; }
.club-card div { padding: 1.1rem 1.3rem 1.3rem; }
.club-card b { font-family: var(--font-display); }
.club-card span { display: block; font-size: .88rem; color: #B9BECD; margin-top: .2rem; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.chip {
  padding: .5rem 1.05rem; border-radius: 999px; background: #fff; box-shadow: var(--shadow-soft);
  font-weight: 600; font-size: .92rem; color: var(--tinta);
}
.chip.destacado { background: var(--rojo); color: #fff; }

/* ---------- Galeria ---------- */
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.galeria a { display: block; border-radius: 12px; overflow: hidden; position: relative; }
.galeria img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .3s ease; }
.galeria a:hover img { transform: scale(1.045); }
.galeria a.alta img { aspect-ratio: 3 / 4; }
@media (max-width: 720px) { .galeria { grid-template-columns: repeat(2, 1fr); gap: 9px; } }

/* Lightbox minimo */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(19, 21, 26, .93);
  display: none; align-items: center; justify-content: center; padding: 4vmin;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; height: auto; width: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox button {
  position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff;
  font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; }
.faq-list details {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-soft);
  margin-bottom: .85rem; overflow: hidden;
}
.faq-list summary {
  cursor: pointer; padding: 1.15rem 3.2rem 1.15rem 1.4rem; font-weight: 700;
  font-family: var(--font-display); font-size: 1.04rem; list-style: none; position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--rojo); font-weight: 400; transition: transform .2s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 1.4rem 1.25rem; color: var(--gris); font-size: .99rem; }

/* ---------- CTA final ---------- */
.cta-final {
  background: linear-gradient(150deg, var(--navy-2), var(--navy) 55%, #23304d);
  color: #fff; text-align: center; position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; top: -40px; left: 50%; transform: translateX(-50%) skewX(-18deg);
  width: 300px; height: 26px; border-radius: 8px; opacity: .9;
  background: linear-gradient(90deg, var(--rojo) 0 34%, var(--oro) 34% 66%, var(--rojo) 66%);
}
.cta-final h2 { max-width: 22ch; margin: 0 auto 1rem; }
.cta-final p { max-width: 54ch; margin: 0 auto 2.1rem; color: #C8CBD6; }

/* ---------- Footer ---------- */
footer { background: #14100D; color: #CFC9C0; padding: clamp(2.8rem, 6vw, 4rem) 0 2rem; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.2rem; margin-bottom: 2.4rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand img { width: 74px; height: 74px; border-radius: 50%; background: #fff; padding: 2px; margin-bottom: .9rem; }
.foot-brand p { max-width: 40ch; font-size: .92rem; color: #A79F94; }
footer h4 { font-family: var(--font-display); color: #fff; margin-bottom: .9rem; font-size: 1rem; }
footer ul { list-style: none; display: grid; gap: .5rem; }
footer a { color: #CFC9C0; text-decoration: none; }
footer a:hover { color: var(--oro-claro); }
.foot-legal {
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1.4rem; text-align: center;
  font-size: .87rem; color: #8D857A;
}
.foot-legal a { color: #B7AFA3; }

/* ---------- WhatsApp flotante (movil) ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 60px; height: 60px; border-radius: 50%; background: var(--wa);
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(18, 129, 64, .45);
}
.wa-float svg { width: 32px; height: 32px; }
@media (max-width: 920px) { .wa-float { display: flex; } }

/* ---------- Animaciones de entrada ----------
   Solo se esconden si hay JS (clase .js en <html>); ademas main.js revela todo
   a los 2,5s como red de seguridad por si el observer falla. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .galeria img { transition: none !important; }
}
