/* ============================================================
   SIMEM · home.css — estilos exclusivos de la página de Inicio
   ============================================================ */

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--navy-deep);
  color: #D6E0EE;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, var(--navy-deep) 26%, rgba(7, 23, 49, .86) 48%, rgba(7, 23, 49, .45) 78%, rgba(7, 23, 49, .30) 100%);
}
.hero__inner {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
/* El contenedor mantiene el ancho del menú; solo el texto se limita */
.hero__inner > * { max-width: 44rem; }
.hero h1 {
  color: #fff;
  font-size: clamp(1.85rem, 4.3vw, 2.95rem);
  line-height: 1.08;
}
.hero h1 em {
  font-style: normal;
  color: var(--orange);
}
.hero__sub {
  margin-top: 1.4rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #B7C4D8;
  max-width: 34rem;
}
.hero__actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}
.hero__stats {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__stats div { line-height: 1.2; }
.hero__stats b {
  display: block;
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 1.9rem;
  color: #fff;
}
.hero__stats span {
  font-size: .86rem;
  color: #9DAECA;
}

/* trazos "flujo continuo" en la esquina */
.hero__flow {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: min(34vw, 420px);
  z-index: -1;
  color: var(--orange);
  opacity: .32;
}
@media (max-width: 720px) { .hero__flow { display: none; } }

/* ---------------- Servicios · mosaico bento ---------------- */
.svc-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(235px, 1fr);
  gap: 12px;
}

.svc-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: var(--radius);
  color: #fff;
  isolation: isolate;
}
.svc-panel--lg   { grid-column: span 2; grid-row: span 2; }
.svc-panel--wide { grid-column: span 2; }
.svc-panel:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }

.svc-panel__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .6s var(--ease);
}
.svc-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(175deg, rgba(7,23,49,.12) 0%, rgba(7,23,49,.34) 42%, rgba(7,23,49,.86) 100%);
  transition: background .4s var(--ease);
}

.svc-panel__ico {
  position: absolute;
  top: 1rem; left: 1rem;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(3px);
}
.svc-panel__ico img { width: 20px; height: 20px; object-fit: contain; }

.svc-panel__content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
}
.svc-panel--lg .svc-panel__content { padding: 1.6rem 1.7rem; }

.svc-panel__title {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.2;
}
.svc-panel--lg .svc-panel__title { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }

/* Bloque que aparece al pasar el mouse / enfocar */
.svc-panel__reveal {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: max-height .4s var(--ease), opacity .3s var(--ease), transform .3s var(--ease), margin .4s var(--ease);
}
.svc-panel__reveal p {
  color: rgba(255,255,255,.92);
  font-size: .86rem;
  line-height: 1.4;
}
/* En las tarjetas que no son la grande, el texto se limita a 2 líneas */
.svc-panel:not(.svc-panel--lg) .svc-panel__reveal p {
  font-size: .82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.svc-panel__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background-color .15s var(--ease);
}
.svc-panel:hover .svc-panel__more { background: var(--gray-light); }
.svc-panel__more svg { width: 1.05em; height: 1.05em; }
.svc-panel__thumbs { display: flex; gap: .5rem; }
.svc-panel__thumbs img {
  width: 78px; height: 54px;
  object-fit: cover;
  border-radius: 7px;
  border: 1.5px solid rgba(255,255,255,.38);
}

.svc-panel:hover .svc-panel__img,
.svc-panel:focus-within .svc-panel__img { transform: scale(1.05); }
.svc-panel:hover::after,
.svc-panel:focus-within::after {
  background: linear-gradient(175deg, rgba(7,23,49,.45) 0%, rgba(7,23,49,.72) 45%, rgba(7,23,49,.95) 100%);
}
.svc-panel:hover .svc-panel__reveal,
.svc-panel:focus-within .svc-panel__reveal {
  max-height: 260px;
  opacity: 1;
  transform: none;
  margin-top: .7rem;
}

