/* =====================================================================
   VILLICANA TRANSPORTATION · es.css
   /es/ Spanish landing page: Hero, Servicios, La familia, Dónde operamos,
   Cotización (quote.css), Contacto.
   Needs main.css first (tokens, buttons, .villi-section-mark, .anim-fade-up).
   Contrast: on white or --bone-2, green text is --forest-text; buttons use
   --btn-bg. On --ink, accent text is --gold and the focus ring is gold.
   ===================================================================== */

.es-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Shared section title (two beats, payoff in <em>). */
.es-title {
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.es-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--forest-text);
}

.es-body {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 52ch;
}

/* Text link with arrow (green on light). */
.es-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  width: fit-content;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--forest-text);
  padding: 0.35rem 0;
  border-bottom: 1px solid currentColor;
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
}
.es-link .fi { font-size: 14px; flex: none; }
.es-link:hover { color: var(--ink); gap: 0.8rem; }

/* Outline call button (white with ink border); base styles from .villi-hero-btn. */
.es-btn-call {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
}
.es-btn-call .fi { font-size: 15px; }
.es-btn-num { letter-spacing: 0.06em; margin-left: 0.25rem; white-space: nowrap; }
@media (max-width: 379px) {
  .es-btn-call { letter-spacing: 0.08em; padding-left: 1rem; padding-right: 1rem; }
}

/* ============================================================
   1. HERO
   ============================================================ */
.es-hero {
  position: relative;
  background: #fff;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vh, 3rem) 0 clamp(2.5rem, 7vh, 5rem);
}
.es-hero-topo {
  position: absolute; inset: 0; pointer-events: none;
  z-index: -1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%234A9F2D' stroke-width='1'%3E%3Cpath d='M0,80 Q150,40 300,80 T600,80'/%3E%3Cpath d='M0,140 Q150,100 300,140 T600,140'/%3E%3Cpath d='M0,200 Q150,160 300,200 T600,200'/%3E%3Cpath d='M0,260 Q150,220 300,260 T600,260'/%3E%3Cpath d='M0,320 Q150,280 300,320 T600,320'/%3E%3Cpath d='M0,380 Q150,340 300,380 T600,380'/%3E%3Cpath d='M0,440 Q150,400 300,440 T600,440'/%3E%3Cpath d='M0,500 Q150,460 300,500 T600,500'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
}
.es-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .es-hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}
.es-hero-text { display: flex; flex-direction: column; gap: 1.15rem; min-width: 0; }

.es-hero-kicker {
  display: inline-flex; align-items: center; gap: 0.65rem;
  width: fit-content; max-width: 100%;
  background: var(--forest-2);
  color: #fff;
  padding: 0.55rem 0.95rem 0.5rem;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.45;
  box-shadow: 4px 4px 0 var(--forest-deep);
  margin-bottom: 0.4rem;
}
@media (min-width: 600px) { .es-hero-kicker { font-size: 11.5px; padding: 0.6rem 1.1rem 0.55rem; } }
.es-hero-kicker-dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(232,181,48,0.4);
  animation: es-pulse 2.4s ease-in-out infinite;
}
@keyframes es-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232,181,48,0.4); }
  50%      { box-shadow: 0 0 0 9px rgba(232,181,48,0); }
}

.es-hero-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 15ch;
  text-wrap: balance;
}
.es-hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--forest-text);
}
.es-hero-lede {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
}
.es-hero-tagline {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.es-hero-tagline em { font-style: italic; color: var(--forest-text); }

.es-hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
@media (max-width: 480px) {
  .es-hero-actions .villi-hero-btn,
  .es-rutas-actions .villi-hero-btn { width: 100%; justify-content: center; }
  .es-btn-call { letter-spacing: 0.08em; padding-left: 0.9rem; padding-right: 0.9rem; white-space: normal; text-align: center; }
}
/* Phones: the number is in the tel: link, so the label stays on one line
   (same as /refrigerated-trucking). */
@media (max-width: 599px) {
  .es-btn-num { display: none; }
}

/* "(en inglés)" after links to English-only pages, here and in the Spanish
   navbar and footer partials. Inherits the link colour, so contrast is the
   link's own; only size, case and weight are quieter. */
.es-lang-tag {
  font-family: var(--f-mono);
  font-size: 0.9em;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}
.villi-mobile-link .es-lang-tag { font-size: 0.5em; vertical-align: 0.2em; }
/* Desktop header below 1440 px has no room for the tag inline: put it on a
   second, smaller line under the label so the menu does not run into the logos. */
@media (min-width: 961px) and (max-width: 1439px) {
  .villi-navbar-link .es-lang-tag { display: block; font-size: 0.82em; line-height: 1.1; }
}

.es-hero-facts {
  display: flex; flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-2);
}
@media (min-width: 600px) { .es-hero-facts { font-size: 11.5px; } }
.es-hero-facts li { display: inline-flex; align-items: center; gap: 0.5rem; }
.es-hero-facts li::before {
  content: "";
  flex: none;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--forest);
}

