@import url("backgrounds-mobile.css");
@import url("backgrounds-mobile-imagenes.css");
@import url("fondos-desktop-fixed.css");

/* Home — Electricidad Ituarte */

@media (min-width: 769px) {
  .pagina-home {
    background-image: url("../img/fondo1.png?v=hd2");
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
  }
}

.pagina-home main {
  position: relative;
}

/* ── Hero ── */
.hero {
  background: var(--ituarte-negro);
}

.hero-swiper {
  width: 100%;
  height: clamp(280px, 46vh, 480px);
}

.hero-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
}

.hero-swiper .swiper-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 5vw, 48px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 55%, transparent 100%);
  color: #fff;
}

.hero-overlay .section-kicker {
  color: #fecaca;
}

.hero-overlay h1 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 3.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 560px;
}

.hero-overlay p {
  margin: 0 0 18px;
  font-size: clamp(0.85rem, 1.6vw, 0.96rem);
  color: #e5e7eb;
  max-width: 480px;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  color: #fff;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--ituarte-rojo);
}

/* ── Paneles grises sobre fondo1 (como ubicación) ── */
.section-block--panel,
.section-block--gray.section-block--home,
.cta-contacto {
  background: transparent;
}

.section-block--gray:not(.section-block--home) {
  background: rgba(230, 230, 230, 0.88);
}

.section-block--home .container,
#conocenos .container,
.cta-contacto .container {
  background: rgba(230, 230, 230, 0.92);
  border-radius: var(--ituarte-radio);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--ituarte-sombra);
}

/* Banner ¿Quiénes somos? / Contacto (como antes) */
.banner-link {
  display: block;
  text-decoration: none;
  margin-top: 20px;
}

.banner-seccion {
  min-height: 140px;
  border-radius: var(--ituarte-radio);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  box-shadow: var(--ituarte-sombra);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.banner-seccion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.banner-seccion h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.banner-link:hover .banner-seccion {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.banner-conocenos {
  background-image: url("../img/conocenos.jpg");
}

.banner-contacto {
  background-image: url("../img/contactoo.png");
}

/* ── Cards productos / catálogo ── */
.cards-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.card-productos {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
}

.card-productos video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background-color: #1a1a1a;
}

.card-productos .card-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.32);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.card-catalogo {
  position: relative;
  min-height: 100%;
  display: flex;
  background-image: url("../img/catalogo.png");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.card-catalogo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 0;
}

.card-catalogo .card-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
  width: 100%;
}

.card-body {
  padding: 22px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.card-body p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: inherit;
  opacity: 0.92;
  line-height: 1.5;
}

.card-cta {
  font-size: 13px;
  font-weight: 700;
  color: #fecaca;
}

/* ── Sucursales ── */
.sucursales-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sucursal-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
}

.sucursal-card h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.sucursal-dir {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--ituarte-gris);
}

.sucursal-card video,
.sucursal-card img {
  width: 100%;
  border-radius: 10px;
  margin-top: 8px;
}

.sucursal-card video {
  height: clamp(200px, 22vw, 280px);
  max-height: none;
  object-fit: cover;
  display: block;
  /* Solo color: "background:" corto borra background-image del poster */
  background-color: #e4e4e7;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.sucursal-card .mapa-link img {
  display: block;
}

.mapa-link {
  display: block;
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  max-width: 100%;
  margin-inline: auto;
}

.mapa-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.mapa-link img {
  width: 100%;
  display: block;
  margin-top: 0;
  max-height: clamp(88px, 11vw, 120px);
  object-fit: cover;
}

/* ── Pagos ── */
.pagos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pago-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--ituarte-radio);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--ituarte-sombra);
}

.pago-item img {
  width: 64px;
  height: auto;
  margin: 0 auto 10px;
}

.pago-item span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ituarte-negro);
}

/* ── Promos — grilla sin espacio vacío ── */
.promos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.promo-item {
  overflow: hidden;
  line-height: 0;
}