/* Tablet: 2 columnas */
@media (max-width: 900px) {
  .svc-bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(200px, auto); }
  .svc-panel--lg { grid-column: span 2; grid-row: span 1; }
  .svc-panel--wide { grid-column: span 2; }
}

/* Movil: 1 columna, contenido siempre visible.
   No hay hover, así que la tarjeta puede ser más baja y el título más grande. */
@media (max-width: 560px) {
  .svc-bento { grid-template-columns: 1fr; }
  .svc-panel, .svc-panel--lg, .svc-panel--wide { grid-column: auto; grid-row: auto; }
  .svc-panel { min-height: 232px; display: flex; flex-direction: column; }
  .svc-panel__ico { position: static; margin: 1.1rem 0 0 1.1rem; }
  .svc-panel__content { position: static; margin-top: auto; padding: 1.25rem 1.35rem; }
  .svc-panel__title,
  .svc-panel--lg .svc-panel__title { font-size: 1.35rem; }
}
@media (hover: none) {
  .svc-panel__reveal {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: .7rem;
  }
  .svc-panel::after {
    background: linear-gradient(175deg, rgba(7,23,49,.35) 0%, rgba(7,23,49,.65) 45%, rgba(7,23,49,.95) 100%);
  }
  .svc-panel__thumbs { display: none; }
}

/* ---------------- Mantenimiento (banda destacada) ---------------- */
.maint__title {
  max-width: 24ch;
  margin: 0 0 clamp(2.25rem, 5vw, 3.5rem);
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.12;
}

.maint__quote {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}

.maint__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.maint__media {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.maint__media img { display: block; width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; }
.maint__badge {
  position: absolute;
  left: 1.1rem; bottom: 1.1rem;
  background: rgba(7, 23, 49, .88);
  color: #fff;
  padding: .8rem 1.1rem;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.maint__badge b {
  display: block;
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 1.5rem;
}
.maint__badge span { font-size: .8rem; color: #A9B7CC; }

.maint__points {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.1rem;
}
.maint__points li {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}
.maint__points svg {
  flex: none;
  width: 22px; height: 22px;
  margin-top: .15rem;
  color: var(--orange);
}
.maint__points b { color: var(--ink); font-family: var(--ff-head); display: block; }
.maint__points span { font-size: .95rem; color: var(--text-soft); }
.maint__cta {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
}

/* ---------------- Nosotros · Experiencia ---------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.about__media {
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about__media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about__title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin-top: .9rem;
}
.about__body > p { margin-top: 1.1rem; color: #A9B7CC; font-size: 1.02rem; }
.about__values {
  margin-top: 1.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1.5rem;
}
.about__values li {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .98rem;
  color: #fff;
}
.about__values-ico {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
}
.about__values-ico img { width: 19px; height: 19px; object-fit: contain; }

/* ---------------- Marcas con las que trabajamos ---------------- */
.brands { padding-block: clamp(2.5rem, 6vw, 4rem); background: #fff; }
.brands__head {
  text-align: center;
  font-family: var(--ff-mono);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 2rem;
}
.brands__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem 2rem;
  align-items: center;
}
.brands__grid img {
  width: 100%;
  height: 44px;
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
  opacity: .62;
  transition: filter .2s var(--ease), opacity .2s var(--ease);
}
.brands__grid a:hover img,
.brands__grid li:hover img { filter: grayscale(0); opacity: 1; }
@media (max-width: 900px) { .brands__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .brands__grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1rem; } }

/* ---------------- Sectores · muro de clientes con filtro ---------------- */
.clients .section-head {
  margin-inline: auto;
  text-align: center;
}
.clients__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.clients__filter {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .84rem;
  color: var(--text);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.clients__filter:hover { border-color: var(--navy); color: var(--ink); }
.clients__filter.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.clients__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.clients__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 16 / 10;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: opacity .3s var(--ease), transform .3s var(--ease), box-shadow .2s var(--ease);
}
.clients__item:hover { box-shadow: var(--shadow-sm); }
.clients__item img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  object-fit: contain;
}
.clients__item.is-hidden { display: none; }
.clients__item.is-dim { opacity: 0; transform: scale(.96); }

.clients__note {
  margin-top: 1.75rem;
  font-size: .95rem;
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 960px) { .clients__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) {
  .clients__grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .clients__item { padding: .7rem .45rem; }
  .clients__item img { max-height: 52px; }
}
@media (max-width: 380px) { .clients__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- Casos de éxito · carrusel ---------------- */
.cases-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: .25rem;
  margin-inline: 0;
  padding-inline: 0;
}
.cases-track::-webkit-scrollbar { display: none; }
.cases-track > * {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
  min-width: 0;
}
.case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy-soft), var(--navy));
  color: #B7C4D8;
  border: 1px solid rgba(255, 255, 255, .06);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.case-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.case-card:hover .case-card__media img { transform: scale(1.06); }
