/* ====== VARIABLES BÁSICAS ====== */
:root {
  --color-principal: #000;
  --color-texto: #333;
  --fondo-base: #fafafa;
  --fondo-claro: #f0f0f0;
  --borde-claro: #e0e0e0;
  --acento: #e91e63;
}

/* ====== RESET Y BASE ====== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Raleway", Arial, sans-serif;
  background: --fondo-base, #fafafa; /* fallback por seguridad */
  background: var(--fondo-base);
  color: var(--color-texto);
}

.contenedor-principal {
  max-width: 1500px;
  margin: auto;
  padding: 0 15px;
}

/* ====== ENCABEZADO ====== */
.encabezado {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  flex-direction: column;
  font-size: 1.5rem;
  background: #fff;
  padding: 4px 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fila-superior {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 40px;
  position: relative;
}

.logo { font-size: 2.5rem; font-weight: bold; }

.logo, .enlace-menu, .boton-volver-arriba {
  text-decoration: none;
  color: var(--color-principal);
  padding: 8px 16px;
  border: 1px solid transparent;
}
.logo:hover, .enlace-menu:hover, .boton-volver-arriba:hover { border-color: var(--color-principal); }

.encabezado nav {
  display: flex;
  justify-content: flex-end;
  padding-right: 36px;
}

/* Redes sociales */
.redes-sociales { 
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 10px;
  }
.redes-sociales a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  color: var(--color-principal);
  gap: 10px;
}
.redes-sociales svg { width: 24px; height: 24px; }
.redes-sociales a:hover { opacity: 0.7; }

/* ====== GALERÍA ====== */
.galeria {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}
.columna {
  flex: 50%;
  padding: 0 8px;
}
.columna img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 16px;
  border-radius: 4px;
}

/* ====== PIE DE PÁGINA ====== */
.pie-pagina {
  background: var(--fondo-claro);
  text-align: center;
  padding: 48px 20px;
}
.imagen-perfil {
  display: block;
  margin: 24px auto;
  max-width: 150px;
  height: auto;
  border-radius: 50%;
}
.texto-destacado {
  font-size: 1.2rem;
  color: var(--acento);
  margin-top: 16px;
}

/* ====== BANNER INFERIOR EN CONSTRUCCIÓN ====== */
/* Restaurado a caja gris sólida con proporciones y estilo originales */
.banner-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--fondo-claro);
  border: 1px solid var(--borde-claro);
  color: var(--color-texto);
  padding: 30px 20px;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.icono-animado { position: relative; width: 80px; height: 80px; }
.gear { position: absolute; top: 0; left: 0; }
.gear.grande { width: 80px; height: 80px; animation: girar 6s linear infinite; }
.gear.pequena { width: 40px; height: 40px; top: 20px; left: 20px; animation: girar-inverso 4s linear infinite; }

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes girar-inverso { to { transform: rotate(-360deg); } }

