.cover {
  position: relative;
  min-height: 60vh;
  background: linear-gradient(135deg,
      var(--green-dark),
      var(--black-carbon));
  color: white;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
}

.cover--hero {
  min-height: 90vh;
}

.cover--small {
  min-height: 10vh;

}

.cover--callout {
  text-align: center;
  align-items: center;
  padding: auto;
  display: block;
  min-height: auto;
}

.cover a, .cover--hero a, .cover--callout a {
  color: white;
}

.cover-content {
  max-width: 700px;
}

.cover h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.cover p {
  opacity: 0.9;
}

/* Esta clase empuja el contenido al lado derecho */
.cover--reverse {
  justify-content: flex-end;
  text-align: right;
}

#main-page {
  background: linear-gradient(135deg,
      rgba(10, 10, 10, 1.0),
      /* Negro carbón con 90% opacidad */
      rgba(0, 50, 0, 0)
      /* Verde oscuro con 80% opacidad */
    ),
    url('../img/hero/SUBESTACION-ELECTRICA-BOQUERON-3-1024x450.jpg');

  background-size: cover;
  background-position: center;
}

#main-page-nosotros {
  background: linear-gradient(135deg,
      rgba(0, 50, 0, 0),
      rgba(10, 10, 10, 1.0)
      /* Negro carbón con 90% opacidad */
    ),
    url('../img/hero/imaegen-de-muestra-1.jpg');

  background-size: cover;
  background-position: center;
}


/* =========================
   TEXT SPACING INSIDE SECTIONS
========================= */

.section p {
  margin-bottom: 1rem;
  line-height: 1.7;
}


/* =========================
   COVER ARTICLE (LONG TEXT)
========================= */

.cover-article {
  background: linear-gradient(135deg,
      var(--green-dark),
      var(--black-carbon));
  color: white;
  padding: 5rem 2rem;
}

.cover-article-inner {
  max-width: 1100px;
  margin: auto;
}

.cover-article h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}

.cover-article-text {
  line-height: 1.75;
}


/* 2 columnas en desktop */
@media (min-width: 900px) {
  .cover-article-text {
    columns: 1;
    column-gap: 3rem;
  }
}

.cover-article-text p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
  break-inside: avoid;
}

/* MOBILE */
@media (max-width: 768px) {
  .cover-article {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 768px) {

  #main-page {
    background-image: url('../img/hero/SUBESTACION-ELECTRICA-BOQUERON-3-1024x450.jpg');
    background-color: rgba(10, 10, 10, 0.75);
    /* color transparente */
    background-blend-mode: overlay;
    /* mezcla color + imagen */
    background-size: cover;
    background-position: center;
  }

  #main-page p {
    text-shadow:
      0 2px 6px rgba(0, 0, 0, 0.75),
      0 0 12px rgba(0, 0, 0, 0.4);
  }

  #main-page-nosotros {
    background-image: url('../img/hero/imaegen-de-muestra-1.jpg');
    background-color: rgba(10, 10, 10, 0.75);
    /* color transparente */
    background-blend-mode: overlay;
    /* mezcla color + imagen */
    background-size: cover;
    background-position: center;
  }

  #main-page-nosotros p {
    text-shadow:
      0 2px 6px rgba(0, 0, 0, 0.75),
      0 0 12px rgba(0, 0, 0, 0.4);
  }
}

.card {
  background: var(--bg-section);
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}



.btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
}



/* =========================
       PROJECTS GRID
    ========================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* =========================
       CAROUSEL
    ========================= */
.project-carousel {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: #000;
}

.project-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.project-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.project-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}

.project-btn.prev {
  left: 12px;
}

.project-btn.next {
  right: 12px;
}

/* =========================
       INFO
    ========================= */
.project-info {
  padding: 1.5rem;
}

.project-info strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.project-info ul {
  padding-left: 1.2rem;
}

/* =========================
       MODAL
    ========================= */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}


.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-grid form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input,
textarea {
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.form-status.error {
  color: #c0392b;
}

.form-status.success {
  color: #1e8e3e;
}

/* MAPA */
.contact-map {
  margin-bottom: 3rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

/* INFO */
.contact-info img {
  margin-bottom: 1.5rem;
}

.contact-info h3 {
  margin-bottom: 1rem;
}


@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cover {
    padding: 3rem 1.5rem;
  }
}


/* =========================
   SERVICE CAROUSEL
========================= */

.service-card {
  padding: 0;
  overflow: hidden;
}

.service-carousel {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #000;
}

.service-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.service-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* buttons */
.service-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}

.service-btn.prev { left: 10px; }
.service-btn.next { right: 10px; }

.service-info {
  padding: 2rem;
}


/* =========================
   SERVICE IMAGES
========================= */


.service-card h3 {
  margin: 0;
}

.service-card ul {
  margin: 0;
  padding-left: 1.2rem; /* sangría controlada */
}

.service-card .service-content {
  padding: 2rem;
}
 
/* =========================
   SERVICE IMAGES (DESKTOP)
========================= */

.service-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.service-images img {
  width: 100%;
  aspect-ratio: 4 / 3;   /* 👈 mantiene tamaño bonito */
  object-fit: cover;
}

.service-card .service-content {
  padding: 2rem;
}

.service-card h3 {
  margin: 0 0 0.75rem;
}

.service-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* =========================
   MOBILE: RESPONSIVE REAL
========================= */
@media (max-width: 768px) {

  .service-images {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 0.75rem;

    width: 100%;                 /* 👈 siempre ancho del padre */
    aspect-ratio: 16 / 9;
    scroll-snap-type: x mandatory;
  }

  .service-images img {
    flex: 0 0 100%;              /* 👈 ocupa todo el ancho */
    height: 100%;                /* 👈 llena la altura calculada */
    object-fit: cover;
    scroll-snap-align: center;
  }

  .service-card .service-content {
    padding: 1.5rem;
  }
}




/* =========================
   EQUIPMENT GALLERY (FIX)
========================= */

.equipment-gallery {
  margin-top: 4rem;
}

.equipment-title {
  margin-bottom: 2rem;
  color: var(--accent);
}

/* GRID GRANDE */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 2fr));
  gap: 2rem;
}

/* CARD */
.equipment-grid figure {
  margin: 0;
  background: var(--bg-section);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* IMAGEN GRANDE */
.equipment-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* TEXTO */
.equipment-grid figcaption {
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* MOBILE */
@media (max-width: 768px) {
  .equipment-grid img {
    height: 260px;
  }
}

/* =========================
   HERO CAROUSEL (FOOTER)
========================= */

.hero-carousel {
  position: relative;
  width: 100%;
  height: 40rem;
  overflow: hidden;
  background: var(--bg-section);
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.hero-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* botones */
.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
}

.hero-btn.prev { left: 20px; }
.hero-btn.next { right: 20px; }

/* mobile */
@media (max-width: 768px) {
  .hero-carousel {
    height: 260px;
  }

  .hero-btn {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
}

.mvv {
  padding: 4rem 2rem; /* una sola vez */
}

.mvv-item {
  margin-bottom: 3rem;
}

.mvv-item:last-child {
  margin-bottom: 0;
}

.mvv p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.mvv h2 {
  letter-spacing: 0.5px;
}