/* Estilos específicos para la página de contacto (contacto.php) */



/* Contenedor principal - Desktop: fixed content box with internal scroll where needed */
.content-box {
  position: fixed;
  top: 6.5rem;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 96vw;
  max-width: 1600px;
  border: 2px solid #ffffff;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
  overflow: hidden;
  /* Desktop default */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
}

.page-title {
  text-align: center;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Sections Container */
.sections-container {
  display: flex;
  gap: 2rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sección izquierda (Formulario/Info) - Scroll interno */
.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  overflow-y: auto;
  /* Internal scroll */
  padding-right: 1rem;
  height: 100%;
}

.left-section::-webkit-scrollbar {
  width: 6px;
}

.left-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.left-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
}

.contact-text {
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 0.5rem;
}

.section-divider {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding: 1rem 0;
  margin: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-info,
.social-links,
.contact-form {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.contact-form {
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  /* Asegurar que el formulario no se salga */
  overflow: hidden;
  /* Prevenir overflow */
}

.social-links {
  flex-direction: row;
  justify-content: center;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.3s;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  /* Permitir que se encoja */
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.contact-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  /* El icono no se encoge */
}

.contact-item span {
  flex: 1;
  min-width: 0;
  /* Permitir que el span se encoja */
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Permitir que las palabras largas se dividan */
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Asegurar que el correo largo se ajuste */
  display: inline-block;
  max-width: 100%;
}

.social-link {
  width: 45px;
  height: 45px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  /* Asegurar que el box-sizing se aplique */
}

.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  /* Asegurar que no se salga */
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
  /* Incluir padding y border en el ancho */
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ffffff;
}

.submit-btn {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  align-self: center;
  width: 100%;
  max-width: 300px;
}

.submit-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* Sección derecha (Imagen) */
.right-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  height: 100%;
  overflow: hidden;
}

.content-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(100%);
}

/* Responsive */
@media (max-width: 968px) {
  .content-box {
    position: fixed;
    top: 7rem;
    bottom: 2rem;
    width: 95vw;
    height: auto;
    padding: 2rem;
    overflow-y: auto;
    /* Full page scroll */
    display: block;
  }

  .sections-container {
    flex-direction: column-reverse;
    /* Put image on top or bottom? usually top or default. keeping default column */
    flex-direction: column;
    height: auto;
    gap: 2rem;
    overflow: visible;
  }

  .left-section {
    flex: none;
    height: auto;
    width: 100%;
    overflow: visible;
    padding-right: 0;
  }

  .right-section {
    flex: none;
    height: 400px;
    /* Fixed height for image on tablet */
    width: 100%;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .content-box {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: calc(100vw - 2rem) !important;
    max-width: none !important;
    margin: 4.5rem 1rem 1rem 1rem !important;
    /* Margen superior: altura del header (~3.5rem) + margen (1rem) = 4.5rem para estar más cerca del header */
    padding: 1.5rem !important;
    border: 2px solid #ffffff !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    gap: 1rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* Permitir scroll dentro de la sección */
    max-height: calc(100vh - 6.5rem) !important;
    /* Altura máxima para permitir scroll dentro */
  }

  .page-title {
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
  }

  .sections-container {
    padding: 0 !important;
    gap: 1.5rem;
    margin-bottom: 0 !important;
  }

  .sections-container > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .contact-form,
  .contact-info,
  .social-links {
    margin-bottom: 0 !important;
  }

  .right-section {
    height: 300px;
  }


}