*, *::before, *::after {
    box-sizing: border-box;
}

/* Reset básico */
body {
    font-family: 'Raleway', sans-serif;
  color: #111;
  line-height: 1.6;
  font-weight: 400;
  padding-inline: clamp(12px, 3vw, 32px);
}

/* Layout general */
.container {
  max-width: 1400px;  /* más ancho que antes */
  width: 90%;         /* ocupa casi toda la pantalla */
  margin: 0 auto;     /* centrado */
}


.map-container {
  display: flex;
  max-width: 1400px;
  width: 90%;
  margin: 0 auto;
  overflow: hidden;
  margin-bottom: 1rem;

  /* Altura fluida: pantalla grande → ocupa casi todo el viewport */
  height: calc(70vh); /* altura inicial para pantallas grandes */
}

/* Mapa */
#map {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;     /* ya no absolute */
}


.main-content {
  flex: 1;
  height: 70vh; 
  
  display: flex;          /* lado a lado */
  max-width: 1400px;      /* ancho máximo de la sección */
  width: 90%;
  margin: 0 auto;
  gap: 20px;              /* espacio entre sidebar y mapa */

}






.sidebar {
    flex: 0 0 280px;    /* ligeramente más ancha */
    max-width: 280px;
    min-width: 220px;
    background-color: #fff;
    padding: 0 10px 0 0;
    overflow-y: auto;
    margin-top: 0px;
}





.sidebar-heading {
  margin-top: 0;
}

.sidebar > *:first-child {
  margin-top: 0;
}
.sidebar a:first-of-type {
  margin-top: 0;
}

/* Header */
header {
  border-bottom: 1px solid #ddd;
  margin-bottom: 0.5rem;
  margin-top: 12px;
}

.header-top {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  
}

.site-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  line-height: 1.1;     /* 👈 reduce espacio fantasma */
  margin: 0;
  padding: 0;
}


.logo {
  width: 48px;
  height: 48px;
  background: #000;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 1.9rem;

  line-height: 1;
  display: flex;
  
  align-items:flex-end;
  justify-content: center;

  text-decoration: none;

  /* animación al cargar */
  opacity: 0;
  transform: scale(0.9);
  animation: logoAppear 0.8s ease-out forwards;

  /* hover suave */
  transition: transform 0.5s ease;
}





