/* ===== CONTAINER ===== */

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

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--t-fast);
}
.site-header.scrolled { box-shadow: var(--shadow-header); }

/* backdrop-filter crea un containing block para descendientes position:fixed;
   sin esto, el overlay del menú móvil queda encajonado dentro de la cabecera
   en vez de cubrir toda la pantalla. Se desactiva mientras el menú está abierto. */
body.menu-open .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}
.header-logo img { height: 44px; width: auto; }

.header-nav ul { display: flex; gap: 22px; }
.header-nav a {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.header-nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.header-nav a.is-active {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-primary);
}
.header-nav__cta { display: none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-right .btn-primary {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 12px 20px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
}

/* ===== HERO ===== */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-deep);   /* fallback mientras carga el vídeo */
  color: var(--color-white);
  padding: 110px 0 0;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(26, 42, 71, 0.92) 0%,
    rgba(43, 59, 92, 0.65) 60%,
    rgba(43, 59, 92, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero > .container {
  position: relative;
  z-index: 2;
}
/* Mantenemos vídeo visible también con "reducir animaciones" para evitar hero estático por error */
@media (prefers-reduced-motion: reduce) {
  .hero {
    background:
      linear-gradient(115deg, rgba(26, 42, 71, 0.92) 0%, rgba(43, 59, 92, 0.65) 60%, rgba(43, 59, 92, 0.45) 100%),
      url('../assets/video/recomar-hero-poster.jpg') center / cover no-repeat;
  }
}
.hero__title {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin-bottom: 20px;
}
.hero__title-accent {
  color: var(--color-white);
  border-bottom: 3px solid var(--color-white);
  padding-bottom: 2px;
  white-space: nowrap;
}
.hero__subtitle {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin-bottom: 36px;
  font-weight: 400;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 32px 0;
}
.hero-stats__item {
  padding: 0 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-stats__item:first-child { border-left: none; padding-left: 0; }

/* ===== SECTIONS ===== */

.section           { padding: var(--section-py) 0; }
.section--light    { background: var(--color-bg); }
.section--primary  { background: var(--color-primary); color: var(--color-white); }
.section--deep     { background: var(--color-deep); color: var(--color-white); }

/* ===== SERVICIOS ===== */

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ===== INSTALACIONES ===== */

.inst-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.inst-img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(0, 29, 61, 0) 0%, rgba(0, 29, 61, 0.7) 100%),
    url('../assets/images/patio_reefers_apilados.jpg') center / cover no-repeat;
  position: relative;
}
.inst-img::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 20px;
  left: 24px;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.inst-list { margin: var(--sp-6) 0; }
.inst-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.inst-list li strong {
  color: var(--color-primary);
  font-weight: 700;
  padding-top: 2px;
  flex-shrink: 0;
}
.inst-list li span {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-align: right;
  max-width: 60%;
}

/* ===== VENTA Y ALQUILER ===== */

.va-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.va-content { order: 1; }
.va-img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background:
    linear-gradient(225deg, rgba(0, 29, 61, 0) 0%, rgba(0, 29, 61, 0.55) 100%),
    url('../assets/images/reefer_40_hapag_lloyd.jpg') center / cover no-repeat;
  order: 2;
  position: relative;
}
.va-img::after {
  content: 'CONTENEDORES · MÓDULOS · ESPECIALES';
  position: absolute;
  top: 20px;
  left: 24px;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ===== CLIENTS SECTION ===== */

.section-clientes { text-align: center; }
.section-clientes .section-title,
.section-clientes .section-subtitle { margin-left: auto; margin-right: auto; }

/* ===== CALIDAD ===== */

.calidad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: var(--sp-4);
}

/* ===== CTA FINAL ===== */

