/* ==============================================================================
   MXLOGISTIC — pages.css
   ============================================================================== */

/* ------------------------------------------------------------------------------
   1. HERO SECTION (HOMEPAGE & LANDINGS)
   ------------------------------------------------------------------------------ */
.hero-section {
  padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 6vw, 64px);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-steel);
  margin: 18px 0 28px;
  max-width: 580px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-media-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-media-wrapper img,
.hero-media-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-media-wrapper img {
  object-fit: contain;
}

.hero-media-wrapper video {
  object-fit: cover;
}

.hero-media-overlay-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Operational Stats Bar */
.stats-bar {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 20, 26, 0.6);
  margin-top: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.stat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------------------
   2. SECCIONES DE SERVICIO Y TARJETAS COMERCIALES
   ------------------------------------------------------------------------------ */
.section-py {
  padding: clamp(48px, 8vw, 84px) 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.service-cards-grid {
  columns: 1;
  column-gap: 24px;
}

@media (min-width: 640px) {
  .service-cards-grid {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .service-cards-grid {
    columns: 3;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 24px;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-green-border);
}

.service-cards-grid .card {
  break-inside: avoid;
  margin-bottom: 24px;
}

.service-card-media {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
  display: grid;
  place-items: center;
}

.service-card-media img {
  width: 100%;
  height: auto;
  display: block;
}

.service-card:hover .service-card-media img {
  transform: none;
}

.service-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.service-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.spec-badge {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-steel);
}

/* Ficha Técnica / Spec Table */
.spec-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 32px 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.spec-table th,
.spec-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-table th {
  background: var(--bg-surface-raised);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
}

.spec-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ------------------------------------------------------------------------------
   3. SEDES FÍSICAS Y MAPAS (/contacto/ Y /empresa/)
   ------------------------------------------------------------------------------ */
.sedes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 840px) {
  .sedes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1180px) {
  .sedes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sede-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sede-card-body {
  padding: 24px;
  flex-grow: 1;
}

.sede-card-body h3 {
  margin-bottom: 8px;
}

.sede-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-steel);
}

.sede-map-container {
  height: 240px;
  width: 100%;
  background: #000;
  border-top: 1px solid var(--border-subtle);
}

.sede-map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------------------------
   4. BLOG DIRECTORY & EMPTY STATE
   ------------------------------------------------------------------------------ */
.blog-empty-state {
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  max-width: 720px;
  margin: 40px auto;
}

.blog-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--accent-green);
}

.blog-empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.blog-empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto 24px;
}


/* ==============================================================================
   EDITORIAL HERO (HOMEPAGE) — IMPOSING & PERFECTLY FRAMED
   ============================================================================== */
:root {
  --mx-black: #0d0e10;
  --mx-graphite: #16181b;
  --mx-steel: #8f9496;
  --mx-silver: #d8dada;
  --mx-white: #f4f5f2;
  --mx-green: #4c9102;
  --mx-content: 1440px;
}

.mx-hero {
  position: relative;
  isolation: isolate;
  min-height: min(820px, 90svh);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 74% 48%,
      rgba(76, 145, 2, 0.14),
      transparent 40%
    ),
    linear-gradient(
      115deg,
      #0d0e10 0%,
      #121416 48%,
      #181a1c 100%
    );
  color: var(--mx-white);
  padding: 48px 0;
}

.mx-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to right, rgba(0,0,0,.85), transparent 85%);
}

.mx-hero__load-path {
  position: absolute;
  width: 700px;
  height: 700px;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(76, 145, 2, .26);
  border-radius: 50%;
  z-index: -2;
  pointer-events: none;
}

.mx-hero__load-path::before {
  content: "";
  position: absolute;
  inset: 75px;
  border: 1px solid rgba(216, 218, 218, .08);
  border-radius: inherit;
}

.mx-hero__load-path::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 13%;
  top: 21%;
  border-radius: 50%;
  background: var(--mx-green);
  box-shadow:
    0 0 0 7px rgba(76,145,2,.12),
    0 0 22px rgba(76,145,2,.5);
}

.mx-hero__inner {
  position: relative;
  width: min(calc(100% - 48px), var(--mx-content));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(480px, 1.25fr);
  gap: 36px;
  align-items: center;
}

.mx-hero__content {
  position: relative;
  z-index: 5;
  max-width: 600px;
  padding-block: 20px;
}

.mx-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--mx-steel);
}

.mx-hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--mx-green);
}

.mx-hero h1 {
  margin: 0;
  max-width: 600px;
  font-size: clamp(2.6rem, 4.6vw, 4.8rem);
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.mx-hero h1 span {
  display: block;
  color: var(--mx-silver);
}

.mx-hero__lead {
  max-width: 530px;
  margin: 22px 0 0;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  color: rgba(244,245,242,.8);
}

.mx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.mx-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 750;
  letter-spacing: .04em;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.mx-button--primary {
  background: var(--mx-green);
  color: white;
  border: 1px solid var(--mx-green);
}

.mx-button--secondary {
  color: var(--mx-white);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.025);
}