@keyframes logoAppear {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.logo:hover {
 transform: scale(1.05) rotate(-2deg);
}

a {
  color: rgb(34, 63, 27);     /* verde oscuro casi negro */
  text-decoration: none;
  text-decoration: underline;
}

a:hover {
background-color: #DAFF8B ; 
color: rgb(34, 63, 27);

transform: scale(1.1); /* Aumenta el tamaño ligeramente */
}


/* Títulos */
.site-title {
  font-family: 'Bitter', serif;
  font-size: 1.6rem;
  margin: 0;
}

.site-subtitle {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  font-size: 0.95rem;
}

nav a {
  font-family: 'Bitter', serif;
  text-decoration: none;
  color: #111;
  margin-right: 1rem;
}


.lang-switch a {
  margin-left: 0.5rem;
}

/* Contenido */
main h2,
main h3 {
  font-family: 'Bitter', serif;
  margin-top: 1.5rem;
}
  
.sidebar-button {
    display: flex;
    word-wrap: break-word;
    justify-content: center; /* Centra el texto horizontalmente */
    align-items: center; /* Centra el texto verticalmente */
    height: auto; /* Permite que los botones sean más altos si el texto ocupa más de una línea */
    font-size: 0.9rem; /* Reduce ligeramente el tamaño del texto para pantallas pequeñas */
    border-radius: 5px !important;
}
  
.text-wrap {
  word-wrap: break-word; /* Asegura que el texto se ajuste a varias líneas si es necesario */
}

.sidebar-button:hover {
background-color: #DAFF8B ; /* Color de fondo al pasar el cursor */
color: rgb(34, 63, 27); /* Cambia el color del texto al pasar el cursor */

} 


.btn.active {
background-color: #a6c5a7;
color: rgb(34, 63, 27);
border: 2px solid transparent;
}


.control-group label {
  font-weight: bold;
  display: block;
}


.sidebar-heading {
padding: 10px;
font-size: 10px; /* Personaliza el tamaño */
font-weight: 400; /* Peso de fuente */
color:#889689; /* Color gris */
opacity: 0.55;
margin-bottom: 5px;
}


 /* los dos que siguen ajustan el margen de los controles  */
.leaflet-control-container {
padding: 15px; /* Ajusta el espacio interno */
}

.leaflet-top.leaflet-left {
      top: 30px;
      left: 5px;
}

.leaflet-draw-actions li {
    list-style-type: none;  /* Elimina el punto o marcador de la lista */
    margin: 0;              /* Elimina el margen del <li> */
    padding: 0;             /* Elimina el relleno del <li> */
}

.leaflet-draw-actions li a {
    list-style-type: none;  /* Elimina el punto o marcador de la lista */
    margin: 0;              /* Elimina el margen del <li> */
    padding: 0;  
    text-decoration: none; /* Quitar subrayado */
    color: #007bff; /* Color del texto */
    font-weight: bold; /* Texto en negrita */
    display: block; /* Hacer que el enlace ocupe todo el área del `<li>` */
}


.leaflet-draw-actions {
    margin-top: 0px;
    padding: 0 !important;   /* Elimina el relleno */
    font-size: 10px;
    cursor: pointer;   
}


/* eliminar texto de los BOTONES DE DIBUJO */  
.leaflet-draw-draw-rectangle .sr-only {
display: none;
}
.leaflet-draw-draw-circle .sr-only {
display: none;
}
.leaflet-draw-draw-polygon .sr-only {
display: none;
}
.leaflet-draw-draw-marker .sr-only {
display: none;
}
.leaflet-draw-draw-polyline .sr-only {
display: none;
}
.leaflet-draw-draw-circlemarker .sr-only {
display: none;
}


              
/* poner svg a los BOTONES DE DIBUJO */ 
.leaflet-draw-draw-rectangle {
    background-image: url('../Observatorio GLP/SVG/square.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 30px;           /* Ajusta el tamaño del botón */
    height: 30px;          /* Ajusta el tamaño del botón */
    text-align: center;    /* Centra el contenido en el contenedor */
}

.leaflet-draw-draw-circle {
    background-image: url('../Observatorio GLP/SVG/circle.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 30px;           /* Ajusta el tamaño del botón */
    height: 30px;          /* Ajusta el tamaño del botón */
                text-align: center;    /* Centra el contenido en el contenedor */
}

.leaflet-draw-draw-polygon {
    background-image: url('../Observatorio GLP/SVG/pentagon.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 30px;           /* Ajusta el tamaño del botón */
    height: 30px;          /* Ajusta el tamaño del botón */
    text-align: center;    /* Centra el contenido en el contenedor */
}

.leaflet-draw-draw-marker {
    background-image: url('../Observatorio GLP/SVG/geo-alt.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 30px;           /* Ajusta el tamaño del botón */
    height: 30px;          /* Ajusta el tamaño del botón */
    text-align: center;    /* Centra el contenido en el contenedor */
}

.leaflet-draw-draw-polyline {
    background-image: url('../Observatorio GLP/SVG/polyline.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 10px;           /* Ajusta el tamaño del botón */
    height: 10px;          /* Ajusta el tamaño del botón */
    background-size: cover; /* Asegura que el icono ocupe todo el contenedor */
    text-align: center;    /* Centra el contenido en el contenedor */
}

.leaflet-draw-draw-circlemarker {
    background-image: url('../Observatorio GLP/SVG/pin.svg');
    display: inline-block; /* Asegura que el elemento sea un bloque en línea */
    width: 10px;           /* Ajusta el tamaño del botón */
    height: 10px;          /* Ajusta el tamaño del botón */
    
    text-align: center;    /* Centra el contenido en el contenedor */
}



.leyenda span {
    margin-top: 5px;
    padding-top: 0px;
    font-family: 'Circular Sdt', sans-serif;
    color: rgb(53, 63, 51);
    font-size: 12px; /* Asegúrate de incluir los textos dentro de las leyendas */
}

.lang {
     display: none;
}


/* Footer */
footer {
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #555;
}

/* Sección general */
.teaching-section {
  margin-bottom: 4rem;
}

/* Franja del carrusel */
.carousel-strip-teaching {
  width: 100%;
  height: 140px;          /* 👈 altura chica tipo banda */
  overflow: hidden;
  margin-top: 2rem;
  position: relative;
}
.carousel-strip-teaching .carousel-track {
  animation: scrollCarousel 25s linear infinite;
  gap: 1rem;
}

.tesis-texto h2 {
  margin-top: 0;
}


.carousel-strip-tesis {
  width:100%;
  height: 500px;          /* 👈 altura chica tipo banda */
  overflow: hidden;
  overflow: hidden;
  position: relative;
}


/* Track animado */
.carousel-track {
  display: flex;
  gap: 0;
  width: max-content;
}

/* SOLO TESIS usa transición */
.carousel-strip-tesis .carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-strip-teaching:hover .carousel-track {
  animation-play-state: paused;
}


/* Imágenes chicas */
.carousel-strip-teaching img {
  height: 140px;          /* 👈 controla tamaño real */
  width: auto;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}


/* Imágenes grandes */
.carousel-strip-tesis img {
  width: 100%;     /* 👈 clave */
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}


/* Animación */
@keyframes scrollCarousel {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .carousel-strip-teaching,
  .carousel-strip-projects,
  .carousel-strip-tesis
   {height: 100px;
  }

  .carousel-strip-teaching img,
  .carousel-strip-tesis img,
  .carousel-strip-projects img {
    height: 100px;
  }
}

.subtitulo-es {
  font-size: 0.85em;     /* más chico */
  font-style: normal;    /* saca la cursiva del <em> */
  font-weight: normal;   /* por si algo lo pone en bold */
  opacity: 0.8;          /* opcional: lo hace un poco más suave visualmente */
}

/* =========================
   PROJECTS GRID (vista general)
========================= */

.projects-grid h2 {
  margin-bottom: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project-card {
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 15px 18px;
}

.project-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.project-card {
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /*background: #f9f9f9;*/
  border: 2px solid #eeeeee;

}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}


/* =========================
   PROJECT PAGE GALLERY
========================= */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 80px;
  gap: 15px;
  grid-auto-flow: dense; /* ← rellena huecos automáticamente */
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #eeeeee;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-gallery img:hover {
  transform: scale(1.02);
}

/* vertical */
.v {
  grid-column: span 2;
  grid-row: span 4;
}

/* horizontal */
.h {
  grid-column: span 3;
  grid-row: span 3;
}

.cover {
  grid-column: span 6;
  grid-row: span 3;
}



.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.project-year {
  font-size: 0.55em;   /* más pequeño que el título */
  font-weight: 400;    /* más liviano */
  color: #777;         /* gris suave */
  margin-left: 8px;    /* separación del título */
}

.team {
  font-size: 0.55em;   /* más pequeño que el título */
  font-weight: 400;    /* más liviano */
  color: #777;         /* gris suave */
  margin-left: 8px;    /* separación del título */
}

.map-title {
  margin-bottom: 3px;   /* reduce el espacio debajo */
}



.tesis-layout {
  display: grid;
  grid-template-columns: 2fr 3fr; /* mitad y mitad */
  gap: 30px;
  align-items: start;
  margin: 0 0;
}

.tesis-texto {
  max-width: 600px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 50px; /* Espacio entre columnas */
    max-width: 1400px;  /* ancho más amplio */
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-info,
.contact-form-section {
    background: white;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.contact-form button {
    padding: 12px;
    background-color: #a6c5a7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #DAFF8B;
    color: #2f2f2f;
}

.note {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}


/* RESPONSIVE */
@media (max-width: 1200px) {
  .map-container {
    height: calc(50vh); /* menos altura en notebooks */
  }
}

@media (max-width: 900px) {
  .map-container {
    height: calc(40vh); /* tablets y pantallas medianas */
  }
}

@media (max-width: 768px) {
  .map-container {
    height: calc(35vh); /* móviles */
  }
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr; /* una columna en móviles */
        gap: 30px;
    }

  
}

@media (max-width: 768px) {
    .sidebar {
        width: 20%; /* barra más angosta en dispositivos pequeños */
    }
}