/* RESET */
* { margin:0; padding:0; box-sizing:border-box; font-family: Arial, sans-serif; }
body { line-height:1.6; color:#333; background:#f5f5f5; }

/* HEADER */
#site-header {
  position: fixed;
  top:0; left:0;
  width:100%; height:70px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 30px;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}

#site-header .brand { display:flex; align-items:center; gap:10px; }
#logo { height:60px; border-radius: 15px; }
#site-header .brand h1 {
  color:#fff;
  font-size:1.5rem;
  z-index:1001;
}

#nav-links { display:flex; gap:20px; }
#nav-links a { color:#fff; text-decoration:none; font-weight:bold; }
#nav-links a:hover { color:#ffd08a; }

#menu-toggle { display:none; font-size:28px; background:none; border:none; color:#fff; cursor:pointer; }

/* HERO SLIDER */
#hero {
  position: relative;
  height: 80vh;
  overflow: hidden;
}

#hero .overlay {
  position:absolute; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.4); z-index:1;
}

.slider {
  position:absolute; top:0; left:0; width:100%; height:100%;
}

.slide {
  position:absolute; top:0; left:0; width:100%; height:100%;
  object-fit:cover; opacity:0; transition:opacity 1s ease-in-out;
}

.slide.active { opacity:1; }

.hero-text {
  position: relative;
  z-index:2;
  color:#fff;
  text-align:center;
  display:flex; flex-direction:column; justify-content:center;
  height:100%;
}

/* FLECHAS DEL SLIDER */
#hero .prev, #hero .next {
  position: absolute;
  top:50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color:#fff;
  border:none;
  font-size:2rem;
  padding:10px;
  cursor:pointer;
  border-radius:50%;
  z-index:3;
}

#hero .prev { left:20px; }
#hero .next { right:20px; }

#hero .prev:hover, #hero .next:hover { background: rgba(0,0,0,0.8); }

/* INDICADORES */
#hero .indicators {
  position:absolute;
  bottom:20px; left:50%;
  transform: translateX(-50%);
  display:flex;
  gap:10px;
  z-index:3;
}

#hero .dot {
  width:12px; height:12px;
  background: rgba(255,255,255,0.6);
  border-radius:50%;
  cursor:pointer;
}

#hero .dot.active { background:#fff; }

/* SECCIONES GENERALES */
section { padding:80px 20px 40px; }
section h2, section p { text-align:center; margin-bottom:20px; }

.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap:20px; margin-top:20px; }
.card-general { background:#fff; border-radius:8px; padding:20px; box-shadow:0 2px 8px rgba(0,0,0,0.15); text-align:center; }
.card-general img { width:100%; height:auto; border-radius:8px; margin-top:10px; }

/* FOOTER */
footer { background:#222; color:#fff; text-align:center; padding:20px; }

/* RESPONSIVE HEADER */
@media(max-width:992px){
  #menu-toggle { display:block; }
  #nav-links { display:none; flex-direction:column; position:absolute; top:70px; left:0; width:100%; background:rgba(0,0,0,0.9); padding:10px 0; z-index:999; }
  #nav-links.show { display:flex; }
  #nav-links a { padding:10px 20px; display:block; }
}

@media(max-width:600px){
  #hero h2 { font-size:1.5rem; }
  #hero p { font-size:1rem; }
  #site-header { padding:0 15px; }
  .card-general { padding:15px; }
}

/* Sección Servicios */
/* Sección servicios */
.servicios-container {
  display: flex !important;
  justify-content: center !important;
  gap: 50px !important;
  flex-wrap: wrap !important;
}

.servicio-card {
  flex: 0 1 30% !important;  /* tres por fila */
  max-width: 350px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.servicio-card img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 10px;
  margin-bottom: 15px;
}

@media (max-width: 900px) { .servicio-card { flex: 0 1 45% !important; } }
@media (max-width: 600px) { .servicio-card { flex: 0 1 100% !important; } }

/* QUIÉNES SOMOS */
.quienes-somos {
  padding: 60px 20px;
  background: #f9f9f9;
}

.quienes-somos .contenedor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap; /* importante para que se adapte en móvil */
}

.qs-img img {
  width: 100%;
  max-width: 450px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
}

.qs-texto {
  flex: 1;
  min-width: 280px;
}

.qs-texto h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #333;
}

.qs-texto p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

/* Versión responsive para móviles */
@media (max-width: 768px) {
  .quienes-somos .contenedor {
    flex-direction: column;
    text-align: center;
  }
  
  .qs-img img {
    max-width: 90%;
  }
}


/* ===== MISIÓN & VISIÓN (con CSS Grid) ===== */
.mision-vision {
  padding: 50px 20px;
  background: #fff;
}

