/* Estilos base y reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}


body {
    background-color: var(--background-color);
    color: var(--text-description);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Fondo neuronal animado */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
}

#neuralCanvas {
    width: 100%;
    height: 100%;
}

/* Encabezado */
.header {
    background: var(--background-color);
    color: var(--text-color);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
}

.logo-icon {
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.logo-text {
    background: var(--text-color);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-button {
    background-color: var(--text-color);
    color: var(--light-text);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-button:hover {
    background-color: var(--select-btn);
    transform: translateY(-2px);
}

.nav-button.pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.nav-button.pulse:hover::after {
    animation: ripple 1s ease-out;
}

/* Contenedor de bienvenida */
.welcome-container {
    max-width: 90%;
    margin: 2rem auto 1rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.welcome-text {
    flex: 1;
    min-width: 300px;
}

.welcome-text h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-description);
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.botonEntidad {
    margin-bottom: 1vh;
    display: flex;
    align-items: center;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(142, 45, 226, 0.3);
}

.action-button {
    margin-bottom: 1vh;
    display: flex;
    align-items: center;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(142, 45, 226, 0.3);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(142, 45, 226, 0.4);
}

.button-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Filtros */
.filter-container {
    max-width: 100%;
    margin: 0 auto 1.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.filter-input {
    background: var(--background-color);
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    min-width: 250px;
    max-width: 500px;
}

.filter-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    text-align: center;
}

.filter-button:hover,
.filter-button.active {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Contenido principal */
.main-content {
    max-width: 90%;
    margin: 0 auto 2rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

#listado {
    display: none;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    height: 70vh;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid rgba(110, 72, 170, 0.1);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

#listado::-webkit-scrollbar {
    width: 8px;
}

#listado::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#listado::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.helix-title,
.stats-title {
    text-align: center;
    margin-bottom: 2rem;
}

.helix-title h3,
.stats-title h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.helix-title p,
.stats-title p {
    color: var(--text-description);
    max-width: 600px;
    margin: 0 auto;
}

/* Tarjetas */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.card-front {
    background-color: var(--card-bg);
    border: 1px solid rgba(110, 72, 170, 0.1);
}

.card-back {
    background: var(--gradient-1);
    color: white;
    transform: rotateY(180deg);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.synapse-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    margin-bottom: 1.5rem;
}

.synapse-icon::before,
.synapse-icon::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.synapse-icon::before {
    width: 20px;
    height: 20px;
    top: 30px;
    left: 10px;
    animation: pulse 2s infinite;
}

.synapse-icon::after {
    width: 15px;
    height: 15px;
    top: 20px;
    right: 15px;
    animation: pulse 3s infinite;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-text {
    font-size: 0.9rem;
    line-height: 1.5;
}
.title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}


/* Contadores */
.counters-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.counter {
    width: 120px;
    height: 120px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    box-shadow: 0 10px 20px rgba(110, 72, 170, 0.2);
}

.counter-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.counter-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Tarjetas de información */
.cardinfo {
    width: 280px;
    height: 280px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid rgba(110, 72, 170, 0.1);
}

.cardinfo:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(110, 72, 170, 0.15);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

.modal-header {
    text-align: center;
}

.modal-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

.modal-icon {
    display: block;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.modal-info {
    margin-top: 1rem;
}

.modal-button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin-top: 1.5rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.modal-button:hover {
    background: var(--gradient-2);
    transform: translateY(-2px);
}

/* Selector de tipo de entidad */
.entity-type-selector {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.entity-type-button {
    flex: 1;
    min-width: 100px;
    padding: 0.7rem 1rem;
    background-color: #f1f1f1;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.entity-type-button:hover,
.entity-type-button.active {
    background-color: var(--primary-color);
    color: white;
}

/* Formularios */
form {
    margin-bottom: 1rem;
}

.titulo-datos {
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(110, 72, 170, 0.2);
}



.input-box {
    margin-bottom: 1rem;
}

.input-box span {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #555;
}

.input-box input,
.input-box textarea,
.input-box select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.input-box input:focus,
.input-box textarea:focus,
.input-box select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(110, 72, 170, 0.1);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

/* Animaciones */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(20);
        opacity: 0;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .welcome-container {
        flex-direction: column;
    }

    .welcome-text {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .action-buttons {
        justify-content: center;
    }

    .filter-container {
        padding: 1rem;
    }

    .filter-button {
        min-width: 100px;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

#serviciosAsociados,
#integrantesAsociados {
    padding-left: 20px;
    color: black
}

#serviciosAsociados,
#integrantesAsociados ul li::marker {
    color: var(--text-color);
}

/*tabla de datos PPI*/
.PPI {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: rgb(242, 248, 252);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: 1px solid black;

}

.PPI th {
    font-weight: 500;
    color: var(--primary-color);
    font-weight: bold;


}

.PPI th,
td {
    border: 1px solid var(--primary-color);

}


/* Tabla de datos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}


.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--primary-color);
    font-weight: 600;
    color: var(--yellow);
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th,
.data-table td {
    border: 0px;
}
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #6c757d;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

.action-icon.edit:hover {
    background-color: #17a2b8;
}

.action-icon.delete:hover {
    background-color: #dc3545;
}

.tabla-scroll {
    height: 40%;
    overflow-y: auto;
}


.contact-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#userPhoto {
    height: 10vh;
    margin: 1rem;

}

#userPhoto img {
    height: 100%;
    border-radius: 100%;
}


.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #323232;
    color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px #00000050;
    font-family: sans-serif;
    z-index: 9999;
    opacity: 0.95;
    animation: aparecer 0.3s ease;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Estilos para el mapa en el formulario de entidad */
.map-section {
    margin: 15px 0;
}

.map-container {
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.coordinates-display {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.coordinates-display>div {
    flex: 1;
}

.coordinates-display label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.coordinates-display input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #666;
    font-size: 0.9em;
}

.map-instructions {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
    padding: 8px 12px;
    background-color: #f0f8ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.map-help-text {
    color: #666;
    font-size: 0.8em;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* Estilos específicos del leaflet dentro del modal */
.modal .leaflet-control-container {
    font-size: 12px;
}

.modal .leaflet-popup-content {
    font-size: 13px;
    line-height: 1.4;
}

.modal .leaflet-popup-content strong {
    color: var(--primary-color);
}

/* Animación para el marcador personalizado */
@keyframes markerPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.location-marker {
    animation: markerPulse 2s infinite;
}

.codigo-proyecto {
    background-color: white;
    font-weight: 600;
    color: var(secondary-color);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}
/* Estilos para las badges de los estados del proyecto */

  .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
  }

    
  .badge-secondary {
    background-color: #6c757d;
    color: white;
  }
  
  .badge-success {
    background-color: #28a745;
    color: white;
  }
  
  .badge-danger {
    background-color: #dc3545;
    color: white;
  }
  
  .badge-warning {
    background-color: #ffc107;
    color: #212529;
  }
  
  .badge-info {
    background-color: #17a2b8;
    color: white;
  }
  
  .badge-light {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
  }
  
  .badge-dark {
    background-color: #343a40;
    color: white;
  }
  