.es-hero-photo {
  position: relative;
  margin: 0;
  min-width: 0;
}
.es-hero-photo picture { display: block; }
.es-hero-photo img {
  width: 100%;
  height: auto; /* the height attribute would otherwise win over aspect-ratio */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9);
  box-shadow: 10px 10px 0 var(--bone-2), 0 24px 40px -28px rgba(15,20,10,0.45);
}
@media (min-width: 900px) {
  .es-hero-photo img { aspect-ratio: auto; height: min(620px, calc(100vh - 220px)); min-height: 420px; }
}
.es-hero-stamp {
  position: absolute;
  left: 1rem; bottom: 1rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 0.95rem;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
}
.es-hero-stamp span:first-child { color: var(--gold); }

/* ============================================================
   2. SERVICIOS
   ============================================================ */
.es-servicios {
  background: var(--bone);
  padding: clamp(4rem, 10vh, 7rem) 0;
}
.es-head {
  display: flex; flex-direction: column; gap: 1rem;
  padding-bottom: 1.75rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
  border-bottom: 1px solid var(--rule);
}
.es-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 6vh, 4rem);
}
@media (min-width: 900px) {
  .es-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 3.5vw, 3.5rem);
  }
}
.es-card { display: flex; flex-direction: column; min-width: 0; }
.es-card-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
  margin-bottom: 1.4rem;
}
@media (max-width: 899px) and (min-width: 600px) {
  .es-card-photo { aspect-ratio: 16 / 10; }
}
.es-card-photo picture { display: block; width: 100%; height: 100%; }
.es-card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.85) brightness(0.97);
  transition: transform 1.2s var(--ease);
}
.es-card:hover .es-card-photo img { transform: scale(1.04); }
.es-card-num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  color: #9A7313; /* dark gold, large text on white */
  margin-bottom: 0.6rem;
}
.es-card-title {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-family: var(--f-display);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.es-card-title .fi {
  flex: none;
  font-size: 0.8em;
  margin-top: 0.2em;
  color: var(--forest-text);
}
.es-card-title em { font-style: italic; font-weight: 400; color: var(--forest-text); }
.es-card-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 42ch;
}
.es-card .es-link { margin-top: 1.1rem; }

/* ============================================================
   3. LA FAMILIA
   ============================================================ */
.es-nosotros {
  background: var(--bone-2);
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 10vh, 7rem) 0;
}
.es-nosotros-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .es-nosotros-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
}
.es-nosotros-photo { margin: 0; min-width: 0; }
.es-nosotros-photo picture { display: block; }
.es-nosotros-photo img {
  width: 100%; height: auto;
  filter: contrast(1.04) saturate(0.9);
  box-shadow: -10px 10px 0 var(--forest-deep);
}
.es-nosotros-text { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.es-nosotros-text .es-title { margin-bottom: 0.4rem; }
.es-emphasis {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--forest-text);
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}

/* ============================================================
   4. DÓNDE OPERAMOS (map)
   ============================================================ */
