    @font-face {
    font-family: 'Gill Sans';
    src: url('../data/Gill Sans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

        body {
            font-family: 'Gill Sans', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }

        .main-container {
            display: grid;
            grid-template-columns: 25% 75%;  /* 25% izquierda (variables), 75% derecha (mapa + ficha) */
            grid-template-rows: 60% 40%;   /* dos filas: mapa y ficha */
            gap: 20px;
            width: 95%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            box-sizing: border-box;
            height: 100vh;  /* ocupa toda la pantalla */
        }

                /* Estilos del menú Análisis Espacial */
        .analysis-menu {
            grid-row: 1 / span 2;  /* se expande en las 2 filas */
            grid-column: 1;
            background-color: #33691e;
            color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            overflow-y: auto; /* scroll si es mucho contenido */
        }

        .analysis-menu h2 {
            text-align: center;
            margin-top: 0;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
        }

        .menu-container {
        display: flex;
        justify-content: center; /* en lugar de space-around */
        }

        .menu-item {
            width: 45%;
            min-width: 250px;
            position: relative;
        }

        .menu-button {
            width: 100%;
            background-color: #4caf50;
            color: white;
            padding: 12px 15px;
            border: none;
            cursor: pointer;
            text-align: center;
            border-radius: 5px;
            font-size: 16px;
            font-weight: bold;
            transition: background-color 0.3s;
        }

        .menu-button:hover {
            background-color: #408326;
        }

        /* Estilos de submenús */
        .submenu {
            display: none;
            position: absolute;
            background-color: white;
            width: 100%;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            z-index: 100;
            margin-top: 5px;
        }

        .submenu.active {
            display: block;
        }

        .submenu-item {
            padding: 10px 15px;
            color: #333;
            border-bottom: 1px solid #eee;
        }

        .submenu-item span {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            color: #33691e;
            font-weight: bold;
        }

        .submenu-item:hover {
            background-color: #f0f0f0;
        }

        .arrow-icon {
            font-style: normal;
            transition: transform 0.3s;
        }

        /* Estilos de submenús anidados */
        .nested-menu {
            display: none;
            list-style: none;
            padding-left: 15px;
            margin: 10px 0 5px 0;
            border-left: 2px solid #4caf50;
        }

        .nested-menu.active {
            display: block;
        }

        .nested-menu li {
            padding: 8px 10px;
            cursor: pointer;
            color: #555;
        }

        .nested-menu li:hover {
            background-color: #f5f5f5;
            color: #33691e;
        }

        /* Estilos del mapa */
        /* Mapa arriba a la derecha */
        .map-section {
            grid-column: 2;
            grid-row: 1;
        }

        #map {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        /* Estilos para la leyenda y elementos del mapa */
        .info {
            padding: 6px 8px;
            font: 14px/16px Arial, Helvetica, sans-serif;
            background: white;
            background: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
            border-radius: 5px;
        }
        
        .legend {
            line-height: 18px;
            color: #555;
        }
        
        .legend i {
            width: 18px;
            height: 18px;
            float: left;
            margin-right: 8px;
            opacity: 0.7;
        }
        
        .search-container .search-button {
            font-size: 1.2em;
        }
        
        .search-container .search-input {
            height: 2em;
            font-size: 1.2em;
        }

        /* Estilos de la imagen */
        /* Ficha técnica abajo a la derecha */
        .image-section {
            grid-column: 2;
            grid-row: 2;
            overflow-y: auto;  /* scroll si es muy alta */

        }

        .map-image {
            width: 100%;
            height: auto;   /* ocupa toda su celda */
            object-fit: contain; /* mantiene proporciones sin deformar */
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .map-title {
            text-align: center;
            margin-top: 10px;
            font-size: 18px;
            font-weight: bold;
            color: #408326;
        }

        /* Efecto hover en imágenes */
        img {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        img:hover {
            transform: scale(1.02);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
        }

        /* Vista responsive para móviles */
@media (max-width: 768px) {
  .main-container {
    display: flex;
    flex-direction: column;
    height: auto; /* que se expanda con el contenido */
    gap: 15px;
    margin-top: 100px; /* deja espacio para el navbar fijo */
  }

  /* Menú ocupa todo el ancho arriba */
  .analysis-menu {
    width: 100%;
    grid-row: auto;
    grid-column: auto;
    max-height: 250px;   /* que no se coma toda la pantalla */
    overflow-y: auto;    /* scroll si es mucho contenido */
  }

  /* Mapa ocupa buen alto para que sea usable en móvil */
  .map-section {
    width: 100%;
    height: 400px; /* puedes ajustar este valor */
    order: 2;
  }

  #map {
    height: 100%;
    min-height: 350px;
  }

  /* Imagen (ficha técnica) debajo del mapa */
  .image-section {
    width: 100%;
    order: 3;
    overflow-x: auto;   /* scroll horizontal si la imagen es más ancha */
    text-align: center; /* centra la imagen */
  }

  .map-image {
    width: 100%;     /* se adapta al ancho del móvil */
    height: auto;    /* mantiene proporción */
    max-width: 100%;
    max-height: 500px; /* 🔑 controlas la altura máxima */
    object-fit: contain;
  }
  
  .map-title {
  text-align: center;
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #408326;
  }  
  
  /* Botones del menú más grandes para tocar con el dedo */
  .menu-button {
    width: 100%;              /* que el botón se adapte al ancho del item */
    text-align: center;       /* centra el texto dentro */
  }
  
    .menu-item {
    width: 100%;              /* hace que ocupen todo el ancho */
    max-width: 300px;         /* límite opcional, para que no se vean enormes */
  }

.menu-container {
  display: flex;
  justify-content: center; /* en lugar de space-around */
}

  .submenu {
    position: static; /* evitar que se corte en móvil */
    box-shadow: none;
  }
}