@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCs16Ew-.ttf) format('truetype');
  }
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew-.ttf) format('truetype');
  }
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM70w-.ttf) format('truetype');
  }

/* Estilos generales y texto*/
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f7f7f7;
}

.header {
    background-color: #f7f7f7;
    padding: 30px;
}

.header {
    text-align: left;
}

h1, h2 {
    font-family: 'Anton', sans-serif;
    color: #333;
}

h1 {
    font-size: 7vh;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #333;
    margin-bottom: 5px;
}

p {
    line-height: 1.6;
    color: #555;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 10px;
    padding: 30px;
}

.point-of-interest {
    margin-bottom: 40px;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 9999;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.water-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.water-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: #0066ff;
    transition: height 0.5s ease-out;
}

.water-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: #0066ff;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #0066ff;
    z-index: 1;
    font-family: Arial, sans-serif;
}

#map {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#map-container {
    position: relative;
    height: 85vh;
    width: 100%;
    margin: 20px 0;
}

#map { 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#search-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    z-index: 1000;
}

#search-input {
    flex-grow: 1;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#search-button {
    padding: 4px;
    background-color: #0066CC;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#search-button:hover {
    background-color: #0052a3;
}

#search-button i {
    font-size: 14px;
}

.map-caption {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin: 10px 0;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
}

.map-caption a {
    color: #0066CC;
    text-decoration: none;
}

.map-caption a:hover {
    text-decoration: underline;
}
/*Leyenda para capas*/
#layer-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#layer-menu h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

#layer-toggles {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layer-label {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.layer-label input[type="checkbox"] {
    margin-right: 5px;
}

input[type="checkbox"]:checked + .layer-text {
    font-weight: bold;
}

.layer-label input[type="checkbox"]:checked + .layer-text[data-color="#0066ff"] {
    color: #cad01caf;
}

.layer-label input[type="checkbox"]:checked + .layer-text[data-color="#ff0000"] {
    color: #ff0000;
}

.layer-label input[type="checkbox"]:checked + .layer-text[data-color="#00ff00"] {
    color: #0066ff;
}

.layer-label input[type="checkbox"]:checked + .layer-text[data-color="#ffff00"] {
    color: #800080;
}

.layer-label input[type="checkbox"]:checked + .layer-text[data-color="#800080"] {
    color: #800080;
}

.layer-group {
    margin-bottom: 10px;
}

.layer-group .group-title {
    margin: 5px 0;
    color: #666;
    cursor: pointer;
}

.layer-group .group-content {
    display: none;
    padding-left: 10px;
}

.layer-group .group-title::before {
    content: '▶';
    display: inline-block;
    margin-right: 5px;
    font-size: 10px;
    transition: transform 0.2s;
}

.layer-group.open .group-title::before {
    transform: rotate(90deg);
}

.layer-group.open .group-content {
    display: block;
}

.tooltip {
    position: absolute;
    background-color: white;
    border: solid 1px #ddd;
    border-radius: 5px;
    padding: 5px;
    pointer-events: none;
    font-size: 12px;
    z-index: 1001;
    opacity: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

@media (max-width: 320px) {
    #layer-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 50vh !important;
        border-radius: 8px 8px 0 0 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease-in-out !important;
    }

    #layer-menu.open {
        transform: translateY(0) !important;
    }

    #layer-menu-toggle {
        display: block !important;
        position: fixed !important;
        bottom: 10px !important;
        right: 10px !important;
        padding: 10px !important;
        background-color: #ffffff !important;
        border-radius: 50% !important;
        box-shadow: 0 0 10px rgba(0,0,0,0.1) !important;
        z-index: 1000 !important;
        cursor: pointer !important;
    }
}

/*Estilos del footer*/

footer {
    background-color: #000000;
    color:#d3d3d3;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-section {
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 0.5rem;
}

.footer-section p {
    margin: 0;
}

.logo img {
    max-width: 150px;
    height: auto;
}

a {
    color: #4da6ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a8cff;
    text-decoration: underline;
}


@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-section {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .logo {
        order: -1;
        margin-bottom: 1.5rem;
    }
}