.banner-info .texto h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: bold;
}
.banner-info .texto p {
  margin: 5px 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ====== COPYRIGHT Y CRÉDITOS ====== */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
  background: var(--fondo-claro);
  font-size: 0.9rem;
  color: #555;
  margin-top: 100px;
}
.footer-bottom .creditos {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-bottom .creditos a { color: inherit; text-decoration: none; font-weight: bold; }
.footer-bottom .creditos a:hover { text-decoration: underline; }

/* ====== BOTÓN VOLVER ARRIBA ====== */
.boton-volver-arriba {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.3s, background 0.3s, transform 0.3s;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-decoration: none;
}
.boton-volver-arriba:hover { opacity: 1; transform: translateY(-2px); }

/* ====== MODAL CUADRO ====== */
.modal-cuadro-contenido {
  position: relative;
  display: flex;
  gap: 20px;
  width: 90vw;
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cuadro { cursor: pointer; transition: transform 0.2s ease; }
.cuadro:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.modal-cuadro-izquierda {
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-cuadro-izquierda img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.modal-cuadro-derecha {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 80vh;
  padding-right: 10px;
}
.modal-cuadro-derecha h2 { margin-top: 0; font-size: 2rem; }
.modal-cuadro-derecha p { line-height: 1.5; font-size: 1.1rem; }

/* ====== MODAL DEL FORMULARIO ====== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
}
.modal-contenido {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: aparecer 200ms ease-out;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-header {
  position: relative; /* referencia para contenidos internos */
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}
.modal-header h2 { margin: 0; font-size: 1.2rem; }

/* ====== BOTONES CERRAR MODAL (ARREGLADO) ====== */
/* Caso 1: botón dentro del header → va a la derecha */
.modal-header .cerrar {
  position: static;
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.modal-header .cerrar:hover { color: var(--color-principal); }

/* Caso 2: botón como hijo directo del contenedor → esquina superior derecha del modal */
.modal-contenido > .cerrar,
.modal-cuadro-contenido > .cerrar {
  position: absolute;
  top: 10px; right: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  z-index: 10;
}
.modal-contenido > .cerrar:hover,
.modal-cuadro-contenido > .cerrar:hover { color: var(--color-principal); }

/* Cuerpo del modal de formulario */
.modal-cuerpo { overflow-y: auto; padding-top: 10px; flex: 1; }

/* ====== FORMULARIO ====== */
.formulario-contacto { margin-top: 20px; }
.grupo-campo { margin-bottom: 15px; text-align: left; }
.modal-contenido label:not(.checkbox-terminos) {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}
.modal-contenido input:not([type="checkbox"]),
.modal-contenido select,
.modal-contenido textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.modal-contenido textarea { min-height: 100px; resize: vertical; }
.boton-enviar {
  background: #333;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 4px;
  width: 100%;
  cursor: pointer;
  font-size: 15px;
}
.boton-enviar:hover { background: #555; }

/* ====== CHECKBOX TÉRMINOS ====== */
.checkbox-terminos {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: normal;
  width: fit-content;
  max-width: 100%;
}
.checkbox-terminos span { display: inline; }
.checkbox-terminos input[type="checkbox"] {
  margin-top: 3px;
  margin-right: 8px;
  flex-shrink: 0;
}
.checkbox-terminos a { color: var(--acento); text-decoration: none; }
.checkbox-terminos a:hover { text-decoration: underline; }

/* ====== RESPONSIVE ====== */
/* Tablets */
@media (max-width: 1024px) {
  .contenedor-principal { padding: 0 15px; }
  .columna { flex: 100%; }
  .encabezado nav {
    padding-right: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .logo { font-size: 2rem; text-align: center; width: 100%; }
}

/* Móviles grandes */
@media (max-width: 768px) {
  .fila-superior { flex-direction: column; align-items: center; gap: 10px; }
  .encabezado { font-size: 1.2rem; padding: 8px; }
  .redes-sociales { padding-right: 0; }

  /* Logo a la izquierda cuando se necesite distribución horizontal */
  .fila-superior { flex-wrap: nowrap; justify-content: space-between; }
  .logo { margin-right: auto; padding-left: 8px; }
  .encabezado nav, .redes-sociales { padding-right: 8px; }

  /* Galería en una columna */
  .columna { flex: 100%; padding: 0; }

  /* Banner en columna */
  .banner-info { flex-direction: column; gap: 10px; padding: 20px; }
  .icono-animado, .gear.grande { width: 60px; height: 60px; }
  .gear.pequena { width: 30px; height: 30px; top: 15px; left: 15px; }

  /* Modal cuadros: columna y scroll correcto */
  .modal-cuadro-contenido {
    flex-direction: column;
    width: 95vw;
    max-height: calc(100vh - 20px);
    margin: 10px auto;
  }
  .modal-cuadro-izquierda, .modal-cuadro-derecha {
    flex: none; width: 100%; max-height: none;
  }
  .modal-cuadro-izquierda img { max-height: 60vh; }
  .modal-cuadro-derecha { max-height: none; overflow-y: visible; }

  /* Evitar scroll lateral en móvil */
  html, body { overflow-x: hidden; }
}

.seccion-noticias {
  padding: 40px 20px;
  background: #fff;
  color: #333;
}

.seccion-noticias h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

.tarjeta-noticia {
  display: flex;
  gap: 20px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.tarjeta-noticia img {
  width: 300px;
  max-width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.contenido-noticia {
  flex: 1;
  min-width: 250px;
}

.contenido-noticia h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #e91e63;
}

.contenido-noticia p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.contenido-noticia a {
  color: #e91e63;
  text-decoration: none;
  font-weight: bold;
}

.contenido-noticia a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .tarjeta-noticia {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contenido-noticia h3 {
    font-size: 1.3rem;
  }

  .contenido-noticia p {
    font-size: 0.95rem;
  }
}


/* Móviles pequeños */
@media (max-width: 480px) {
  .logo { font-size: 1.8rem; padding: 4px 8px; }
  .encabezado nav { font-size: 1rem; }
  .redes-sociales svg { width: 20px; height: 20px; }

  .pie-pagina { padding: 32px 15px; }
  .texto-destacado { font-size: 1rem; }

  .banner-info .texto h2 { font-size: 1.2rem; }
  .banner-info .texto p { font-size: 1rem; }

  .modal-contenido { padding: 15px; width: 95%; }

  .boton-volver-arriba {
    padding: 8px 12px;
    font-size: 12px;
    bottom: 15px; right: 15px;
  }

  .checkbox-terminos { flex-direction: column; gap: 4px; }
}

/* Botón hamburguesa */
.menu-hamburguesa {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1100;
}

#abrir-menu {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-principal);
  cursor: pointer;
}

/* Menú hamburguesa */
.menu-hamburguesa {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
}

#abrir-menu {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-principal);
  cursor: pointer;
}


.boton-menu {
  position: fixed;
  top: 40px;
  left: 20px;
  background: none;
  border: none;
  color: var(--color-principal);
  cursor: pointer;
  z-index: 1100;
}

#menu-lateral {
  position: fixed;
  top: 80;
  left: -220px; 
  width: 200px;
  background-color: white;
  box-shadow: 2px 0 6px rgba(0,0,0,0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  transition: left 0.3s ease;
  z-index: 1000;
}

#menu-lateral a {
  color: var(--color-principal);
  text-decoration: none;
  font-size: 16px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

#menu-lateral a:last-child {
  border-bottom: none;
}

#menu-lateral a:hover {
  background-color: #f9f9f9;
  border-radius: 4px;
}

#menu-lateral.activo {
  left: 0;
}





