/* =========================================================
   Bustelo Transport Solutions S.L. — hoja de estilos común
   Componentes compartidos por todas las páginas.
   Los estilos propios de cada página van en su bloque <style>.
   Tema CLARO: fondos blancos / gris claro, texto oscuro,
   acento acero.
   ========================================================= */

:root {
  --negro: #1c1e22;        /* texto principal y detalles oscuros */
  --rojo: #3a5a72;         /* acento acero (sobre fondo claro y botones) */
  --rojo-osc: #2e4a5e;     /* acento acero oscuro para hover */
  --acento-claro: #3a5a72; /* (compat.) mismo acero; ya casi no hay fondos oscuros */
  --gris: #ffffff;         /* tarjetas / campos de formulario */
  --gris-medio: #ccd5e4;   /* bordes */
  --gris-claro: #e8edf8;   /* color de fondo general (azul muy claro) */
  --fondo-osc: #e8edf8;    /* secciones que antes eran negras → mismo azul claro */
  --texto-sec: #53606a;    /* texto secundario sobre fondo claro */
  --blanco: #ffffff;
  --gold: #c9a84c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; background: var(--gris-claro); color: var(--negro); }
img { max-width: 100%; height: auto; }

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; left: 0; top: -60px; z-index: 200;
  background: var(--rojo); color: #fff; padding: 10px 18px;
  font-weight: 700; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 0; }
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rojo); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- Navegación ---------- */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 70px;
  border-bottom: 1px solid var(--gris-medio);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img, .nav-logo-img { height: 46px; width: auto; display: block; }
.nav-logo span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; color: var(--negro); letter-spacing: 1px; line-height: 1.1;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: #45505a; text-decoration: none; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--rojo); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--negro);
  margin: 5px 0; transition: 0.3s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: var(--blanco); z-index: 99; padding: 20px 5%;
  border-bottom: 1px solid var(--gris-medio);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; color: #45505a; text-decoration: none; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
  padding: 14px 0; border-bottom: 1px solid var(--gris-medio);
}
.mobile-menu a:hover, .mobile-menu a[aria-current="page"] { color: var(--rojo); }

/* ---------- Titulares de sección ---------- */
.section-label {
  font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--rojo); font-weight: 700; margin-bottom: 14px;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--negro); line-height: 1; margin-bottom: 28px; letter-spacing: 1px;
}

/* ---------- Cabecera de páginas internas ---------- */
.page-hero { padding: 160px 10% 80px; background: var(--fondo-osc); position: relative; overflow: hidden; }
.page-hero > * { position: relative; z-index: 1; }
/* La foto se ve de fondo, aclarada para que el texto oscuro sea legible. */
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.80), rgba(255,255,255,0.88)),
    url('assets/camion.jpg');
  background-size: cover; background-position: center;
}
.page-hero .breadcrumb {
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--rojo); margin-bottom: 20px;
}
.page-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem); color: var(--negro);
  line-height: 0.95; letter-spacing: 2px;
}
.page-hero p {
  color: var(--texto-sec); font-size: 1rem; line-height: 1.8;
  max-width: 600px; margin-top: 24px; font-weight: 300;
}

/* ---------- Botones ---------- */
.btn-primary {
  display: inline-block; background: var(--rojo); color: var(--blanco);
  text-decoration: none; padding: 14px 36px; border: none; cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--rojo-osc); transform: translateY(-2px); }
.btn-secondary, .btn-outline {
  display: inline-block; border: 1px solid var(--negro); color: var(--negro);
  text-decoration: none; padding: 14px 36px;
  font-size: 0.82rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-secondary { margin-left: 16px; }
.btn-secondary:hover, .btn-outline:hover { background: var(--negro); color: var(--blanco); }

/* ---------- Pie de página ---------- */
footer { background: var(--fondo-osc); border-top: 3px solid var(--rojo); padding: 60px 10% 30px; color: var(--negro); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 50px; }
.footer-brand p { color: var(--texto-sec); font-size: 0.88rem; line-height: 1.8; margin-top: 16px; max-width: 300px; }
.footer-col h4 {
  font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--rojo); font-weight: 700; margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--texto-sec); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--rojo); }
.footer-col address { color: var(--texto-sec); font-style: normal; font-size: 0.88rem; line-height: 1.9; }
.footer-col address a { color: var(--texto-sec); text-decoration: none; }
.footer-col address a:hover { color: var(--rojo); }
.footer-bottom {
  border-top: 1px solid var(--gris-medio); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.footer-bottom p { color: #7b8790; font-size: 0.8rem; }
.footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--negro); letter-spacing: 2px; }
.footer-logo span { color: var(--rojo); }
.footer-logo-img { height: 52px; width: auto; display: block; }

/* ---------- Formulario de contacto (común) ---------- */
.form-feedback { padding: 20px; margin-bottom: 20px; border-left: 3px solid; }
.form-feedback--ok { background: #e7f4ea; border-color: #3f9b5a; }
.form-feedback--err { background: #fbeaea; border-color: #cc5b5b; }
.form-feedback strong { display: block; margin-bottom: 4px; }
.form-feedback--ok strong { color: #2f7d47; }
.form-feedback--err strong { color: #b23b3b; }
.form-feedback span { color: var(--texto-sec); font-size: 0.85rem; }
.form-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; }
.form-consent input { margin-top: 3px; flex-shrink: 0; }
.form-consent label {
  font-size: 0.8rem; color: var(--texto-sec); line-height: 1.5;
  letter-spacing: 0; text-transform: none;
}
.form-consent a { color: var(--rojo); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Migas de pan (páginas internas) ---------- */
.page-hero .breadcrumb a { color: var(--rojo); text-decoration: none; }
.page-hero .breadcrumb a:hover { text-decoration: underline; }
.page-hero .breadcrumb span { margin: 0 6px; color: #93a0a8; }

/* ---------- Mapa con carga bajo demanda ---------- */
.mapa-section { position: relative; background: var(--gris-claro); }
.mapa-cargar {
  width: 100%; height: 100%; border: none; cursor: pointer;
  background: var(--gris-claro); color: var(--negro);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; font-family: inherit;
  transition: background 0.2s;
}
.mapa-cargar:hover { background: #e9edef; }
.mapa-cargar-txt { display: block; max-width: 440px; }
.mapa-cargar-txt strong {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; letter-spacing: 1px; margin-bottom: 8px;
}
.mapa-cargar-txt small { display: block; margin-top: 12px; color: var(--texto-sec); font-size: 0.75rem; }

/* ---------- Botón flotante de contacto ---------- */
.fab-contact {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
}
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}
.fab svg { fill: currentColor; }
.fab:hover { transform: translateY(-3px); }
.fab-wa { background: #1f8f4e; }
.fab-wa:hover { background: #25a259; }
.fab-tel { background: var(--rojo); }
.fab-tel:hover { background: var(--rojo-osc); }
@media (max-width: 600px) {
  .fab-contact { right: 14px; bottom: 14px; gap: 10px; }
  .fab { width: 48px; height: 48px; }
}
@media print { .fab-contact { display: none; } }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Impresión (páginas legales) ---------- */
@media print {
  body > nav, .mobile-menu, footer, .skip-link { display: none !important; }
  .page-hero { padding: 20px 0 10px; background: none; }
  .page-hero::after { display: none; }
  .page-hero h1 { color: #000; }
  .page-hero .breadcrumb { color: #555; }
  .legal-content { padding: 0; max-width: none; }
  .legal-content h2 { color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- Responsive común ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .btn-secondary { margin-left: 0; margin-top: 12px; }
}
