/* Estilos generales */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  flex-direction: column;
  font-size: 18px;
}

.main-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === HEADER === */

/* Header container */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 10px 30px;
  flex-wrap: nowrap; /* Prevent wrapping unless screen is very small */
  border-bottom: 1px solid #e0e0e0;
}

/* Section wrappers */
.header-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Specific alignment */
.header-left {
  justify-content: flex-start;
}

.header-center {
  justify-content: center;
}

.header-right {
  justify-content: flex-end;
}

/* Logo image styling */
.logo {
  max-height: 70px;
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Sidebar Layout */
.sidebar-layout {
  display: flex;
  width: 90%;
  max-width: 2000px;
  margin: 20px auto;
  gap: 20px;
  align-items: flex-start;
}

.sidebar-layout.hidden {
  display: none;
}

.sidebar {
  flex: 0 0 auto;
  background-color: white;
  max-width: fit-content; /* Ajustar al contenido */
  border-left: 4px solid #002a5a;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
}

.content-area {
  min-width: 0;
  flex-grow: 1;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 25px 25px;
}

.welcome-content {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Accordion Header Styles */
.accordion-header {
  padding: 10px 3em 5px 5px;
  margin: 10px 0;
  font-size: 0.9rem; /* Más pequeño */
  background-color: transparent;  /* Fondo neutro por defecto */
  color: #000;                    /* Texto negro */
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s;
  font-weight: 300;               /* Letra más fina */
  word-wrap: break-word; /* Permitir partir las palabras */
  white-space: normal;   /* Permitir saltos de línea */
}

/* Eliminar el hover azul */
.accordion-header:hover {
  background-color: #f0f0f0;     /* Suave gris al pasar el ratón (opcional) */
}

/* Activo: azul oscuro y texto blanco */
.accordion-header.active {
  background-color: #002a5a;
  color: white;
  position: relative;
  
}

.accordion-header.active::after {
  content: "→";
  position: absolute;
  right: 15px;
}

/* Content Area Styles */
.welcome-content {
  display: block;
}

.accordion-content {
  display: none;
  padding: 15px 0px 15px 0px;
  width: 100%;
  max-width: 100%;
}

.accordion-content.active {
  display: block;
}

/* Hide welcome content when any accordion is active */
.content-area:has(.accordion-content.active) .welcome-content {
  display: none;
}

/* Estilo imagenes */
.centrar-imagen {
  display: block;
  margin: 0 auto;
}

.text-image-pair {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.text-image-pair.reverse {
  flex-direction: row-reverse;
}

.text-image-pair .text {
  flex: 1;
}

.text-image-pair .image {
  flex-shrink: 0;
}

.text-image-pair img {
  max-width: 150px;
  height: auto;
  border-radius: 4px;
}

/* Activity headers style */
.accordion-content h3 {
  margin-top: 1em;
  color: #003366;
  text-align: center;
  font-size: 26px;
}

/* Contenedor general para formulario + mapa */

.contact-location {
  max-width: none;
  margin: 0 auto;
  width: 100%;
}

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  margin-top: 20px;
}

/* Contenedores formulario y mapa */
.form-wrapper,
.map-wrapper {
  flex: 1 1 45%;
  max-width: 45%;
}

/* Mapa */
.map-wrapper {
  margin-top: 0; /* Ya el margin-top lo tiene contact-layout */
  text-align: left;
}

.map-wrapper iframe {
  width: 100%;
  height: 300px;
  display: block;
  margin: 0 auto 15px auto;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Mapa texto dentro del map-wrapper */
.map-text-container {
  display: block;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.85rem;
  line-height: 1.2;
}

.map-text-left,
.map-text-right {
  flex: 1 1 300px;
}

.map-text-left p,
.map-text-right p {
  margin: 0;
}

/* Formulario estilos - Inputs, textarea y espaciados */
.contact-form label:not(.checkbox-label) {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Comentarios con altura fija más grande */
.contact-form textarea {
  min-height: 60px;
  resize: vertical;
}

/* Botón Enviar */
.contact-form button {
  background-color: #003876;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #002a5a;
}

.checkbox-container {
  width: 100%;
  margin-bottom: 20px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  accent-color: #003876; /* color nativo en navegadores modernos */
  cursor: pointer;
}

.checkbox-label span {
  flex: 1;
  font-size: 0.9rem;
  font-weight: lighter;
}

/* pop-up */
.popup {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #666;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  max-width: 90%;
  width: 300px;
  text-align: center;
}

.popup.hidden {
  display: none;
}

.contenedor-imagenes-horizontales {
  display: flex;
  justify-content: center; /* Centra horizontalmente */
  align-items: center;     /* Alinea verticalmente si hay diferencias de tamaño */
  gap: 20px;               /* Espacio entre imágenes */
  margin-top: 10px;        /* Separación del texto */
  flex-wrap: wrap;         /* Para que se adapten en móviles */
}

/* Footer */ 
footer {
  background-color: #003876;
  color: white;
  padding: 15px 0;
  text-align: center;
  font-size: 18px;
  box-sizing: border-box;
  width: 100%;
  /* NO usar position sticky ni fixed */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  text-align: center;
  font-size: 18px;
}

footer a {
  color: white;
  text-decoration: none;
  margin: 0 8px;
}

footer a:hover {
  text-decoration: underline;
}

/* Estilo de tablas */
table {
  width: 100%;
  margin: 20px auto;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: center;
  border: 1px solid #ddd;
}

th {
  background-color: #aac6e5;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

tr:hover {
  background-color: #e0e7f1;
}

td {
  background-color: #fff;
}

/* Enlaces */
a {
  color: #003876;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Estilo de la política de privacidad */
.policy-container {
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  padding: 30px 40px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  font-family: Arial, sans-serif;
}

.policy-container h1,
.policy-container h2 {
  margin-top: 1em;
  color: #003366;
  font-size: 26px;
}

.policy-container h3 {
  margin-top: 1em;
  line-height: 1.3;
  margin-top: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EEEEEE;
  margin-bottom: 15px;
  font-size: 18px;
}

.policy-container p {
  line-height: 1.6;
}

/* Estilo de la política de cookies */
.accordion-content button {
  display: block;
  margin: 24px auto 0;
  background-color: #003876;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.accordion-content button:hover {
  background-color: #002a5a;
}


/* Responsive Design */
@media (max-width: 768px) {
  /* Header */
  header {
    flex-direction: column;
    text-align: center;
  }

  .header-section {
    justify-content: center;
    margin: 10px 0;
  }

  .logo {
    max-height: 60px;
  }

  .accordion-header {
    font-size: 0.95rem;
    text-align: left;
  }

  .sidebar {
    width: 100%;
    flex: 0 0 auto;
    max-width: 100%;
    border-left: none;
    border-top: 4px solid #002a5a;
  }

  .sidebar-layout {
    flex-direction: column;
  }
  
  .content-area {
    min-height: auto;
  }
  
  .text-image-pair, .text-image-pair.reverse {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .text-image-pair, .text {
    text-align: justify;
  }
    .contact-layout {
    flex-direction: column;
  }

  .form-wrapper,
  .map-wrapper {
    width: 100%;
  }
}