.promo-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Home: Proyectos (escenario, altura media) ── */
.section-block--proyectos-home {
  padding-block: 40px;
}

.proyectos-home-stage {
  position: relative;
  width: 100%;
  padding: clamp(22px, 3.5vw, 32px) clamp(20px, 3vw, 28px);
  border-radius: var(--ituarte-radio);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(245, 245, 247, 0.96) 45%,
    rgba(228, 228, 232, 0.94) 100%
  );
  color: var(--ituarte-negro);
  overflow: hidden;
  box-shadow: var(--ituarte-sombra);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.proyectos-home-beams {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(255, 12, 12, 0.07) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 50% 0%, rgba(255, 200, 120, 0.12) 0%, transparent 55%);
  opacity: 1;
  animation: proyectosHomeAmbiente 10s ease-in-out infinite alternate;
}

@keyframes proyectosHomeAmbiente {
  from {
    opacity: 0.85;
  }
  to {
    opacity: 1;
  }
}

.proyectos-home-header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(18px, 2.8vw, 24px);
}

.proyectos-home-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ituarte-rojo);
  margin-bottom: 8px;
}

.proyectos-home-heading {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--ituarte-negro);
}

.proyectos-home-heading em {
  font-style: normal;
  background: linear-gradient(105deg, var(--ituarte-rojo) 0%, #c62828 40%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.proyectos-home-lead {
  margin: 0;
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  line-height: 1.5;
  color: var(--ituarte-gris);
}

.proyectos-home-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.8vw, 14px);
}

.proyectos-home-tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: #fff;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: clamp(168px, 20vw, 210px);
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #e4e4e7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}

.proyectos-home-tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.proyectos-home-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.15) 52%, rgba(0, 0, 0, 0.35) 100%);
  transition: opacity 0.35s;
}

.proyectos-home-tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proyectos-home-tile-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fecaca;
}

.proyectos-home-tile-name {
  font-size: clamp(0.88rem, 1.7vw, 1rem);
  font-weight: 700;
  line-height: 1.2;
}

.proyectos-home-tile-loc {
  font-size: 11px;
  color: #d4d4d8;
  opacity: 0.9;
}

.proyectos-home-tile:hover,
.proyectos-home-tile:focus-visible {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(198, 40, 40, 0.25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.proyectos-home-tile:hover .proyectos-home-tile-shade,
.proyectos-home-tile:focus-visible .proyectos-home-tile-shade {
  opacity: 0.92;
}

.proyectos-home-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: clamp(18px, 2.8vw, 24px);
}

.proyectos-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.22);
}

.proyectos-home-btn i {
  transition: transform 0.25s;
}

.proyectos-home-btn:hover i {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .proyectos-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proyectos-home-tile {
    max-height: none;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 520px) {
  .proyectos-home-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .proyectos-home-tile {
    flex: 0 0 min(70vw, 240px);
    scroll-snap-align: center;
    max-height: none;
    aspect-ratio: 4 / 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .proyectos-home-beams {
    animation: none;
  }

  .proyectos-home-tile {
    transition: none;
  }
}

/* ── CTA contacto ── */
.cta-contacto {
  text-align: center;
}

.cta-contacto .section-lead {
  margin-inline: auto;
}

.cta-contacto .btn {
  margin-top: 4px;
}

@media (max-width: 992px) {
  .pagina-home {
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  .cards-duo,
  .sucursales-grid {
    grid-template-columns: 1fr;
  }

  .pagos-grid {
    grid-template-columns: 1fr;
  }

  .promos-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-inline: auto;
  }

  .hero-swiper {
    height: clamp(280px, 58vh, 420px);
  }

  .card-productos {
    min-height: 240px;
  }

  .card-catalogo {
    min-height: 220px;
  }
}

@media (max-width: 380px) {
  .hero-overlay h1 {
    font-size: 1.25rem;
  }

  .hero-overlay {
    padding: 18px 14px;
  }
}