.cta-final {
  background: var(--color-footer);
  color: var(--color-white);
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.cta-final__title {
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.cta-final__text {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-body-lg);
  margin-bottom: 28px;
}
.cta-info { display: grid; gap: 12px; }
.cta-info__row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.cta-info__label { color: var(--color-white); font-weight: 600; }
.cta-info__value {
  color: rgba(255, 255, 255, 0.7);
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}

.cta-form { display: grid; gap: 14px; }
.cta-form__row { display: grid; gap: 6px; }
.cta-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cta-form label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.cta-form label .req { color: #ff9b9b; }
.cta-form input,
.cta-form select,
.cta-form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-family: inherit;
}
.cta-form textarea { resize: vertical; }
.cta-form input::placeholder,
.cta-form textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.cta-form input:focus,
.cta-form select:focus,
.cta-form textarea:focus {
  outline: none;
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
}
.cta-form select option { color: var(--color-deep); }
.cta-form button[type="submit"] {
  justify-self: start;
  margin-top: 4px;
  cursor: pointer;
  border: none;
}
.cta-form__note {
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.65);
  min-height: 1.2em;
}
.cta-form__note.is-error { color: #ff9b9b; }

/* Honeypot anti-spam: oculto para personas, visible/rellenable para bots */
.cta-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .cta-form__grid { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */

.site-footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 30px;
  font-size: var(--text-xs);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand img {
  height: 32px;
  width: auto;
  opacity: 0.95;
  margin-bottom: var(--sp-4);
}
.footer-brand p { font-size: var(--text-caption); line-height: 1.6; }
.footer-col h5 {
  color: var(--color-white);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col li { margin-bottom: var(--sp-2); }
.footer-col a:hover { color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--text-caption);
}
.footer-bottom a:hover { color: var(--color-white); }

/* ===== PAGE BANNER ===== */

.page-banner {
  background:
    linear-gradient(115deg, rgba(0, 29, 61, 0.95) 0%, rgba(2, 55, 105, 0.75) 100%),
    url('../assets/images/patio_reachstacker_dry.jpg') center / cover no-repeat;
  color: var(--color-white);
  padding: 80px 0 72px;
}
.page-banner__title {
  font-size: var(--text-h1);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 800px;
}
.page-banner__lead {
  font-size: var(--text-body-lg);
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}

/* ===== SPECS TABLE ===== */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-top: var(--sp-6);
}
.specs-table th {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}
.specs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}
.specs-table tr:nth-child(even) td { background: var(--color-bg); }

/* ===== PRODUCT CARDS ===== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: var(--sp-7);
}
.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.product-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.product-card__img {
  aspect-ratio: 16 / 9;
  background: var(--color-primary) center / cover no-repeat;
}
.product-card__body {
  padding: 24px;
  background: var(--color-white);
}
.product-card__title {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}
.product-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

/* ===== LOCATION CARD ===== */

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: var(--sp-7);
}
.location-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--t-base);
}
.location-card:hover { box-shadow: var(--shadow-card); }
.location-card__img {
  aspect-ratio: 16 / 9;
  background: var(--color-primary) center / cover no-repeat;
}
.location-card__body { padding: 24px; }
.location-card__name {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-2);
}
.location-card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}
.location-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===== FEATURE LIST ===== */

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: var(--sp-6) 0;
}
.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}
.feature-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}
.feature-item__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-1);
}
.feature-item__desc {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ===== CLIENT REFERENCES ===== */

.ref-section { margin-top: var(--sp-7); }
.ref-section h3 {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}
.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--sp-6);
}
.ref-tag {
  padding: 7px 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  color: var(--color-text);
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */

body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .header-right .btn-primary { display: none; }

  .header-nav {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .header-nav.is-open { transform: translateX(0); }
  .header-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
  }
  .header-nav a {
    font-size: 28px;
    font-weight: 700;
    padding: var(--sp-3) 0;
    border-bottom: none;
    white-space: normal;
    text-align: center;
  }
  .header-nav a:hover { border-bottom: none; }
  .header-nav a.is-active { border-bottom: none; }
  .header-nav__cta {
    display: inline-block;
    margin-top: var(--sp-4);
    font-size: var(--text-body);
    padding: 14px 28px;
  }

  /* El logo es muy ancho (ratio ~5.6:1); a 44px de alto se come casi
     todo el ancho disponible en móvil y empuja el botón de menú fuera
     de la pantalla. Se reduce para que el header siempre quepa. */
  .header-logo img { height: 30px; }

  .hero { padding-top: 70px; }
  .hero__ctas { margin-bottom: 48px; }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 0;
  }
  .hero-stats__item { border-left: none; padding: 0 16px; }

  .servicios-grid  { grid-template-columns: 1fr 1fr; }
  .calidad-grid    { grid-template-columns: 1fr 1fr; }
  .clientes-grid   { grid-template-columns: repeat(3, 1fr); }

  .inst-grid,
  .va-grid,
  .cta-grid,
  .footer-grid     { grid-template-columns: 1fr; gap: 32px; }

  .va-img          { order: 1; }
  .va-content      { order: 2; }
  .va-list         { grid-template-columns: 1fr; }

  .section         { padding: var(--section-py-sm) 0; }
}

@media (max-width: 560px) {
  .servicios-grid { grid-template-columns: 1fr; }
  .calidad-grid   { grid-template-columns: 1fr; }
  .clientes-grid  { grid-template-columns: repeat(2, 1fr); }
}