.mision-vision .bloque {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  grid-template-areas: "img texto";
  gap: 30px;
  align-items: center;
  margin-bottom: 40px;
}

.mision-vision .bloque img {
  grid-area: img;
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  
}

.mision-vision .bloque .texto {
  grid-area: texto;
  max-width: 600px;
  color: #555;
}

.mision-vision .bloque .texto {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #333;
}


/* Alterna (imagen derecha, texto izquierda) */
.mision-vision .bloque.reverse {
  grid-template-areas: "texto img";
}

/* Responsive: apila en móvil */
@media (max-width: 768px) {
  .mision-vision .bloque {
    grid-template-columns: 1fr;
    grid-template-areas:
      "texto"
      "img";
    text-align: center;
  }
  .mision-vision .bloque .texto { max-width: 100%; }
}


.mv-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto;
  flex-wrap: wrap;
}

.mv-row.mv-reverse { flex-direction: row-reverse; }

.mv-img, .mv-text {
  flex: 1 1 45%; /* Se adapta según espacio disponible */
  min-width: 280px; /* Evita que desaparezca en móviles muy pequeños */
}

.mv-img img {
  width: 100%;  /* Se ajusta al contenedor */
  height: auto;
  border-radius: 10px;
  display: block;
}



/* MÓVIL */
@media (max-width: 768px) {
  .mv-row, .mv-row.mv-reverse {
    flex-direction: column !important; /* fuerza columna */
    text-align: center;
  }
  .mv-img, .mv-text { width: 100% !important; }
  .mv-text { margin-top: 15px; }
}




.proyectos {
  padding: 60px 20px;
  text-align: center;
  background: #f5f5f5;
}

.proyectos h2 {
  font-size: 2em;
  margin-bottom: 40px;
}

.proyectos-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.proyecto-card {
  flex: 0 1 30%;
  max-width: 350px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.proyecto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.proyecto-card:hover {
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 900px) {
  .proyecto-card { flex: 0 1 45%; }
}

@media (max-width: 600px) {
  .proyecto-card { flex: 0 1 100%; }
}

.proyectos-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
}

.proyecto-card {
  flex: 0 1 30%;
  max-width: 350px;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.proyecto-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.proyecto-card:hover {
  transform: translateY(-5px);
}


/* Contenedor de proyectos */
.proyectos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.proyecto-card {
  flex: 0 1 30%;
  max-width: 350px;
  text-align: center;
  cursor: pointer;
}

.proyecto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s;
}

.proyecto-card img:hover {
  transform: scale(1.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

#modal-caption {
  text-align: center;
  color: #fff;
  padding: 10px 0;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

#prev, #next {
  position: absolute;
  top: 50%;
  color: #fff;
  font-size: 2rem;
  padding: 10px;
  background: rgba(0,0,0,0.5);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transform: translateY(-50%);
}

#prev { left: 20px; }
#next { right: 20px; }

#prev:hover, #next:hover { background: rgba(0,0,0,0.8); }

/* Responsive */
@media(max-width: 900px) {
  .proyecto-card { flex: 0 1 45%; }
}

@media(max-width: 600px) {
  .proyecto-card { flex: 0 1 100%; }
}

/* Contenedor de contacto */
.contacto-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Tarjetas individuales */
.contacto-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  flex: 0 1 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contacto-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
}

/* Efecto hover */
.contacto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Texto dentro de la tarjeta */
.contacto-card p {
  font-size: 1rem;
  color: #333;
  margin: 0;
}

/* Responsive: Tablet y móvil */
@media (max-width: 900px) {
  .contacto-card {
    flex: 0 1 45%;
  }
}

@media (max-width: 600px) {
  .contacto-card {
    flex: 0 1 100%;
  }
}



.redes-sociales {
  position: fixed;
  top: 55%;
  left: 20px; /* <-- aquí aumentamos la separación (antes suele estar en 5px o 10px) */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px; /* separa los iconos entre sí */
  z-index: 1000;
}

.redes-sociales img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
  border-radius: 50px;
}

.redes-sociales img:hover {
  transform: scale(1.1);
}

/* Menú normal (desktop) */
#nav-links {
  display: flex; /* Desktop siempre visible */
  gap: 20px;
  background: transparent; /* Fondo transparente */
}

/* Menú hamburguesa (solo para móviles) */
@media(max-width: 992px) {
  #nav-links {
    display: none; /* Se oculta inicialmente en móvil */
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5); /* fondo semi-transparente */
    padding: 10px 0;
    z-index: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }

  #nav-links.show {
    display: flex;
    opacity: 1;
    pointer-events: all;
  }

  #menu-toggle {
    display: block; /* mostrar hamburguesa en móvil */
  }
}

/* Desktop: ocultar botón hamburguesa */
@media(min-width: 993px) {
  #menu-toggle {
    display: none;
  }
}
