/* Estilos generales */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
}

h1, h2, h3 {
  text-align: center;
}
header {
  background: #f0f0f0;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  color: #222;
}

section {
  padding: 2rem 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Promo links */
.promo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  background: #f5f5f5;
  padding: 1rem;
}

.promo-link {
  text-align: center;
  width: 200px;
  text-decoration: none;
  color: #000;
}

.promo-link img {
  border-radius: 8px;
}

/* Alternos */


.servicios-actuales .bloque {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
}

.servicios-actuales .bloque:nth-child(odd) {
  flex-direction: row;
}

.servicios-actuales .bloque:nth-child(even) {
  flex-direction: row-reverse;
}

.servicios-actuales .bloque .texto,
.servicios-actuales .bloque .imagen {
  flex: 1 1 50%;
  padding: 1rem;
  box-sizing: border-box;
}

/* Legado MCD3 - Galería en 3 columnas con texto */
.legado-mcd3 .galeria3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.legado-mcd3 .galeria3 .item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legado-mcd3 .galeria3 img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legado-mcd3 .galeria3 h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.2rem;
}

.legado-mcd3 .galeria3 p {
  font-size: 0.95rem;
  color: #555;
}

/* Transformación digital */
.transformacion-digital .contenido-unico {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

footer a {
  color: #ddd;
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover {
  text-decoration: underline;
}


.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.95);
  color: white;
  text-align: center;
  padding: 1rem;
  z-index: 9999;
  display: none;
  font-size: 0.9rem;
}

.cookie-banner a {
  color: #ffd700;
  text-decoration: underline;
}

.cookie-banner button {
  margin-left: 1rem;
  background: #ffd700;
  border: none;
  color: #000;
  padding: 0.4rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
}



#btn-volver-arriba {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background-color: #333;
  color: white;
  border: none;
  padding: 0.7rem 1rem;
  font-size: 1.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

#btn-volver-arriba:hover {
  background-color: #555;
}



.hitos-historicos {
  padding: 60px 20px;
  background-color: #f7f7f7;
  text-align: center;
}

.hitos-historicos h2 {
  font-size: 2em;
  margin-bottom: 40px;
}

.hitos-historicos .galeria3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  justify-content: center;
  align-items: start;
}

.hitos-historicos .item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  transition: transform 0.3s ease;
}

.hitos-historicos .item:hover {
  transform: translateY(-5px);
}

.hitos-historicos img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.hitos-historicos h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #333;
}

.hitos-historicos p {
  font-size: 0.95em;
  color: #555;
}

.hitos-historicos .galeria3 .item:last-child {
  background-color: #f6fbff;
  border: 1px solid #cde7ff;
}


.historia-mcd3 {
  background: #f9f9f9;
  padding: 40px 20px;
  text-align: center;
}
.historia-mcd3 h2 {
  font-size: 2em;
  margin-bottom: 30px;
}
.timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.paso {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 250px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.paso:hover {
  transform: translateY(-5px);
}
.icono {
  font-size: 2.5em;
  margin-bottom: 10px;
}
.paso h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}
.paso p {
  font-size: 0.95em;
  color: #555;
}













.fixed-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}

.fixed-preview img,
.fixed-preview video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.fixed-preview video {
  opacity: 0;
  pointer-events: none;
}
.fixed-preview.playing video {
  opacity: 1;
}






.contacto-mcd3 {
  background: #eef6ff;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 2px solid #cde7ff;
}

.contacto-mcd3 h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #003c6c;
}

.contacto-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.contacto-item {
  background: white;
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex: 1 1 300px;
  text-align: center;
}

.contacto-item .icono {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.contacto-item p {
  margin: 0;
  font-size: 1rem;
  color: #333;
}

.contacto-item a {
  color: #0058a0;
  text-decoration: none;
  font-weight: bold;
}

.contacto-item a:hover {
  text-decoration: underline;
}







@media (max-width: 768px) {
  .timeline {
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (max-width: 768px) {
  .servicios-actuales .bloque {
    flex-direction: column !important;
  }

  .servicios-actuales .bloque .texto,
  .servicios-actuales .bloque .imagen {
    flex: 1 1 100%;
    padding: 0.5rem;
  }

  .legado-mcd3 .galeria3 {
    grid-template-columns: repeat(2, 1fr);
  }
}


.promo-link {
  flex: 1 1 calc(50% - 1rem); /* 2 por fila en móviles */
  max-width: calc(50% - 1rem);
}

@media (min-width: 768px) {
  .promo-link {
    flex: 0 0 200px; /* Tamaño fijo para tablets en adelante */
    max-width: 200px;
  }
}


@media screen and (max-width: 768px) {
  .servicios-actuales .imagen {
    width: 100%;
  }

  .servicios-actuales .imagen img {
    width: 100%;
    height: auto;
  }
}
