/*------nvo dfa--------*/

.tarjetas-dfa {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* Móvil por defecto */
  gap: 20px;
  margin-top: 30px;
}
.tarjeta .contenido p {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: #1e5774;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
@media (min-width: 768px) {
  .tarjetas-dfa {
    grid-template-columns: repeat(2, 1fr); /* Tablet */
  }
}

@media (min-width: 1024px) {
  .tarjetas-dfa {
    grid-template-columns: repeat(4, 1fr); /* Escritorio: 4 por fila */
  }
}
.tarjeta {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tarjeta img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tarjeta .contenido {
  padding: 15px;
  background-color: #fef8f0;
  font-style: italic;
  font-family: 'Arial', sans-serif;
  font-size: 1em;
  text-align: center;
}

.programas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.programa {
  background-color: #f9f9f9;
  text-decoration: none;
  color: #000;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
}

.programa img {
  width: 100%;
  height: auto;
  display: block;
}

.programa-info {
  padding: 15px;
  background-color: #1e5774;
  color: white;
}

.programa-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.btn-link {
  display: inline-block;
  margin-top: 10px;
  background: #fff;
  color: #1e5774;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 3px;
  text-decoration: none;
}

/*------------posgrados----------------*/
.programas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.programa {
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #000;
  height: 100%;
}

.programa img {
  width: 100%;
  height: 260px; /* Imagen más pequeña */
  object-fit: cover;
}

.programa-info {
  padding: 15px;
  background-color: #1e5774;
  color: white;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.programa-info h3 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.2;
}

@media (max-width: 767px) {
  .programas-grid {
    grid-template-columns: 1fr;
  }

  .programa-info h3 {
    font-size: 0.95rem;
  }
}

/*---------------- organigrama responsivo ---------------*/

.organigrama-container {
  text-align: center;
  padding: 40px;
  font-family: Arial, sans-serif;
}

.titulo-organigrama {
  font-size: 28px;
  color: #8B5C1F;
  font-weight: bold;
  margin-bottom: 30px;
}

.organigrama {
  position: relative;
  max-width: 100%;
  height: auto;
  aspect-ratio: 6 / 5;
  margin: 0 auto;
}

/* Nodos */
.nodo, .nodo-central {
  position: absolute;
  background: #e6f0fc;
  border: 2px solid #99c2ff;
  border-radius: 50%;
  padding: 10px;
  width: 28vw;
  height: 14vw;
  max-width: 200px;
  max-height: 100px;
  min-width: 100px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
  font-size: 0.9rem;
}

.nodo-central {
  background: #cce0ff;
  border: 3px solid #6699ff;
  width: 14vw;
  height: 14vw;
  max-width: 100px;
  max-height: 100px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Posiciones relativas */
#biblioteca {
  top: 10%;
  left: 20%;
}

#servicios {
  top: 10%;
  left: 70%;
}

#idiomas {
  top: 40%;
  left: 5%;
}

#optica {
  top: 40%;
  left: 80%;
}

#optomecatronica {
  top: 70%;
  left: 20%;
}

#vinculacion {
  top: 70%;
  left: 70%;
}

/* Responsive ajustes adicionales */
@media (max-width: 600px) {
  .nodo, .nodo-central {
    font-size: 0.50rem;
    padding: 4px;
  }

  .titulo-organigrama {
    font-size: 20px;
  }
  
#optomecatronica {
    top: 70%;
    left: 5%;
}

#idiomas {
    top: 35%;
    left: 0%;
}
#biblioteca {
    top: 5%;
    left: 20%;
}
.nodo-central {
    background: #cce0ff;
    border: 3px solid #6699ff;
    width: 14vw;
    height: 14vw;
    max-width: 100px;
    max-height: 100px;
    top: 50%;
    left: 57%;
    transform: translate(-50%, -50%);
    z-index: 1;
}
#optica {
    top: 40%;
    left: 75%;
}
#vinculacion {
    top: 70%;
    left: 55%;
}

}


/* video practicas*/

.video-container video {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 8px;
}

/* modal*/

/* TARJETAS */
.departamento {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
}
.departamento:hover {
  transform: scale(1.03);
}
.departamento img {
  width: 100%;
  height: auto;
  display: block;
}
.departamento h5 {
  margin: 0;
  padding: 10px;
  background: #f7f7f7;
  font-size: 16px;
}

/* CONTENEDOR TARJETAS RESPONSIVE */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.row .departamento {
  flex: 1 1 calc(25% - 20px);
  max-width: calc(25% - 20px);
}

/* TABLET: 2 columnas */
@media (max-width: 768px) {
  .row .departamento {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

/* CELULAR: 1 columna */
@media (max-width: 480px) {
  .row .departamento {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* MODAL */
.modal-global-overlay {
  display: none;
  position: fixed;
}
.modal-global-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.modal-global-window {
  background: #fff;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-global-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
/* Fondo oscuro que cubre toda la pantalla */
.modal-global-overlay {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
}

/* Contenedor del contenido del modal */
.modal-global-window {
  background-color: #fff;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  padding: 20px;
  border-radius: 10px;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
}

/* Botón de cerrar */
.modal-global-close {
  position: sticky;
  top: 0;
  right: 0;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  float: right;
  cursor: pointer;
  z-index: 10;
  background: #fff;
  padding: 5px 10px;
  border-radius: 5px;
}

.modal-global-close:hover {
  color: red;
}

/* Contenido dinámico */
#modal-global-content h2 {
  margin-top: 0;
  font-size: 22px;
  color: #8B5C1F;
}

#modal-global-content p {
  font-size: 16px;
  line-height: 1.5;
}

/* Móvil */
@media (max-width: 600px) {
  .modal-global-window {
    padding: 15px;
    font-size: 14px;
  }

  .modal-global-close {
    font-size: 24px;
  }

  #modal-global-content p {
    font-size: 14px;
  }
}

.modal-global-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-global-window {
  background: #fff;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-global-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
/* imagenes lab adrian*/
.image-row {
  display: flex;
  justify-content: center;
  gap: 20px; /* espacio entre imágenes */
  flex-wrap: wrap; /* que baje a otra línea en móviles */
  padding: 20px;
}

.image-row img {
  width: calc(25% - 15px); /* 4 imágenes por fila con margen */
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.image-row img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Responsive: en pantallas más pequeñas, menos imágenes por fila */

@media (max-width: 900px) {
  .image-row img {
    width: calc(50% - 15px); /* 2 por fila */
  }
}

@media (max-width: 480px) {
  .image-row img {
    width: 100%; /* 1 por fila */
  }
}
/* biblioteca*/
.bloque-img-texto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex-wrap: wrap;
}

.bloque-img-texto .texto {
  flex: 1 1 50%;
  font-family: Arial, sans-serif;
}

.bloque-img-texto .texto h2 {
  color: #8B5C1F;
  font-size: 28px;
  margin-bottom: 15px;
}

.bloque-img-texto .texto p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.bloque-img-texto .imagen {
  flex: 1 1 40%;
}

.bloque-img-texto .imagen img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .bloque-img-texto {
    flex-direction: column;
    text-align: center;
  }

  .bloque-img-texto .texto,
  .bloque-img-texto .imagen {
    flex: 1 1 100%;
  }

  .bloque-img-texto .texto h2 {
    font-size: 24px;
  }

  .bloque-img-texto .texto p {
    font-size: 15px;
  }
}