.case-card__body { padding: 1.5rem 1.6rem 1.7rem; }
.case-card h3 {
  color: var(--orange);
  font-size: 1.1rem;
  margin-bottom: .55rem;
}
.case-card p { font-size: .9rem; }

/* Punticos de navegación */
.cases-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.5rem;
}
.cases-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 31, 61, .18);
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.cases-dots button:hover { background: rgba(10, 31, 61, .35); }
.cases-dots button.is-active {
  background: var(--orange);
  transform: scale(1.4);
}

.cases__foot { margin-top: 1.75rem; text-align: center; }

@media (max-width: 900px) {
  .cases-track > * { flex-basis: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 620px) {
  .cases-track > * { flex-basis: 84%; }
}

/* ---------------- CTA final ---------------- */
.cta-final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, var(--orange) 0%, var(--amber) 100%);
  color: #fff;
}
.cta-final::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, rgba(7, 23, 49, .96) 0%, rgba(0, 87, 217, .92) 100%);
  opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
}
.cta-final:hover::after,
.cta-final:focus-within::after { opacity: 1; }
.cta-final__photo {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: clamp(280px, 40vw, 560px);
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 100%);
  mask-image: linear-gradient(to right, #000 78%, transparent 100%);
}
.cta-final__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 7vw, 5rem);
  padding-left: clamp(300px, 44vw, 600px);
}
.cta-final h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.cta-final p { margin-top: .9rem; font-size: 1.1rem; color: rgba(255, 255, 255, .92); max-width: 44ch; }
.cta-final__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }
.cta-final__flow {
  position: absolute;
  right: -30px; top: -40px;
  width: min(30vw, 360px);
  z-index: 1;
  color: #fff;
  opacity: .35;
}
.cta-final:hover .btn--dark,
.cta-final:focus-within .btn--dark {
  --btn-bg: #fff;
  --btn-fg: var(--navy);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), var(--shadow-md);
}
.cta-final:hover .btn--wa,
.cta-final:focus-within .btn--wa {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), var(--shadow-md);
}

/* ---------------- Aparición suave ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .maint__grid,
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .maint__grid > *,
  .about__grid > * { min-width: 0; }
  .maint__media, .about__media { max-width: 100%; }
  .maint__media img, .about__media img { max-width: 100%; }
  .maint__media { order: -1; }
  .about__media { order: -1; }

  /* CTA final: sin foto en móvil, contenido y botones centrados */
  .cta-final__photo { display: none; }
  .cta-final__inner { padding-left: var(--gutter); text-align: center; }
  .cta-final p { margin-inline: auto; }
  .cta-final__actions { justify-content: center; }
}
@media (max-width: 620px) {
  .hero__stats { gap: 1.5rem 2rem; }
  .hero__stats b { font-size: 1.6rem; }
  .about__values { grid-template-columns: 1fr; gap: .8rem; }

  /* Puntos de mantenimiento como tarjetas dentro del carrusel */
  .maint__points.m-carousel > li {
    flex-direction: column;
    gap: .55rem;
    padding: 1.15rem 1.2rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  /* Chips de sectores: una sola línea, se arrastra para ver más */
  .clients__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .clients__filters::-webkit-scrollbar { display: none; }
  .clients__filter { flex: 0 0 auto; }
}
