:root {
  --oak: #8a5a33;
  --oak-dark: #6b4321;
  --oak-light: #b0783f;
  --terracotta: #c0562f;
  --cream: #f8f3ea;
  --sand: #efe6d6;
  --stone: #3f3a33;
  --text: #3b352d;
  --steel: #5d6b73;
  --olive: #6e7a3f;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(107, 67, 33, 0.12);
  --shadow-lg: 0 20px 50px rgba(107, 67, 33, 0.18);
  --radius: 14px;
  --font: "Poppins", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-decoration: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- TICKER (top bar) ---------- */
.ticker {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(90deg, var(--oak-dark), var(--terracotta), var(--oak));
  color: #fdf6ec;
  overflow: hidden;
  padding: 9px 0;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  width: 100%;
}
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  width: max-content;
}
.ticker-track span {
  padding: 0 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.ticker-track .dot { width: 7px; height: 7px; border-radius: 50%; background: #ffd9a8; display: inline-block; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- HEADER / NAV ---------- */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  border-bottom: 3px solid var(--sand);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.8rem 0;
}
.logo { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.logo img { height: 46px; width: 46px; }
.logo .logo-text { line-height: 1.1; }
.logo .logo-text b { font-size: 1.4rem; letter-spacing: 1px; color: var(--oak-dark); font-weight: 700; }
.logo .logo-text small { display: block; font-size: 0.66rem; color: var(--steel); letter-spacing: 2px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 0.3rem; }
.nav a {
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: 0.25s;
}
.nav a:hover { color: var(--terracotta); background: var(--cream); }
.nav a.active { color: var(--terracotta); font-weight: 600; }
.nav .cta {
  background: var(--terracotta);
  color: white !important;
  margin-left: 0.6rem;
}
.nav .cta:hover { background: var(--oak-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 42px; height: 42px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--oak-dark); border-radius: 3px; transition: 0.3s; }

/* ---------- PRELOADER / LOADING SCREEN ---------- */
#preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--cream), var(--sand));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.hide { opacity: 0; visibility: hidden; }
#preloader img { width: 78px; height: 78px; animation: pulse 1.4s ease-in-out infinite; }
#preloader .pre-name { font-size: 1.6rem; font-weight: 700; color: var(--oak-dark); letter-spacing: 2px; }
.pre-bar { width: 160px; height: 4px; background: var(--sand); border-radius: 4px; overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 40%; background: var(--terracotta); border-radius: 4px; animation: load 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.08);} }
@keyframes load { 0% { margin-left: -30%; } 100% { margin-left: 130%; } }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  color: #fdf6ec;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(43,28,12,0.82) 0%, rgba(43,28,12,0.45) 55%, rgba(43,28,12,0.15) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; margin-bottom: 1rem; }
.hero h1 span { color: #ffb572; }
.hero p { max-width: 560px; margin-bottom: 2rem; font-size: 1.05rem; color: #f2e6d6; }
.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--terracotta); color: white; box-shadow: 0 8px 22px rgba(192,86,47,0.4); }
.btn-primary:hover { background: #a84826; transform: translateY(-2px); }
.btn-light { background: transparent; border-color: #ffcf9e; color: #ffcf9e; }
.btn-light:hover { background: rgba(255,255,255,0.12); }
.hero-badge { display: flex; gap: 1.8rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-badge div b { font-size: 1.6rem; color: #ffb572; display: block; }
.hero-badge div span { font-size: 0.82rem; color: #eadcc8; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- SECTIONS ---------- */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--sand); }
.section-white { background: var(--white); }
.eyebrow {
  color: var(--terracotta);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}
h2.title { font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--oak-dark); margin-bottom: 0.6rem; }
.lead { color: var(--steel); max-width: 700px; margin-bottom: 2.5rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ----- cards ----- */
.grid { display: grid; gap: 1.8rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr;} }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.35s;
  border: 1px solid #efe4d2;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { color: var(--oak-dark); margin-bottom: 0.5rem; font-size: 1.2rem; }
.card-body p { color: var(--steel); font-size: 0.93rem; }

/* ----- feature row ----- */
.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.4rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #efe4d2;
}
.feature .ic {
  flex-shrink: 0;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--sand);
  display: grid; place-items: center;
  color: var(--terracotta);
  font-size: 1.5rem;
}
.feature h4 { color: var(--oak-dark); margin-bottom: 0.25rem; }
.feature p { font-size: 0.9rem; color: var(--steel); }

/* ---------- SHOWCASE comparison ---------- */
.tabs { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.2rem; }
.tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 40px;
  border: 2px solid var(--oak-light);
  background: transparent;
  color: var(--oak-dark);
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  font-family: var(--font);
}
.tab-btn.active { background: var(--oak-dark); color: white; border-color: var(--oak-dark); }
.tab-panel { display: none; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: center; }
.tab-panel.active { display: grid; }
.tab-panel img { border-radius: var(--radius); box-shadow: var(--shadow-lg); height: 320px; object-fit: cover; width: 100%; }
.tab-panel h3 { font-size: 1.8rem; color: var(--oak-dark); margin-bottom: 0.6rem; }
.tab-panel p { color: var(--steel); margin-bottom: 1rem; }
.tab-panel ul { list-style: none; display: grid; gap: 0.6rem; }
.tab-panel li { display: flex; gap: 0.6rem; align-items: center; color: var(--text); }
.tab-panel li::before { content: "✓"; color: var(--olive); font-weight: 700; }
@media (max-width: 800px) { .tab-panel { grid-template-columns: 1fr;} }

/* ---------- STATS ---------- */
.stats {
  background: linear-gradient(100deg, var(--oak-dark), var(--terracotta));
  color: white;
  padding: 3.5rem 0;
}
.stats .grid { grid-template-columns: repeat(4,1fr); }
.stat { text-align: center; }
.stat b { font-size: 2.6rem; color: #ffb572; display: block; }
.stat span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: #f4e6d2; }
@media (max-width: 700px){ .stats .grid { grid-template-columns: repeat(2,1fr); } }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(110deg, var(--oak-dark), #7a4d28);
  border-radius: 20px;
  padding: 3rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  background-image: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), url('/img/fondo-textura.svg');
}
.cta-banner h3 { font-size: 1.8rem; }
.cta-banner p { color: #efdfc6; margin-top: 0.3rem; }

/* ---------- BUTTONS / whatsapp ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 95;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(37,211,102,0.45);
  transition: 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 32px; height: 32px; fill: white; }
.whatsapp-float::after {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #25d366;
  animation: ripple 1.8s ease-out infinite;
}
@keyframes ripple { 0% { transform: scale(1); opacity: 1;} 100% { transform: scale(1.7); opacity: 0;} }

/* ---------- COOKIE BAR ---------- */
.cookie-bar {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: min(660px, 92%);
  background: var(--white);
  border-radius: 16px;
  padding: 1.3rem 1.6rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid #efe4d2;
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s;
}
.cookie-bar.show { opacity: 1; visibility: visible; }
.cookie-bar p { font-size: 0.9rem; flex: 1 1 320px; }
.cookie-bar p a { text-decoration: underline; }
.cookie-btns { display: flex; gap: 0.6rem; }
.cookie-btns button { padding: 0.6rem 1.2rem; border-radius: 40px; border: none; font-weight: 600; cursor: pointer; font-family: var(--font); }
.cookie-accept { background: var(--terracotta); color: white; }
.cookie-accept:hover { background: #a84826; }
.cookie-reject { background: var(--sand); color: var(--oak-dark); }
.cookie-reject:hover { background: #e4d5ba; }

/* ---------- BREADCRUMB / PAGE HERO ---------- */
.page-hero {
  background: linear-gradient(rgba(43,28,12,0.55), rgba(43,28,12,0.55)), url('/img/fondo-banner.svg'), var(--oak-dark);
  background-size: cover, cover, auto;
  color: white;
  padding: 3.8rem 0;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem,4vw,2.8rem); }
.page-hero p { color: #e9d8c0; max-width: 640px; margin: 0.6rem auto 0; }
.page-hero .crumb { color: #ffb572; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 0.4rem; }
.crumb a { color: #ffcf9e; }

/* ---------- PROSE (legal/pages) ---------- */
.prose { max-width: 850px; }
.prose .block {
  background: var(--white);
  border: 1px solid #efe4d2;
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}
.prose h3 { color: var(--oak-dark); margin-bottom: 0.6rem; font-size: 1.25rem; }
.prose p { color: var(--text); margin-bottom: 0.9rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.3rem; display: grid; gap: 0.4rem; }
.prose li { color: var(--text); }
.prose strong { color: var(--oak-dark); }
.prose .updated { font-size: 0.8rem; color: var(--steel); font-style: italic; }
.legal-nav {
  background: var(--white); border-radius: var(--radius); padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow); margin-bottom: 2rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.legal-nav a { padding: 0.4rem 0.9rem; border-radius: 30px; background: var(--sand); font-size: 0.86rem; font-weight: 500; }
.legal-nav a:hover, .legal-nav a.active { background: var(--terracotta); color: white; }

/* ---------- CONTACT FORM & MAP ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px){ .contact-grid { grid-template-columns: 1fr; } }
.form-card {
  background: var(--white); border-radius: var(--radius); padding: 2.2rem;
  box-shadow: var(--shadow); border: 1px solid #efe4d2;
}
.form-row { display: grid; gap: 1rem; }
.form-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px){ .form-row.two{ grid-template-columns:1fr;} }
.form-card label { font-size: 0.85rem; font-weight: 600; color: var(--oak-dark); display: block; margin-bottom: 0.3rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: 10px;
  border: 1.5px solid #e0d2bb; background: var(--cream);
  font-family: var(--font); font-size: 0.95rem; margin-bottom: 1rem; transition: 0.3s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--terracotta); background: white;
}
.form-card .btn { border: none; width: 100%; }
.form-msg { margin-top: 0.8rem; font-weight: 600; display: none; }
.form-msg.ok { display: block; color: var(--olive); }
.map-card {
  background: var(--white); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid #efe4d2;
}
.map-frame { border-radius: 10px; overflow: hidden; margin-top: 1rem; }
.map-frame iframe { width: 100%; height: 420px; border: 0; display: block; }
.info-item { display: flex; gap: 0.8rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px dashed #e5d7c0; }
.info-item:last-child { border: none; }
.info-item .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--sand); display: grid; place-items: center; color: var(--terracotta); flex-shrink: 0; }
.info-item b { color: var(--oak-dark); display: block; font-size: 0.9rem; }
.info-item span { font-size: 0.92rem; color: var(--text); }

/* ---------- ACTUALIDAD ---------- */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 2rem; }
.timeline::before { content:""; position:absolute; left:8px; top:0; bottom:0; width:3px; background: var(--oak-light); border-radius:3px; }
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-item::before { content:""; position:absolute; left:-2rem+6px; top:6px; width:16px; height:16px; border-radius:50%; background: var(--terracotta); border:3px solid var(--sand); margin-left:-8px; }
.tl-year { font-weight: 700; color: var(--terracotta); font-size: 1.15rem; }
.tl-card { background: var(--white); border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow); border:1px solid #efe4d2; }

/* ---------- LOGO STRIP / CLIENTES ---------- */
.client-strip { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.client-strip span {
  background: var(--white); border: 1px solid #efe4d2; color: var(--steel);
  padding: 0.6rem 1.4rem; border-radius: 40px; font-weight: 500; font-size: 0.9rem;
  box-shadow: var(--shadow);
}

/* ---------- FOOTER ---------- */
.site-footer { background: #2f2417; color: #d8c7ab; margin-top: 0; }
.footer-top { padding: 3.5rem 0 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 2.5rem; }
@media (max-width: 900px){ .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-top { grid-template-columns: 1fr; } }
.footer-top h4 { color: white; margin-bottom: 1rem; font-size: 1.05rem; }
.footer-top a { display: block; color: #c9b48f; padding: 0.28rem 0; font-size: 0.92rem; transition: 0.25s; }
.footer-top a:hover { color: #ffb572; padding-left: 4px; }
.footer-brand p { font-size: 0.92rem; color: #c9b48f; margin-top: 1rem; }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: grid; place-items: center; color: white; font-size: 1.2rem !important; padding: 0 !important;
}
.footer-social a:hover { background: var(--terracotta); color: white; padding: 0 !important; }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}
.footer-bottom a { color: #ffb572; }
.footer-contact li { list-style: none; display: flex; gap: 0.6rem; margin: 0.6rem 0; color: #c9b48f; font-size: 0.9rem; }
.footer-contact .ic { color: #ffb572; }

/* ---------- reveal / toTop ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
#toTop {
  position: fixed; bottom: 26px; left: 26px; z-index: 95;
  width: 48px; height: 48px; border-radius: 12px; border: none;
  background: var(--oak-dark); color: white; font-size: 1.3rem;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: 0.3s;
}
#toTop.visible { opacity: 1; visibility: visible; }
#toTop:hover { background: var(--terracotta); }
@media (max-width: 560px){ .whatsapp-float{ width:54px;height:54px;bottom:18px;right:18px;} }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    gap: 0.3rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 1rem; border-radius: 10px; }
  .nav .cta { margin-left: 0; text-align: center; }
}