.es-rutas {
  background: var(--bone);
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 10vh, 7rem) 0;
  overflow: hidden;
}
.es-rutas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .es-rutas-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
}
.es-rutas-text { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.es-rutas-text .es-title { margin-bottom: 0.4rem; }
.es-rutas-actions { margin-top: 0.5rem; }

.es-rutas-map { display: flex; justify-content: center; min-width: 0; }
.es-map-stack {
  position: relative;
  width: 100%;
  max-width: min(360px, 84vw);
  aspect-ratio: 100 / 115;
  filter: drop-shadow(0 18px 28px rgba(15,20,10,0.10));
}
@media (min-width: 900px) { .es-map-stack { max-width: 480px; } }
.es-map-base,
.es-map-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.es-map-base { object-fit: contain; }
.es-map-overlay { overflow: visible; pointer-events: none; }

.es-map-overlay .ca-lane {
  fill: none;
  stroke: var(--forest);
  stroke-width: 0.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1.4 1;
  animation: es-lane-flow 2.4s linear infinite;
}
.es-map-overlay .ca-lane--border { stroke: #9A7313; }
@keyframes es-lane-flow { to { stroke-dashoffset: -7.2; } }
.es-map-overlay .ca-shield-text {
  font-family: var(--f-mono);
  font-size: 1.7px;
  font-weight: 700;
  fill: var(--forest-deep);
}
.es-map-overlay .ca-shield-text--light { fill: #fff; }
.es-map-overlay .ca-city circle { fill: #fff; stroke: var(--ink); stroke-width: 0.4; }
.es-map-overlay .ca-city text {
  font-family: var(--f-mono);
  font-size: 2px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink);
}
.es-map-overlay .ca-city--hub circle { fill: var(--gold); stroke: var(--forest-deep); stroke-width: 0.55; }
.es-map-overlay .ca-city--hub-pulse {
  fill: none !important;
  stroke: var(--gold) !important;
  stroke-width: 0.4;
  opacity: 0.7;
  animation: es-hub-pulse 2.4s ease-out infinite;
}
@keyframes es-hub-pulse {
  0%   { r: 1.5; opacity: 0.7; }
  100% { r: 4.5; opacity: 0; }
}
.es-map-overlay .ca-city--hub text {
  fill: var(--forest-text);
  font-weight: 700;
  font-size: 2.4px;
  letter-spacing: 0.1em;
}
.es-map-overlay .ca-region {
  font-family: var(--f-mono);
  font-size: 1.7px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--ink-2);
  opacity: 0.55;
}
.es-map-overlay .ca-region--accent {
  fill: #9A7313;
  opacity: 1;
  font-size: 2px;
  font-weight: 700;
}
.es-map-overlay .ca-compass line { stroke: var(--ink); opacity: 0.45; }
.es-map-overlay .ca-compass-text {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 2.2px;
  font-weight: 500;
  fill: var(--forest-text);
}

/* ============================================================
   5. COTIZACIÓN: styles in quote.css
   ============================================================ */

/* ============================================================
   6. CONTACTO (dark)
   ============================================================ */
.es-contacto {
  --focus-ring: var(--gold);
  position: relative;
  background: var(--ink);
  color: var(--bone);
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 7vh, 5rem);
  overflow: hidden;
}
.es-contacto::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(107,157,59,0.18), transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(232,181,48,0.12), transparent 50%);
}
.es-contacto .es-container { position: relative; }
.es-contacto-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: clamp(2.25rem, 5vh, 3.5rem); }
.es-contacto-kicker {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.es-contacto-kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.es-contacto-title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.es-contacto-title em { font-style: italic; font-weight: 400; color: var(--gold); }

.es-contacto-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px dashed rgba(244,239,227,0.25);
  border-bottom: 1px dashed rgba(244,239,227,0.25);
}
@media (min-width: 900px) {
  .es-contacto-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.es-contacto-item {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px dashed rgba(244,239,227,0.25);
  min-width: 0;
}
.es-contacto-item:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .es-contacto-item {
    padding: 1.85rem var(--gutter) 1.85rem 0;
    border-bottom: 0;
    border-right: 1px dashed rgba(244,239,227,0.25);
  }
  .es-contacto-item + .es-contacto-item { padding-left: var(--gutter); }
  .es-contacto-item:last-child { border-right: 0; }
}
.es-contacto-label {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.es-contacto-label .fi { font-size: 14px; }
.es-contacto-value {
  width: fit-content;
  max-width: 100%;
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 1.9vw, 1.65rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bone);
  overflow-wrap: anywhere;
}
a.es-contacto-value {
  border-bottom: 1px solid rgba(232,181,48,0.5);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
a.es-contacto-value:hover { color: var(--gold); border-bottom-color: var(--gold); }
.es-contacto-value--email { font-size: clamp(1.1rem, 1.6vw, 1.45rem); }
.es-contacto-note {
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(244,245,241,0.82);
}
.es-contacto-english { margin-top: 2rem; }
.es-contacto-english a {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gold);
  transition: color 0.3s var(--ease);
}
.es-contacto-english a .fi { color: var(--gold); font-size: 14px; }
.es-contacto-english a:hover { color: var(--gold); }

/* ============================================================
   MOTION SAFETY (kept last)
   Revealed elements use .anim-fade-up from main.css, which already carries
   the failsafe, the .villi-js cancel and the no-script override. The rules
   below add the reduced-motion override for this page's own animations.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .es-hero-kicker-dot,
  .es-map-overlay .ca-lane,
  .es-map-overlay .ca-city--hub-pulse { animation: none; }
  .es-map-overlay .ca-city--hub-pulse { opacity: 0; }
  .es-card-photo img,
  .es-link,
  a.es-contacto-value,
  .es-contacto-english a { transition: none; }
  .es-card:hover .es-card-photo img { transform: none; }
}
@media (scripting: none), (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .villi-js .anim-fade-up { opacity: 1; transform: none; transition: none; animation: none; }
}