.mx-button:hover {
  transform: translateY(-2px);
}

.mx-button:focus-visible {
  outline: 3px solid var(--mx-white);
  outline-offset: 4px;
}

.mx-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 0;
  margin: 30px 0 0;
  list-style: none;
  color: var(--mx-steel);
  font-size: .82rem;
}

.mx-hero__facts li {
  position: relative;
  padding-left: 14px;
}

.mx-hero__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  background: var(--mx-green);
  transform: rotate(45deg);
}

/* =========================================================
   HERO ASSET: IMPONENTE, ROBUSTO Y TOTALMENTE VISIBLE
   ========================================================= */
.mx-hero__visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.mx-hero__asset-wrap {
  position: relative;
  width: 100%;
  max-width: 780px;
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  border: none;
  border-radius: 14px;
  background: #080a0b;
  filter: drop-shadow(0 24px 34px rgba(0,0,0,.5));
}

.mx-hero__asset,
.mx-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mx-hero__asset { object-fit: contain; }
.mx-hero__video { object-fit: cover; }

.mx-hero__asset {
  z-index: 1;
  display: block;
}

.mx-hero__video {
  z-index: 2;
  display: block;
  opacity: 0;
  transition: opacity .35s ease;
}

.mx-hero__video[hidden],
.mx-hero__video-toggle[hidden] {
  display: none;
}

.mx-hero__video.is-ready {
  opacity: 1;
}

.mx-hero__brand-plate {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 92px;
  height: 80px;
  margin-right: 50px;
}

.mx-hero__brand-plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mx-hero__video-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: rgba(10, 11, 14, .35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font: 600 .78rem/1 var(--font-sans);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.mx-hero__video-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--mx-green);
  background: rgba(10, 11, 14, .5);
}

.mx-hero__video-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--mx-green);
  font-size: .68rem;
}

@media (max-width: 1200px) {
  .mx-hero__inner {
    grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.15fr);
    gap: 28px;
  }
  .mx-hero__asset-wrap {
    max-width: 660px;
  }
}

@media (max-width: 1024px) {
  .mx-hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .mx-hero__asset-wrap {
    max-width: 540px;
  }
}

@media (max-width: 767px) {
  .mx-hero {
    min-height: auto;
    padding: 36px 0 52px;
  }
  .mx-hero__inner {
    width: min(calc(100% - 32px), 540px);
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .mx-hero__content {
    width: 100%;
    padding: 30px 0 0;
    max-width: none;
    text-align: left;
  }
  .mx-hero h1 {
    font-size: clamp(2.2rem, 9vw, 3.4rem);
    line-height: 1.02;
  }
  .mx-hero__lead {
    max-width: 100%;
    margin-top: 18px;
    font-size: 1.02rem;
  }
  .mx-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .mx-hero__visual {
    margin-top: 14px;
    justify-content: center;
  }
  .mx-hero__asset-wrap {
    max-width: 460px;
    aspect-ratio: 3 / 2;
    justify-content: center;
  }
  .mx-hero__visual-label {
    display: none;
  }
  .mx-hero__load-path {
    width: 360px;
    height: 360px;
    right: -130px;
    top: 75%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mx-button {
    transition: none;
  }
  .mx-button:hover {
    transform: none;
  }
}

@media (max-width: 767px) {
  .mx-hero__video-toggle {
    display: none !important;
  }

  .mx-hero__brand-plate {
    bottom: 0;
    right: 0;
    width: 76px;
    height: 65px;
    margin-right: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mx-hero__video {
    display: none;
  }

  .mx-hero__video-toggle {
    display: none !important;
  }
}

/* Tratamiento productivo seleccionado: Concreto protagonista */
body.mx-concrete-protagonist .mx-hero {
  background-image:
    linear-gradient(90deg, rgba(9, 10, 12, .88) 0%, rgba(9, 10, 12, .7) 44%, rgba(9, 10, 12, .42) 100%),
    url('/assets/images/optimized/mxl-concrete-industrial.webp');
  background-position: center, center;
  background-size: cover, cover;
}

body.mx-concrete-protagonist .mx-hero__grid {
  opacity: .04;
}

body.mx-concrete-protagonist .mx-hero__asset-wrap {
  border: none;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .48);
}

@media (max-width: 767px) {
  body.mx-concrete-protagonist .mx-hero {
    background-image:
      linear-gradient(180deg, rgba(9, 10, 12, .9) 0%, rgba(9, 10, 12, .72) 60%, rgba(9, 10, 12, .88) 100%),
      url('/assets/images/optimized/mxl-concrete-industrial-sm.webp');
  }
}
