/* ========================
   Estilos base del sitio
=========================== */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: #f4f6f9;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ========================
   Contenedor del dashboard
=========================== */
.dashboard-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

/* ========================
   Mapa y iframes
=========================== */
iframe,
#map {
    width: 100%;
    border: none;
    border-radius: 10px;
}

iframe {
    height: 100%;
}

#map {
    height: 600px;
    margin-top: 20px;
    z-index: 0;
}

/* ========================
   Filtros de búsqueda
=========================== */
.filtros-busqueda {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.filtros-busqueda h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #333;
}

.filtros-busqueda label {
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.filtros-busqueda label i {
    color: #007bff;
    margin-right: 6px;
}

.filtros-busqueda .form-group {
    margin-bottom: 18px;
}

.filtros-busqueda .form-group span {
    white-space: nowrap;
}

/* ========================
   Inputs y sliders
=========================== */
.form-control,
.form-range {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

.form-range {
    padding: 0;
    background: transparent;
}

/* ========================
   Botón de búsqueda
=========================== */
.filtros-busqueda .btn {
    font-weight: 600;
    padding: 10px 16px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.filtros-busqueda .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.filtros-busqueda .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}


/* ========================
   Layout personalizado de búsqueda
=========================== */
.busqueda-layout {
    position: relative;
}


/* Hace que el aside flote sobre el mapa */
.busqueda-aside {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    width: 350px;
    max-width: 90%;
    max-height: 570px;
    overflow-y: auto; /* <- esta línea es clave */
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* Contenido derecho (selector + mapa) */
.busqueda-contenido {
    flex: 1;
    min-width: 0;
}

.fila-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.fila-horizontal .form-check {
    flex: 1 1 48%;
}


.form-group .form-select {
    flex: 1;
    min-width: 0;
}

.form-group label .fas {
    color: #007bff;
    margin-right: 6px;
}

.radios-mitad {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.radios-mitad .form-check {
    flex: 1 1 48%;
}

.fechas-mitad {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fechas-mitad > div {
    flex: 1 1 48%;
}


/* EStilos para los resultados */
.porcentaje-1 {
    color: #193f41;
    /* margin-top: 20%; */
    position: absolute;
}

/* Proyectos */
.project-section {
    margin-top: 20px;
    clear: both; /* Esto asegura que no se superponga a elementos flotantes previos */
    display: block; /* Garantiza que el elemento se comporte como un bloque */
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #c8d7da;
    margin: 20px auto;
    padding: 25px 25px 20px 25px;
    border-radius: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* width: 80%; */
   
}

.project-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1px solid #193f41;
    cursor: pointer;
}

.project-details {
    display: flex;
    flex-flow: column nowrap;
    flex: 1 1 auto;

}

.project-button {
    background-color: #193f41;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    width: auto;
    margin-top: 60px;
    max-width: 300px;
}

.project-button:hover {
    background-color: #005050;
}

/* Porcentaje */
.porcentaje {
    position: relative;
    text-align: center;
    margin-top: 10px;
    margin-right: 20px;
}

.porcentaje span {
    position: absolute;
    top: -15px;
    left: 43%;
    font: 20px Arial, sans-serif;
    font-weight: bold;
}

.porcentaje img {
    position: absolute;
    top: 49%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 147px;
    height: 147px;
    border-radius: 50%;
    border: .5px solid gray;
    /* background-color: #193f41; */
}

circle {
    fill: none;
    stroke-width: 13;
    transform: rotate(-90deg);
    transform-origin: 50%;
    stroke-dasharray: 100 100;
    stroke: #ffffff;
}

circle:nth-child(2) {
    stroke: #193f41;
    stroke-dasharray: var(--porcentaje) 100;
    animation: rellenar 0.35s linear forwards;
}

/* Animación */
@keyframes rellenar {
    to {
        stroke-dasharray: var(--porcentaje) 100;
    }
}

.content-botton {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px; /* Espaciado interno */
}
.link-detalle-obra {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* Botón personalizado */
/* .custom-button {
    background-color: #193f41;
    color: white;
    font-size: 14px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
   

} */

.custom-button {
    padding: 10px;
    background-color: #193f41;

    color: white;
    font-size: 14px;
    padding: 5px 20px;

    border-radius: 25px;

    border: none;
    cursor: pointer;
    font-size: 1em;
}

.arrow {
    height: fit-content;
    margin-left: 3px;
    font-size: 1.2em;
    color: #193f41;
    font-size: 25px;
    font-weight: bold;
    transition: transform 0.3s ease; /* Transición para el ícono */
}

.arrow img{
    width: 15px;
    margin: 0 5px;
}
/* Animación al pasar el mouse */
.link-detalle-obra:hover .arrow {
    transform: translateX(4px); /* Mueve el ícono 5px a la derecha */
}

/* .fa-solid {
    font-size: 25px;
    font-weight: bold;
    
    transition: transform 0.3s ease;
} */


.custom-button:hover {
    background-color: #40575d;
}

.custom-button:hover .arrow {
    transform: translateX(5px);
}

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    gap: 10px;
    margin: 20px 0;
}

.pagination-button {
    width: fit-content;
    background-color: #193f41;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 0px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    padding-bottom: 5px;
}

.pagination-button:hover {
    background-color: #193f41;
}

.pagination-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 20px;
    background-color: white;
    border: 2px solid #193f41;
    border-radius: 25px;
    gap: 5px;
}

.page-number {
    background-color: transparent;
    color: #193f41;
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-number:hover {
    color: #193f41;
}

.pagination-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 30px; /* Aumenta el redondeo de los bordes */
    background-color: #f0f0f0;
    border: 2px solid #193f41; /* Aumenta el grosor del borde */
}

.pagination-numbers button{
    padding: 5px 30px;
}

.pagination-numbers button.active {
    background-color: #003838;
    color: white;
    border-radius: 0px 0px 0px 0px;
    font-weight: bold; /* Opcional para destacar el número activo */
}

/* Si el botón activo es el primero */
.pagination-numbers button.active:first-child {
    border-radius: 10px 0px 0px 10px;
}

/* Si el botón activo es el último */
.pagination-numbers button.active:last-child {
    border-radius: 0px 10px 10px 0px;
}

.page-number {
    text-align: center;
    background-color: transparent;
    color: #003838;
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 2px 2px; /* Ajusta el marco para los números normales */
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.page-number:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0; /* Línea en el lado derecho */
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #ccc; /* Color de la línea de separación */
}

.pagination-info {
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #003838;
    margin-top: 10px;
}

.pagination .page-item {
    border-radius: 25px;
    overflow: hidden;
}

.pagination .page-link {
    border-radius: 25px;
    padding: 10px 15px;
}

.pagination .page-item.active .page-link {
    background-color: #193f41;
    color: white;
}

.pagination .page-item:hover .page-link {
    background-color: #005050;
}

/* Media Queries */
@media (max-width: 768px) {
    /* Reduce the font size of the header */
    .titulo {
        font-size: 30px;
        padding: 6%;
    }

    /* Adjust project item layout */
    .project-item {
        flex-direction: column;
        width: 80%;
        margin-top: 20%;
    }

    .project-details {
        text-align: center;
        width: 100%;
        margin-left: 0;
    }

    .project-button {
        margin-top: 40px;
        width: 80%;
        max-width: 100%;
    }

    /* Pagination styling */
    .pagination-container {
        flex-direction: column;
        gap: 20px;
    }

    .pagination-numbers {
        gap: 20px; /* Reduces space between page numbers */
    }

    .page-number {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* Adjust project item layout for mobile */
    .project-item {
        flex-direction: column;
        width: 90%;
        margin-top: 20%;
    }

    .project-details {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }

    .project-button {
        margin-top: 40px;
        width: 80%;
    }

    /* Adjust page numbers for smaller screens */
    .pagination-numbers {
        gap: 15px;
    }

    .page-number {
        font-size: 12px;
    }
}

