/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ICONOS PIXEL ART ===== */
.tree-icon,
.leaf-icon,
.co2-icon,
.search-icon,
.plus-icon,
.save-icon,
.reset-icon,
.btn-icon {
    width: 16px;
    height: 16px;
    background-color: #000;
    display: inline-block;
    position: relative;
}

/* Árbol pixel art */
.tree-icon::before,
.tree-icon::after {
    content: '';
    position: absolute;
    background-color: #000;
}

.tree-icon::before {
    width: 8px;
    height: 12px;
    top: 0;
    left: 4px;
    box-shadow: 
        2px 0 0 #000,
        -2px 0 0 #000,
        0 2px 0 #000,
        2px 2px 0 #000,
        -2px 2px 0 #000;
}

.tree-icon::after {
    width: 2px;
    height: 4px;
    bottom: 0;
    left: 7px;
}

/* Hoja pixel art */
.leaf-icon {
    background: none;
}

.leaf-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    left: 4px;
    top: 4px;
    transform: rotate(45deg);
    box-shadow: 
        2px 0 0 #000,
        0 2px 0 #000,
        -2px 0 0 #000,
        0 -2px 0 #000;
}

/* CO2 pixel art */
.co2-icon {
    background: none;
}

.co2-icon::before {
    content: 'CO₂';
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    left: -2px;
    top: 4px;
}

/* Lupa pixel art */
.search-icon {
    background: none;
    border: 2px solid #000;
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 2px;
    background-color: #000;
    bottom: -1px;
    right: -4px;
    transform: rotate(45deg);
}

/* Plus pixel art */
.plus-icon::before,
.plus-icon::after {
    content: '';
    position: absolute;
    background-color: #000;
}

.plus-icon::before {
    width: 2px;
    height: 12px;
    left: 7px;
    top: 2px;
}

.plus-icon::after {
    width: 12px;
    height: 2px;
    left: 2px;
    top: 7px;
}

/* User icon (persona) */
.user-icon {
    background: none;
}

.user-icon::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
    left: 5px;
    top: 2px;
}

.user-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 6px;
    background-color: #000;
    border-radius: 50% 50% 0 0;
    left: 3px;
    top: 9px;
}

/* Folder icon (carpeta) */
.folder-icon {
    background: none;
}

.folder-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 8px;
    background-color: transparent;
    border: 2px solid #000;
    border-top: none;
    left: 1px;
    top: 5px;
}

.folder-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 3px;
    background-color: #000;
    left: 1px;
    top: 2px;
    border-radius: 2px 2px 0 0;
}

/* Logout icon (puerta con flecha) */
.logout-icon {
    background: none;
}

.logout-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 10px;
    background-color: transparent;
    border: 2px solid #000;
    border-left: none;
    left: 5px;
    top: 2px;
}

.logout-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 2px;
    background-color: #000;
    left: 1px;
    top: 7px;
    box-shadow: 
        4px -2px 0 0 #000,
        4px 2px 0 0 #000;
}

/* Save icon */
.save-icon {
    background: none;
    border: 2px solid #000;
}

.save-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background-color: #000;
    top: 2px;
    left: 2px;
}

/* Reset icon */
.reset-icon {
    background: none;
    border: 2px solid #000;
    border-radius: 50%;
}

.reset-icon::before {
    content: '↻';
    position: absolute;
    font-size: 10px;
    left: 2px;
    top: 0;
}

/* Exotic icon */
.exotic-icon {
    background: none;
}

.exotic-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 8px;
    background-color: #000;
    left: 2px;
    top: 4px;
    box-shadow: 
        2px -2px 0 #000,
        -2px -2px 0 #000,
        0 4px 0 #000,
        2px 6px 0 #000,
        -2px 6px 0 #000;
}

/* Water icon */
.water-icon {
    background: none;
}

.water-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 10px;
    background-color: #000;
    left: 4px;
    top: 3px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 -2px 0 #000;
}

/* North icon */
.north-icon {
    background: none;
}

.north-icon::before {
    content: 'N';
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    left: 5px;
    top: 2px;
}

/* Center icon */
.center-icon {
    background: none;
}

.center-icon::before {
    content: 'C';
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    left: 5px;
    top: 2px;
}

/* South icon */
.south-icon {
    background: none;
}

.south-icon::before {
    content: 'S';
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    left: 5px;
    top: 2px;
}

/* Extreme south icon */
.extreme-south-icon {
    background: none;
}

.extreme-south-icon::before {
    content: 'ES';
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    left: 2px;
    top: 3px;
}

/* Import/Export icons */
.import-icon,
.excel-icon,
.csv-icon,
.txt-icon {
    background: none;
    border: 2px solid #000;
}

.import-icon::before {
    content: '↓';
    position: absolute;
    font-size: 12px;
    left: 3px;
    top: 0;
}

.excel-icon::before {
    content: 'XL';
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    left: 1px;
    top: 3px;
}

.csv-icon::before {
    content: 'CSV';
    position: absolute;
    font-size: 6px;
    font-weight: bold;
    left: -1px;
    top: 4px;
}

.txt-icon::before {
    content: 'TXT';
    position: absolute;
    font-size: 6px;
    font-weight: bold;
    left: -1px;
    top: 4px;
}

/* Problem icon */
.problem-icon {
    background: none;
}

.problem-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid #000;
    border-radius: 50%;
    left: 2px;
    top: 2px;
}

.problem-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 6px;
    background-color: #000;
    left: 7px;
    top: 4px;
}

/* Team icon */
.team-icon {
    background: none;
}

.team-icon::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
    left: 2px;
    top: 2px;
    box-shadow: 
        6px 0 0 #000,
        0 6px 0 #000,
        6px 6px 0 #000;
}

/* Target icon */
.target-icon {
    background: none;
}

.target-icon::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #000;
    left: 6px;
    top: 6px;
    box-shadow: 
        /* Centro del objetivo */
        0 0 0 0 #000,
        /* Primer anillo */
        -2px -2px 0 0 #000,
        2px -2px 0 0 #000,
        -2px 2px 0 0 #000,
        2px 2px 0 0 #000,
        /* Segundo anillo */
        -4px 0 0 0 #000,
        4px 0 0 0 #000,
        0 -4px 0 0 #000,
        0 4px 0 0 #000,
        /* Esquinas del anillo exterior */
        -4px -4px 0 0 #000,
        4px -4px 0 0 #000,
        -4px 4px 0 0 #000,
        4px 4px 0 0 #000;
}

/* Criteria icon (lista/filtros) */
.criteria-icon {
    background: none;
}

.criteria-icon::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #000;
    left: 2px;
    top: 2px;
    box-shadow: 
        /* Líneas horizontales de la lista */
        4px 0 0 0 #000,
        0 3px 0 0 #000,
        4px 3px 0 0 #000,
        0 6px 0 0 #000,
        4px 6px 0 0 #000,
        0 9px 0 0 #000,
        4px 9px 0 0 #000,
        /* Puntos de viñeta */
        8px 0 0 0 #000,
        8px 3px 0 0 #000,
        8px 6px 0 0 #000,
        8px 9px 0 0 #000;
}

/* Chart icon (gráfico de barras) */
.chart-icon {
    background: none;
}

.chart-icon::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: #000;
    left: 1px;
    top: 4px;
    box-shadow: 
        /* Barras del gráfico de diferentes alturas */
        3px -2px 0 -2px #000,
        6px -4px 0 -4px #000,
        9px 0 0 -4px #000,
        /* Base del gráfico */
        -1px 8px 0 -2px #000,
        2px 8px 0 -2px #000,
        5px 8px 0 -2px #000,
        8px 8px 0 -2px #000,
        11px 8px 0 -2px #000;
}

/* Spatial icon (distribución espacial) */
.spatial-icon {
    background: none;
}

.spatial-icon::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #000;
    left: 2px;
    top: 2px;
    box-shadow: 
        /* Grilla de puntos espaciales */
        4px 0 0 0 #000,
        8px 0 0 0 #000,
        0 4px 0 0 #000,
        4px 4px 0 0 #000,
        8px 4px 0 0 #000,
        0 8px 0 0 #000,
        4px 8px 0 0 #000,
        8px 8px 0 0 #000,
        /* Marco del terreno */
        -1px -1px 0 0 #000,
        10px -1px 0 0 #000,
        -1px 10px 0 0 #000,
        10px 10px 0 0 #000;
}

/* Catalog icon (libro/catálogo) */
.catalog-icon {
    background: none;
}

.catalog-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 10px;
    background-color: transparent;
    border: 2px solid #000;
    border-right: none;
    left: 2px;
    top: 1px;
    box-shadow: 
        /* Páginas del libro */
        2px 0 0 0 #000,
        4px 0 0 0 #000,
        /* Líneas de texto */
        inset 1px 2px 0 0 #000,
        inset 1px 4px 0 0 #000,
        inset 1px 6px 0 0 #000,
        inset 1px 8px 0 0 #000;
}

/* Directory icon (directorio de personas) */
.directory-icon {
    background: none;
}

.directory-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 8px;
    background-color: transparent;
    border: 2px solid #000;
    border-radius: 2px;
    left: 0;
    top: 3px;
}

.directory-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #000;
    border-radius: 50%;
    left: 4px;
    top: 1px;
}

/* ===== DISTRIBUCIÓN ESPACIAL ===== */
.spatial-dashboard {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.spatial-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-section {
    background: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
}

.control-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.terrain-config {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.input-group input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-align: center;
    min-height: 44px; /* Tamaño mínimo táctil */
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #2d5d31;
}

.unit-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #e8f5e8;
    border: 1px solid #b3d9b3;
    border-radius: 4px;
}

.unit-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d5d31;
}

.unit-help {
    font-size: 0.75rem;
    color: #4a7c59;
    font-style: italic;
}

.terrain-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.terrain-size {
    font-weight: 600;
    color: #000;
}

.terrain-scale {
    font-size: 0.9rem;
    color: #666;
}

.species-selector-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.species-selector-section select {
    flex: 1;
}

.selected-species-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    background: #f8f9fa;
    padding: 0.5rem;
}

.empty-message {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 0;
}

.species-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border: 2px solid #000;
    border-radius: 0;
    margin-bottom: 0;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.species-item:hover {
    background: #f0f0f0;
    box-shadow: 4px 4px 0 #ccc;
    transform: translateY(-2px);
}

/* Estilos para tarjetas clickeables */
.species-item.clickable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* Hover para cambiar toda la tarjeta al color de la especie */
.species-item.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 #000;
    border-color: #000;
    border-width: 3px;
}

/* El color del texto se maneja dinámicamente via JavaScript según el color de fondo */

/* Estilos específicos para elementos de texto */
.species-item-name,
.species-item-scientific,
.species-item-details {
    transition: all 0.3s ease;
}

.species-item-info {
    flex: 1;
}

.species-item-name {
    font-weight: bold;
    color: #000;
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.species-item-scientific {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.species-item-details {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
}

/* Círculo de color eliminado - ahora usamos hover en toda la tarjeta */

.btn-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
}

.btn-remove:hover {
    background: #c82333;
}

.species-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.species-breakdown h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #000;
}

.breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.breakdown-species {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-color {
    width: 12px;
    height: 12px;
    border: 1px solid #000;
    border-radius: 50%;
}

.breakdown-count {
    font-weight: 600;
    color: #000;
}

/* Sección de importar especies */
.import-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    text-align: center;
}

.import-help {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Selector de especies con cantidad */
.species-selector-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.species-dropdown {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.quantity-input-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.quantity-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    min-width: 60px;
}

.quantity-input {
    width: 80px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 0.9rem;
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.quantity-unit {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.species-item-quantity {
    display: block;
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 500;
    margin-top: 0.25rem;
}

.species-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-edit {
    width: 60px;
    padding: 0.25rem 0.4rem;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 0.8rem;
    text-align: center;
}

.quantity-edit:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
}

/* Sección de perímetro personalizado */
.perimeter-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff8f0;
    border: 1px solid #ffd9b3;
    border-radius: 4px;
}

.perimeter-upload {
    margin-bottom: 1rem;
}

.perimeter-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #e8f5e8;
    border: 1px solid #b3d9b3;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.perimeter-details {
    flex: 1;
}

.perimeter-name {
    font-weight: 600;
    color: #000;
    display: block;
}

.perimeter-status {
    font-size: 0.85rem;
    color: #28a745;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-height: auto;
}

.perimeter-help {
    text-align: center;
}

.perimeter-help small {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
}

.species-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #000;
    background: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.species-info-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
}

.species-detail {
    margin-bottom: 0.75rem;
}

.species-name {
    font-weight: 600;
    display: block;
    color: #000;
}

.species-scientific {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.species-properties {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.property-label {
    color: #666;
}

.property-value {
    font-weight: 600;
    color: #000;
}

.pattern-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: #f8f9fa;
}

.radio-option input[type="radio"] {
    margin: 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn:hover:not(:disabled) {
    background: #000;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: #333;
}

.btn-secondary {
    background: #666;
    color: #fff;
    border-color: #666;
}

.btn-secondary:hover {
    background: #333;
}

.btn-outline {
    background: transparent;
    border-color: #000;
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
}

.result-label {
    color: #666;
    font-size: 0.9rem;
}

.result-value {
    font-weight: 600;
    color: #000;
}

.spatial-canvas-container {
    background: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.canvas-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.canvas-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border: 1px solid #000;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border: 2px solid #000;
    background: #f0f8f0;
}

#terrain-canvas {
    background: #f0f8f0;
    cursor: crosshair;
    transition: transform 0.3s ease;
    transform-origin: 0 0;
    width: 100%;
    max-width: 1000px;
    height: auto;
    max-height: 1000px;
    border: 2px solid #000;
    display: block;
}

/* Controles de Canvas */
.canvas-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.zoom-controls, .view-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zoom-controls {
    gap: 4px;
}

.view-controls {
    gap: 6px;
}

.zoom-btn, .tool-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.zoom-btn:hover, .tool-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: translateY(-1px);
}

.zoom-btn:active, .tool-btn:active {
    transform: translateY(0);
    background: #e0e0e0;
}

/* Menú Ver/Cámara */
.view-menu {
    position: relative;
}

.menu-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 80px;
}

.menu-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 3px solid #000;
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(0,0,0,1);
    z-index: 1000;
    min-width: 200px;
    padding: 4px 0;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.menu-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.menu-item:hover {
    background: #000;
    color: #fff;
}

.menu-item:active {
    background: #000;
    color: #fff;
}

.menu-separator {
    height: 2px;
    background: #000;
    margin: 4px 8px;
}

/* Botón Zoom Extents especial */
.zoom-extents-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 11px;
    padding: 8px 10px;
}

.zoom-extents-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.zoom-extents-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #1e7e34 0%, #198773 100%);
}

/* Estados activos */
.pan-btn.active, .tool-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.pan-btn.active:hover {
    background: #0056b3;
}

/* Información de atajos */
.shortcuts-info {
    margin-top: 8px;
    padding: 6px 12px;
    background: #f0f0f0;
    border: 2px solid #000;
    border-radius: 0;
    text-align: center;
}

.shortcuts-info small {
    color: #6c757d;
    font-size: 11px;
}

/* ===== PÁGINA DE DIAGNÓSTICO WEB ===== */

.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Panel de Diagnóstico */
.diagnostic-section {
    background: #ffffff;
    border: 3px solid #000;
    border-radius: 0;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 4px 4px 0 rgba(0,0,0,1);
}

.diagnostic-header h3 {
    color: #000;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.diagnostic-header p {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.diagnostic-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.diagnostic-controls .btn {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diagnostic-controls .btn-primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

.diagnostic-controls .btn-primary:hover {
    background: #333;
    border-color: #333;
}

.diagnostic-controls .btn-secondary {
    background: #666;
    color: #fff;
    border-color: #666;
}

.diagnostic-controls .btn-secondary:hover {
    background: #555;
    border-color: #555;
}

.diagnostic-controls .btn-outline {
    background: transparent;
    color: #000;
    border-color: #000;
}

.diagnostic-controls .btn-outline:hover {
    background: #f5f5f5;
}

.diagnostic-results {
    margin-top: 1rem;
}

.results-container {
    background: #f9f9f9;
    border: 1px solid #000;
    border-radius: 4px;
    padding: 1rem;
    min-height: 100px;
    font-size: 0.85rem;
    color: #000;
    white-space: pre-line;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.4;
}

/* Panel de Estado del Sistema */
.system-status-section {
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.5rem;
}

.status-header h3 {
    color: #000;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.status-header p {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.status-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.status-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.status-value {
    font-size: 1.1rem;
    color: #000;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

.status-indicator.error {
    background: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
}

.status-indicator.loading {
    background: #ffc107;
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Panel de Logs */
.system-logs-section {
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.5rem;
}

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logs-header h3 {
    color: #000;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.logs-header p {
    color: #333;
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logs-container {
    background: #000;
    border-radius: 4px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.logs-content {
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #00ff00;
    line-height: 1.4;
    white-space: pre-wrap;
    min-height: 200px;
}

/* Icono admin */
.btn-icon.admin-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

/* ===== BOTÓN FLOTANTE MODELO FINANCIERO ===== */
/* ===== MENÚ DE USUARIO EN NAVEGACIÓN ===== */

/* Menú de usuario integrado en navegación principal */
#nav-user-dropdown {
    position: relative;
}

/* Estado de invitado (guest) */
.nav-guest-menu {
    display: block;
}

/* Estilos de usuario obsoletos removidos - ahora usa estilos generales de .nav-link */

/* Estado autenticado */
.nav-user-menu {
    display: block;
}

/* Estilos específicos removidos para usar los estilos generales de .nav-link */

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid #fff;
}

/* Ícono de usuario dentro del avatar circular */
.nav-user-avatar::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
}

.nav-user-avatar::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 8px;
    background-color: #000;
    border-radius: 50% 50% 0 0;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    font-size: 14px;
    border: 2px solid #fff;
}

.nav-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown específico del usuario en navegación */
#nav-user-dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000;
    border: 3px solid #fff;
    min-width: 280px;
    z-index: 1000;
    box-shadow: 4px 4px 0 rgba(255,255,255,1);
    margin-top: -2px;
    border-radius: 0;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

#nav-user-dropdown:hover .dropdown-content,
#nav-user-dropdown .dropdown-content.active {
    display: block;
    animation: dropdownFade 0.2s ease;
}

/* Header del dropdown de usuario */
.user-dropdown-header-nav {
    padding: 15px;
    background: #000;
    border-bottom: 2px solid #fff;
}

.user-dropdown-name-nav {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.user-dropdown-email-nav {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
}

/* Divider del dropdown */
.user-dropdown-divider {
    height: 2px;
    background: #333;
    margin: 0;
}

/* ===== ESTILOS LEGACY (mantener para compatibilidad) ===== */
.user-menu {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.guest-menu .btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.guest-menu .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.guest-menu .user-icon {
    font-size: 16px;
}

.user-menu-logged {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
}

.user-button:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.user-avatar,
.user-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 250px;
    z-index: 1000;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.user-dropdown-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.user-dropdown-email {
    font-size: 12px;
    color: #666;
}

.user-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-item.logout-btn {
    color: #e74c3c;
}

.user-dropdown-item.logout-btn:hover {
    background: #fee;
}

.dropdown-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Responsive para menú de usuario integrado en navegación */
@media (max-width: 768px) {
    /* Ocultar texto en modo móvil */
    .nav-user-text {
        display: none;
    }
    
    .nav-link-login {
        padding: 8px 12px;
        font-size: 10px;
    }
    
    .nav-user-icon {
        font-size: 18px;
    }
    
    .nav-user-name {
        display: none;
    }
    
    #nav-user-dropdown .dropdown-content {
        left: auto;
        right: 0;
        min-width: 250px;
    }
    
    .user-dropdown-name-nav {
        font-size: 10px;
    }
    
    .user-dropdown-email-nav {
        font-size: 9px;
    }
}

/* Responsive para menú de usuario (legacy) */
@media (max-width: 768px) {
    .user-menu {
        margin-left: 10px;
    }
    
    .guest-menu .btn-login {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .guest-menu .user-text {
        display: none;
    }
    
    .guest-menu .user-icon {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown {
        right: -10px;
    }
}

/* Responsive para diagnóstico web */
@media (max-width: 768px) {
    .admin-dashboard {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .diagnostic-controls {
        flex-direction: column;
    }
    
    .diagnostic-controls .btn {
        justify-content: center;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .logs-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.zoom-indicator {
    font-size: 10px;
    font-weight: bold;
    color: #666;
    padding: 2px 4px;
    background: #f8f8f8;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
}



/* ===== TARJETAS DE ESPECIES MEJORADAS ===== */
.especie-card {
    border: 2px solid #000;
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.especie-card:hover {
    transform: translateY(-2px);
}

.especie-info {
    margin: 0.75rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.info-label {
    font-weight: 500;
    color: #000;
    min-width: 70px;
}

.info-value {
    color: #000;
    text-align: right;
    flex: 1;
}

.especie-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.feature-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
}

.feature-tag.medicinal {
    background: #f0f0f0;
}

.feature-tag.aves {
    background: #f8f8f8;
}

.feature-tag.polinizador {
    background: #f4f4f4;
}

.flower-color-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #000;
    padding: 0.5rem;
    border-radius: 4px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    z-index: 10;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #000;
    display: inline-block;
}

.color-name {
    font-weight: 500;
    color: #000;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .flower-color-indicator {
        position: static;
        margin-top: 0.5rem;
        display: none;
    }
    
    .especie-card:hover .flower-color-indicator {
        display: flex;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        min-width: auto;
        margin-bottom: 0.1rem;
    }
    
    .info-value {
        text-align: left;
    }
}

/* ===== MODAL DE ESPECIE ===== */
.especie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content-especie {
    background: #fff;
    border: 4px solid #000;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
    font-family: 'JetBrains Mono', monospace;
}

.modal-header-especie {
    background: #000;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-especie h2 {
    margin: 0;
    font-size: 1.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.close-btn {
    background: #fff;
    border: 3px solid #fff;
    color: #000;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.modal-body-especie {
    padding: 1.5rem;
}

.especie-info .info-row {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e0e0e0;
}

.especie-info .label {
    font-weight: 700;
    color: #000;
    min-width: 150px;
    font-family: 'JetBrains Mono', monospace;
}

.especie-info .value {
    color: #000;
    text-align: right;
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
}

.origin-nativo {
    color: #228B22;
    font-weight: 600;
}

.origin-introducido {
    color: #DC143C;
    font-weight: 600;
}

@media (max-width: 768px) {
    .modal-content-especie {
        margin: 0.5rem;
        max-height: 90vh;
    }
    
    .modal-header-especie h2 {
        font-size: 1.1rem;
    }
    
    .modal-body-especie {
        padding: 1rem;
    }
    
    .especie-info .info-row {
        flex-direction: column;
        text-align: left;
    }
    
    .especie-info .value {
        text-align: left;
        margin-top: 0.25rem;
    }
}

/* ===== GLOSARIO DE TÉRMINOS ===== */
.glossary-filter {
    background: #f8f8f8;
    padding: 1.5rem;
    border: 2px solid #000;
    margin-bottom: 2rem;
}

.glossary-filter h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #000;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.letter-btn {
    background: #fff;
    border: 1px solid #000;
    padding: 0.5rem 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.letter-btn:hover {
    background: #333;
    color: #fff;
}

.letter-btn.active {
    background: #000;
    color: #fff;
}

.glossary-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f0f0f0;
    border: 1px solid #ccc;
}

.term-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #333;
}

.terms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.term-card {
    background: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.term-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px #000;
}

.term-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 1rem 0;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

.term-definition {
    color: #000;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.term-reference {
    background-color: #f8f9fa;
    border-left: 4px solid #000;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.term-reference strong {
    color: #2c3e50;
    font-weight: 600;
}

.term-reference em {
    color: #666;
    font-style: normal;
}

.glossary-search {
    margin: 1.5rem 0;
    padding: 0 2rem;
}

.glossary-search .search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
}

.glossary-search .search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.glossary-search .search-input::placeholder {
    color: #999;
    font-style: italic;
}

.term-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.term-letter {
    background: #000;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 1rem;
}

.term-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.term-category {
    background: #f0f0f0;
    color: #666;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    margin-left: auto;
    border: 1px solid #ccc;
}

.term-definition {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.term-examples {
    background: #f8f8f8;
    padding: 1rem;
    border-left: 4px solid #000;
    margin-top: 1rem;
}

.term-examples h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #333;
}

.term-examples ul {
    margin: 0;
    padding-left: 1rem;
}

.term-examples li {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.term-reference {
    background: #f9f9f9;
    padding: 1rem;
    border-left: 4px solid #666;
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.term-reference h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: bold;
}

.term-reference p {
    color: #555;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

.glossary-icon {
    width: 16px;
    height: 16px;
    background: #000;
    display: inline-block;
    position: relative;
}

.glossary-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: #fff;
    top: 7px;
    left: 2px;
}

.glossary-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 12px;
    background: #fff;
    top: 2px;
    left: 7px;
}

/* Responsivo para glosario */
@media (max-width: 768px) {
    .alphabet-filter {
        gap: 0.3rem;
    }
    
    .letter-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .term-card {
        padding: 1rem;
    }
    
    .term-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .term-category {
        margin-left: 0;
    }
    
    .term-name {
        font-size: 1.2rem;
    }
    
    .glossary-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Responsivo para controles de canvas */
@media (max-width: 768px) {
    .canvas-controls {
        top: 5px;
        right: 5px;
        gap: 5px;
    }
    
    .zoom-btn, .tool-btn {
        padding: 4px 6px;
        font-size: 11px;
        min-width: 28px;
    }
    
    .zoom-controls, .view-controls {
        padding: 6px;
    }
}

/* Estados activos para botones de transformación */
.tool-btn.active {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
    color: #1976d2;
}

/* Botón de paneo específico */
.pan-btn.active {
    background: #fff3e0 !important;
    border-color: #ff9800 !important;
    color: #f57c00;
    animation: pulse-pan 1.5s infinite;
}

@keyframes pulse-pan {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Cursor específico para modo paneo */
.canvas-pan-mode {
    cursor: grab !important;
}

.canvas-pan-mode:active {
    cursor: grabbing !important;
}

/* Indicador de modo paneo */
.pan-indicator {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
    border: 1px solid #ffb74d;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos para configuración de terreno mejorada */
.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.input-unit {
    position: absolute;
    right: 12px;
    top: 32px;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

.terrain-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
}

.terrain-info span {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
}

.terrain-size {
    background: #e8f5e8;
    color: #2d5016;
    font-weight: bold;
}

.terrain-scale {
    background: #e3f2fd;
    color: #1565c0;
}

.viewport-info {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}





.ai-render-content {
    background: #fff;
    border: 4px solid #000;
    border-radius: 0;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    overflow-y: auto;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
    font-family: 'JetBrains Mono', monospace;
}

.ai-render-body {
    padding: 20px;
}

/* Estado de carga */
.ai-render-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.render-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border: 2px solid #000;
    border-radius: 0;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #000;
    width: 0%;
    transition: width 0.3s ease;
}

/* Resultado del renderizado */
.render-image-container {
    position: relative;
    margin-bottom: 20px;
}

.render-image-container img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border: 3px solid #000;
    border-radius: 0;
    box-shadow: none;
}

.image-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.image-controls {
    display: flex;
    gap: 10px;
}

.image-controls .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Información del renderizado */
.render-info {
    background: #f0f0f0;
    border: 3px solid #000;
    padding: 15px;
    border-radius: 0;
}

.render-details p {
    margin: 8px 0;
}

.prompt-display {
    background: #fff;
    border: 2px solid #000;
    padding: 10px;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    margin-top: 10px;
    max-height: 100px;
    overflow-y: auto;
}

/* Estado de error */
.ai-render-error {
    text-align: center;
    padding: 40px 20px;
}

.error-content h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

/* Responsivo */
@media (max-width: 768px) {
    .ai-render-content {
        width: 95vw;
        max-height: 95vh;
    }
    
    .ai-render-body {
        padding: 15px;
    }
    
    .image-controls {
        flex-direction: column;
    }
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2d5d31;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.canvas-footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.scale-info {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive para Distribución Espacial */
@media (max-width: 768px) {
    .spatial-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .canvas-wrapper {
        overflow-x: auto;
    }
    
    #terrain-canvas {
        max-width: 100%;
        height: auto;
    }
}

/* ===== ESTILOS PARA ESPECIES SELECCIONADAS ESPACIALES ===== */
.selected-species-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    background: #f9f9f9;
    gap: 0.75rem;
}

.species-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #000;
    flex-shrink: 0;
}

.species-info {
    flex: 1;
    min-width: 0;
}

.species-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #000;
    font-style: italic;
}

.species-details {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.species-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-label {
    font-size: 0.85rem;
    color: #666;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.qty-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.qty-btn:hover {
    background: #f0f0f0;
    color: #000;
}

.quantity-value {
    padding: 0 0.5rem;
    font-weight: 600;
    color: #000;
    min-width: 30px;
    text-align: center;
}

.remove-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #c82333;
}

/* Estilos para desglose de especies */
.species-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.species-breakdown h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #000;
}

.breakdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: #f8f9fa;
    border-radius: 4px;
    gap: 0.5rem;
}

.breakdown-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #000;
    flex-shrink: 0;
}

.breakdown-species {
    flex: 1;
    font-size: 0.85rem;
    color: #000;
    font-style: italic;
}

.breakdown-quantity {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

/* Estilos para leyenda del canvas */
.canvas-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #000;
    flex-shrink: 0;
}

/* Overlay de carga para canvas */
.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive para elementos espaciales */
@media (max-width: 768px) {
    .selected-species-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .species-quantity {
        justify-content: space-between;
    }
    
    .canvas-legend {
        justify-content: center;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
}

/* ===== ICONOS PARA OBJETIVOS Y MOTIVACIONES ===== */
/* Icono de agua/hídrico */
.water-drop-icon {
    width: 40px;
    height: 40px;
    background: none;
    display: inline-block;
    position: relative;
}

.water-drop-icon::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 20px;
    background-color: #000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 0 0 8px 8px;
    box-shadow: 
        0 -4px 0 0 #000,
        -2px -6px 0 0 #000,
        2px -6px 0 0 #000;
}

/* Icono de contaminación/PM2.5 */
.pollution-icon {
    width: 40px;
    height: 40px;
    background: none;
    display: inline-block;
    position: relative;
}

.pollution-icon::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 8px;
    background-color: #000;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    box-shadow: 
        -6px 4px 0 0 #000,
        6px 4px 0 0 #000,
        -10px 8px 0 0 #000,
        10px 8px 0 0 #000,
        0 12px 0 0 #000;
}

/* Icono de CO2/planta */
.carbon-icon {
    width: 40px;
    height: 40px;
    background: none;
    display: inline-block;
    position: relative;
}

.carbon-icon::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 12px;
    background-color: #000;
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    border-radius: 8px 8px 0 0;
    box-shadow: 
        -6px 4px 0 0 #000,
        6px 4px 0 0 #000,
        -4px 8px 0 0 #000,
        4px 8px 0 0 #000;
}

.carbon-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 12px;
    background-color: #000;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
}

/* Icono de sombra/árbol */
.shade-icon {
    width: 40px;
    height: 40px;
    background: none;
    display: inline-block;
    position: relative;
}

.shade-icon::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 10px;
    background-color: #000;
    left: 50%;
    top: 25%;
    transform: translate(-50%, -50%);
    border-radius: 9px 9px 0 0;
    box-shadow: 
        -5px 6px 0 0 #000,
        5px 6px 0 0 #000,
        -8px 12px 0 0 #000,
        8px 12px 0 0 #000;
}

.shade-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 14px;
    background-color: #000;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
}

/* Icono de impacto/mundo */
.world-icon {
    width: 60px;
    height: 60px;
    background: none;
    display: inline-block;
    position: relative;
}

.world-icon::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border: 4px solid #000;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.world-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 4px solid #000;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: 
        linear-gradient(45deg, transparent 30%, #000 30%, #000 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, #000 30%, #000 70%, transparent 70%);
}

/* Social icons */
.email-icon,
.instagram-icon,
.linkedin-icon {
    width: 20px;
    height: 20px;
    background-color: #000;
    display: inline-block;
    position: relative;
}

.email-icon::before {
    content: '@';
    position: absolute;
    color: #fff;
    font-size: 12px;
    left: 6px;
    top: 2px;
    font-weight: bold;
}

.instagram-icon::before {
    content: 'IG';
    position: absolute;
    color: #fff;
    font-size: 8px;
    left: 3px;
    top: 4px;
    font-weight: bold;
}

.linkedin-icon::before {
    content: 'IN';
    position: absolute;
    color: #fff;
    font-size: 8px;
    left: 3px;
    top: 4px;
    font-weight: bold;
}

/* ===== HEADER ===== */
.header {
    background-color: #000;
    color: #fff;
    padding: 1rem 0;
    border-bottom: 3px solid #000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-status {
    font-size: 12px;
    font-weight: 400;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    color: #495057;
}

.connection-status.connected {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.connection-status.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.connection-status.loading {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: #fff;
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 24px;
    background-color: #000;
    left: 8px;
    top: 4px;
    box-shadow: 
        4px 0 0 #000,
        -4px 0 0 #000,
        0 4px 0 #000,
        4px 4px 0 #000,
        -4px 4px 0 #000;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 4px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
    display: block;
}

.nav-link.active {
    border-color: transparent;
    background-color: transparent;
    color: #fff;
}

.nav-link:hover {
    border-color: #fff;
    background-color: #fff;
    color: #000;
    box-shadow: 4px 4px 0 rgba(255,255,255,0.5);
}

.nav-link.active:hover {
    background-color: #000;
    color: #fff;
    border-color: #fff;
}

/* ===== RADAR CHART RESPONSIVE ===== */
.radar-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.radar-container {
    width: 100%;
    max-width: 500px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#species-radar-chart {
    max-width: 400px !important;
    max-height: 400px !important;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .radar-container {
        max-width: 350px;
    }
    
    #species-radar-chart {
        width: 100% !important;
        max-width: 350px !important;
    }
}

@media (max-width: 480px) {
    .radar-container {
        max-width: 280px;
    }
    
    #species-radar-chart {
        max-width: 280px !important;
    }
}

/* ===== FORMULARIO DESPLEGABLE EN CATÁLOGO ===== */
.add-species-section {
    margin: 2rem 0;
    text-align: center;
}

.add-species-form-container {
    background: #f8f8f8;
    border: 2px solid #000;
    border-radius: 0;
    margin: 2rem 0;
    padding: 2rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.add-species-form-container.show {
    animation: slideDown 0.3s ease-out;
}

.add-species-form-container .form-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

.add-species-form-container .form-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: #000;
    margin: 0 0 0.5rem 0;
}

.add-species-form-container .form-header p {
    font-family: 'JetBrains Mono', monospace;
    color: #666;
    margin: 0;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Ajustar estilos del botón de toggle */
#toggle-add-species-btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

#toggle-add-species-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 #000;
}

#toggle-add-species-btn .btn-icon {
    transition: transform 0.2s ease;
}

#toggle-add-species-btn.active .btn-icon {
    transform: rotate(45deg);
}

/* ===== DROPDOWN NAVIGATION ===== */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown.active .dropdown-toggle,
.nav-dropdown:hover .dropdown-toggle {
    background-color: #fff;
    color: #000;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000;
    border: 4px solid #fff;
    border-top: none;
    min-width: 200px;
    z-index: 1000;
    margin-top: -4px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 4px 4px 0 rgba(255,255,255,1);
    font-family: 'JetBrains Mono', monospace;
}

.nav-dropdown:hover .dropdown-content,
.nav-dropdown.active .dropdown-content {
    display: block;
}

.dropdown-link {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    border-bottom: 2px solid #fff;
    border: 3px solid #000;
    margin-bottom: 0.25rem;
}

.dropdown-link:hover {
    background-color: #f0f0f0;
    color: #333;
}

.dropdown-link:hover .btn-icon {
    background-color: #333;
}

.dropdown-link .btn-icon {
    background-color: #fff;
}

.dropdown-link:last-child {
    border-radius: 0;
    margin-bottom: 0;
}

/* ===== SUBMENÚ ANIDADO ===== */
.dropdown-link.has-submenu {
    padding: 0;
    display: block;
    position: relative;
    width: 100%;
}

.submenu-wrapper {
    position: relative;
    width: 100%;
}

.submenu-trigger {
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-link.has-submenu:hover .submenu-trigger {
    background-color: #fff;
    color: #000;
}

.dropdown-link.has-submenu:hover .submenu-trigger .btn-icon {
    background-color: #000;
}

.submenu-trigger .btn-icon {
    background-color: #fff;
}

/* Área de hover extendida para facilitar la navegación al submenu */
.has-submenu {
    position: relative;
}

.has-submenu::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 10px;
    height: 100%;
    background: transparent;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.dropdown-link.has-submenu:hover .submenu-arrow {
    transform: translateX(3px);
}

.submenu {
    display: none;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: calc(100% - 4px);
    top: -2px;
    background-color: #1a1a1a;
    border: 2px solid #fff;
    min-width: 220px;
    z-index: 10001;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.submenu.show,
.dropdown-link.has-submenu:hover .submenu,
.submenu-wrapper:hover .submenu,
.submenu:hover {
    pointer-events: auto;
}

.dropdown-link.has-submenu:hover .submenu,
.submenu-wrapper:hover .submenu,
.submenu:hover,
.has-submenu:hover > .submenu-wrapper > .submenu {
    display: block !important;
    animation: submenuSlide 0.2s ease;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mantener el submenu visible cuando el cursor está entre el trigger y el submenu */
.submenu-trigger:hover ~ .submenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes submenuSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.submenu-link {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.submenu-link:last-child {
    border-bottom: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.submenu-link:hover {
    background-color: #fff;
    color: #000;
}

.submenu-link:hover .btn-icon {
    background-color: #000;
}

.submenu-link .btn-icon {
    background-color: #fff;
    width: 16px;
    height: 16px;
}

/* ===== MAIN ===== */
.main {
    min-height: calc(100vh - 120px);
}

.section {
    display: none;
    padding: 0.5rem 0;
}

.section.active {
    display: block;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 2.5rem 0;
}

.hero-content {
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #000000;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 1.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
    text-align: center;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.stat {
    text-align: center;
    border: 2px solid #000;
    padding: 1.5rem;
    min-width: 150px;
}

.stat-icon {
    margin: 0 auto 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: #000;
    color: #fff;
}

.btn:hover .btn-icon {
    background-color: #fff;
}

.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #fff;
    color: #000;
}

.btn-primary .btn-icon {
    background-color: #fff;
}

.btn-primary:hover .btn-icon {
    background-color: #000;
}

.btn-secondary {
    background-color: #fff;
    color: #000;
}

.btn-filter {
    padding: 0.5rem;
    border: 2px solid #000;
    background-color: #fff;
    cursor: pointer;
}

.btn-filter:hover {
    background-color: #000;
}

.btn-filter:hover .search-icon {
    border-color: #fff;
}

/* Search input group styling */
.search-input-group {
    flex: 1;
}

.search-input-group input {
    width: 100%;
}

/* About section navigation styling */
.navigation-hint {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px solid #000;
    background-color: #f9f9f9;
}

.navigation-hint h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.content-links {
    list-style: none;
    padding: 0;
}

.content-links li {
    margin-bottom: 0.75rem;
}

.content-links a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.5rem;
    border-left: 3px solid #000;
    transition: all 0.2s ease;
}

.content-links a:hover {
    background-color: #000;
    color: #fff;
    padding-left: 1rem;
}

/* About intro section in objectives */
.about-intro-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ccc;
}

.about-intro-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-intro-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

/* Researcher content centered styling */
.researcher-content {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.researcher-profile-centered {
    max-width: 800px;
    width: 100%;
}

/* Grid de dos columnas para equipo */
.researcher-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
}

@media (max-width: 968px) {
    .researcher-grid-two {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.researcher-card-centered {
    background: #f9f9f9;
    border: 2px solid #000;
    padding: 2rem;
    text-align: center;
}

.researcher-card-centered .researcher-image {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.researcher-card-centered .researcher-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #ddd;
    background-image: url('../images/gabriel-acuna.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.researcher-card-centered .researcher-photo.researcher-2 {
    background-image: url('../images/camila-reyes-leonart.jpg');
    background-size: cover;
    background-position: center center;
    object-fit: cover;
}

.researcher-card-centered .researcher-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.researcher-card-centered .researcher-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
}

.researcher-card-centered .researcher-specialty {
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1.5rem;
}

.researcher-card-centered .researcher-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: justify;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.researcher-card-centered .researcher-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.researcher-card-centered .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #000;
    font-weight: 500;
}

.researcher-card-centered .contact-item:hover {
    color: #666;
}

.researcher-card-centered .social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.researcher-card-centered .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.researcher-card-centered .social-link:hover {
    background: #000;
    color: #fff;
}

/* Responsive design for centered researcher */
@media (max-width: 768px) {
    .researcher-content {
        padding: 1rem;
    }
    
    .researcher-card-centered {
        padding: 1.5rem;
    }
    
    .researcher-card-centered .researcher-photo {
        width: 120px;
        height: 120px;
    }
    
    .researcher-card-centered .researcher-name {
        font-size: 1.5rem;
    }
    
    .researcher-card-centered .researcher-description {
        text-align: left;
    }
}

/* Project Analysis Styles */
.project-analysis-container {
    margin: 3rem 0;
    padding: 2rem;
    border: 2px solid #000;
    background: #f9f9f9;
}

.analysis-header {
    text-align: center;
    margin-bottom: 2rem;
}

.analysis-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.analysis-header p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.project-selector-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.project-selector-container label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.project-selector {
    font-family: 'JetBrains Mono', monospace;
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    background: #fff;
    font-size: 0.8rem;
    min-width: 250px;
    cursor: pointer;
}

.project-selector:focus {
    outline: none;
    background: #f0f8ff;
}

.project-selector.project-selected {
    background: #e8f5e8;
    border-color: #27ae60;
    font-weight: 600;
}

.analysis-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.analysis-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background-color: #fff;
    border: 2px solid #000;
    padding: 1rem;
    margin-bottom: 1rem;
}

#projectRadarChart {
    max-width: 400px !important;
    max-height: 400px !important;
    width: 100% !important;
    height: 100% !important;
}

.factor-item, .habit-count, .benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-family: 'JetBrains Mono', monospace;
}

.factor-label {
    font-weight: 500;
    color: #555;
}

.factor-value {
    font-weight: 700;
    color: #2c3e50;
}

.composition-metric h5 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.habit-count, .benefit-item {
    font-size: 0.9rem;
    color: #555;
    justify-content: flex-start;
    gap: 0.5rem;
}

.analysis-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.factor-summary h4,
.species-summary h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

.factor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border-left: 4px solid;
    font-size: 0.9rem;
}

.factor-name {
    font-weight: 600;
}

.factor-value {
    font-weight: 500;
}

.composition-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.composition-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #fff;
    border-radius: 3px;
    font-size: 0.9rem;
}

.composition-label {
    font-weight: 500;
}

.composition-count {
    font-weight: 600;
    color: #007bff;
}

/* Responsive design for project analysis */
@media (max-width: 768px) {
    .project-analysis-container {
        padding: 1rem;
        margin: 2rem 0;
    }
    
    .analysis-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .analysis-chart {
        min-height: 300px;
    }
    
    .analysis-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .factor-grid {
        grid-template-columns: 1fr;
    }
}



/* ===== CONTROLES IMPORTAR/EXPORTAR ===== */
.import-export-controls {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    border: 2px solid #000;
    background-color: #f9f9f9;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.control-group h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.control-group .btn {
    min-width: 160px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* ===== GESTIÓN DE ESPECIES REORGANIZADA ===== */
.species-management-tools {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
    justify-content: space-between;
}

/* Agregar Nueva Especie a la izquierda */
.add-species-group {
    flex: 0 0 auto;
    min-width: 250px;
}

/* Importar y Exportar alineados a la derecha */
.data-management-group {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.import-group,
.export-group {
    flex: 0 0 auto;
}

/* Responsive para gestión de especies */
@media (max-width: 768px) {
    .species-management-tools {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .add-species-group {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .data-management-group {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 1rem;
    }

    
    .import-group,
    .export-group {
        width: 100%;
        max-width: 300px;
    }
}

/* Responsive para especies grid */
/* Responsive para diferentes pantallas */
@media (max-width: 480px) {
    .especies-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .especies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .especies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .especies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        max-width: 800px;
        margin: 0 auto 2rem auto;
    }
}

@media (min-width: 1441px) and (max-width: 1920px) {
    .especies-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
        max-width: 1000px;
        margin: 0 auto 2rem auto;
    }
}

@media (min-width: 1921px) {
    .especies-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
        max-width: 1200px;
        margin: 0 auto 2rem auto;
    }
}

@media (max-width: 768px) {
    
    .species-item {
        padding: 0.75rem;
    }
    
    .species-item-color {
        width: 25px;
        height: 25px;
        margin-left: 0.5rem;
    }
}

.import-buttons,
.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

#import-status {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* ===== FILTROS ===== */
.filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 2px solid #000;
    background-color: #f5f5f5;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 100px;
    flex: 1;
}

.filter-group label {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 0.4rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.7rem;
    min-width: 0;
}

/* Grupo de búsqueda especial */
.search-group {
    min-width: 140px;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ===== CONTENEDOR DEL CATÁLOGO DE ESPECIES ===== */
#especies .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== GRID DE ESPECIES ===== */
.especies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    max-width: 100%;
    justify-items: center;
}

/* ===== MODO HORIZONTAL PARA FILTROS ===== */
.especies-grid.horizontal-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: start;
}

.especie-card {
    border: 2px solid #000;
    padding: 0.5rem;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    max-width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: hidden;
    margin: 0 auto;
}

/* ===== CARDS EN MODO HORIZONTAL ===== */
.especies-grid.horizontal-mode .especie-card {
    width: 100%;
    height: auto;
    min-height: 140px;
    padding: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.especies-grid.horizontal-mode .especie-header {
    flex: 1;
    margin-bottom: 0;
    margin-right: 1rem;
    min-width: 200px;
}

.especies-grid.horizontal-mode .especie-info {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.7rem;
    margin-top: 0;
}

.especies-grid.horizontal-mode .especie-nombre-cientifico {
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.especies-grid.horizontal-mode .especie-nombre-comun {
    font-size: 0.85rem;
    line-height: 1.2;
}

.especie-card:hover {
    background-color: #000;
    color: #fff;
}

/* Cursor personalizado por color de flor */
.especie-card[data-cursor-color] {
    cursor: none;
}

.especie-card[data-cursor-color]:hover {
    cursor: none;
}

/* Cursor personalizado - punto de color */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    border: 2px solid #000;
    display: none;
}

.custom-cursor.active {
    display: block;
}

.especie-header {
    margin-bottom: 0.4rem;
    flex-shrink: 0;
    overflow: hidden;
}

.especie-nombre-cientifico {
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 0.15rem;
    line-height: 1.0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.especie-nombre-comun {
    font-size: 0.6rem;
    color: #666;
    line-height: 1.0;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.especie-card:hover .especie-nombre-comun {
    color: #ccc;
}

.especie-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.55rem;
    margin-top: 0.2rem;
    flex-grow: 1;
    overflow: hidden;
}

.especie-info-item {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    max-height: 1.2rem;
}

.especie-info-label {
    font-weight: 600;
}

/* ===== FORMULARIO ===== */
.form-agregar {
    max-width: 800px;
    margin: 0 auto;
}

.fieldset {
    border: 2px solid #000;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.fieldset legend {
    font-weight: 700;
    padding: 0 1rem;
    background-color: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background-color: #f5f5f5;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== COORDENADAS UTM ===== */
.utm-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px solid #000;
    background-color: #f8f9fa;
}

.utm-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.utm-section h4 i {
    color: #007bff;
}

.utm-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}



.utm-coordinates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.utm-coord {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.utm-input {
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.field-help {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
}







.hidden {
    display: none !important;
}

/* Selector de especies para proyecto nuevo */
.project-species-selector {
    background-color: #f8f9fa;
    border: 2px solid #000;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.project-species-selector .species-selector-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-species-selector .species-dropdown {
    flex: 1;
    min-width: 250px;
}

.project-species-selector .selected-species-list {
    background-color: #fff;
    border: 2px solid #000;
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.species-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #000;
}

.species-list-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.species-list-header small {
    color: #6c757d;
    font-family: 'JetBrains Mono', monospace;
}

.species-list-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.species-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.species-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.species-names {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.scientific-name {
    font-weight: 600;
    font-style: italic;
    color: #000;
}

.common-name {
    font-size: 0.9rem;
    color: #6c757d;
}

.species-details {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.origin-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
}

.origin-badge.nativo {
    background-color: #d4edda;
    color: #155724;
}

.origin-badge.introducido {
    background-color: #fff3cd;
    color: #856404;
}

.origin-badge.unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

.habit-info {
    font-size: 0.8rem;
    color: #495057;
    font-family: 'JetBrains Mono', monospace;
}

.species-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #000;
    background-color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #f8f9fa;
}

.quantity-btn.minus {
    color: #dc3545;
}

.quantity-btn.plus {
    color: #28a745;
}

.quantity-display {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    color: #dc3545;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background-color: #f8d7da;
    border-radius: 3px;
}

/* Responsive para coordenadas UTM */
@media (max-width: 768px) {
    .utm-coordinates-row {
        grid-template-columns: 1fr;
    }
    
    .project-species-selector .species-selector-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .utm-section {
        padding: 1rem;
    }
    
    .btn-utm {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== ENTRADA MANUAL UTM ===== */
/* Google Maps CSS removido - Solo entrada manual */
.maps-search-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px solid #17a2b8;
    background-color: #e3f2fd;
}

.maps-search-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0277bd;
}

.maps-search-section h4 i {
    color: #0277bd;
}

.search-controls {
    margin-bottom: 1.5rem;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    font-size: 0.9rem;
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #007bff;
    background-color: #007bff;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.search-suggestions {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #ddd;
    background-color: #fff;
    display: none;
}

.search-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.suggestion-address {
    font-size: 0.8rem;
    color: #6c757d;
}

.search-status {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #007bff;
    background-color: #cce7ff;
    color: #004085;
    margin-bottom: 1rem;
}

.search-status.success {
    border-color: #28a745;
    background-color: #d4edda;
    color: #155724;
}

.search-status.error {
    border-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

.maps-results {
    margin-bottom: 1.5rem;
}

.maps-results h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #0277bd;
}

.results-container {
    display: grid;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    padding: 1rem;
    border: 2px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.result-item.selected {
    border-color: #28a745;
    background-color: #d4edda;
}

.result-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000;
}

.result-address {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.result-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.result-info span {
    font-family: 'JetBrains Mono', monospace;
}

.mini-map-preview {
    border: 2px solid #28a745;
    background-color: #f8fff9;
    padding: 1.5rem;
}

.mini-map-preview h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #155724;
}

.map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mini-map {
    height: 250px;
    border: 2px solid #000;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.mini-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    text-align: center;
    padding: 2rem;
}

.map-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    padding: 0.5rem;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 0.85rem;
}

.info-item strong {
    color: #495057;
    display: block;
    margin-bottom: 0.25rem;
}

.map-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-map-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-map-action:hover {
    transform: translateY(-1px);
}

.btn-map-action.primary {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.btn-map-action.primary:hover {
    background-color: #1e7e34;
}

.btn-map-action.secondary {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-map-action.secondary:hover {
    background-color: #545b62;
}

/* Responsive para búsqueda de mapas */
@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
    
    .map-container {
        grid-template-columns: 1fr;
    }
    
    .mini-map {
        height: 200px;
    }
    
    .map-actions {
        flex-direction: column;
    }
    
    .btn-map-action {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .maps-search-section {
        padding: 1rem;
    }
    
    .mini-map {
        height: 150px;
    }
    
    .btn-map-action {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 3px solid #000;
    max-width: 800px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive para modal en móvil */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90%;
        border-width: 2px;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .modal-close {
        font-size: 1.25rem;
        padding: 0.25rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        max-height: 95%;
        top: 2.5%;
        transform: translateX(-50%);
    }
    
    .modal-header {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .modal-close {
        position: absolute;
        top: 0.5rem;
        right: 0.75rem;
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.modal-header h3 {
    margin: 0;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.modal-close {
    background: #fff;
    border: 3px solid #fff;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.modal-body {
    padding: 2rem;
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* Responsive para modal detail grid */
@media (max-width: 768px) {
    .modal-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modal-detail-grid {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

.modal-detail-item {
    padding: 1rem;
    border: 2px solid #000;
    background: #f9f9f9;
    border-radius: 0;
}

@media (max-width: 768px) {
    .modal-detail-item {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modal-detail-item {
        padding: 0.5rem;
    }
}

.modal-detail-label {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: #666;
}

.modal-detail-value {
    font-size: 0.9rem;
}

.modal-detail-item.full-width {
    grid-column: 1 / -1;
}

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #000;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BOTONES DE PÁGINA ===== */
.page-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.25rem;
}

.page-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.page-btn.active {
    background-color: #000;
    color: #fff;
}

.page-btn.active:hover {
    background-color: #333;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-text h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-text ul {
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

/* ===== RESEARCHERS SECTION ===== */
.researchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.researcher-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
    transition: all 0.2s ease;
}

.researcher-card:hover {
    background-color: #f9f9f9;
}

.researcher-image {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.researcher-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Placeholder images for researchers - using geometric patterns */
.researcher-1 {
    background: linear-gradient(45deg, #000 25%, transparent 25%), 
                linear-gradient(-45deg, #000 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #000 75%), 
                linear-gradient(-45deg, transparent 75%, #000 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.researcher-2 {
    background-image: url('../images/camila-reyes-leonart.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.researcher-3 {
    background: repeating-linear-gradient(45deg, #000, #000 10px, #fff 10px, #fff 20px);
}

.researcher-4 {
    background: radial-gradient(circle at 30% 30%, #000 20%, transparent 21%), 
                radial-gradient(circle at 70% 70%, #000 20%, transparent 21%),
                #fff;
}

.researcher-info {
    text-align: center;
}

.researcher-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.researcher-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
}

.researcher-specialty {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1rem;
}

.researcher-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.researcher-contact {
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.contact-item:hover {
    color: #666;
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.social-link:hover .social-icon {
    background-color: #666;
}

/* ===== PERFORMANCE DE PROYECTOS SECTION ===== */
.performance-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Layout específico para mapa horizontal */
@media (min-width: 1200px) {
    .performance-dashboard {
        grid-template-columns: 1fr;
        max-width: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }
}

/* Métricas generales */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Responsive para tablets */
@media (max-width: 1024px) {
    .performance-metrics {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1.25rem;
    }
    
    .metric-number {
        font-size: 2.2rem;
    }
}

/* Responsive para móviles grandes */
@media (max-width: 768px) {
    .performance-metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .metric-card {
        padding: 1rem;
        border-width: 1px;
    }
    
    .metric-number {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
}

.metric-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.metric-card:hover {
    background-color: #f9f9f9;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Contenedor del mapa */
.map-container {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
    margin-bottom: 2rem;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.map-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border: 1px solid #000;
}

/* Mapa de Chile */
.chile-map {
    width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
}

.chile-svg {
    width: 100%;
    min-width: 1000px;
    height: 400px;
    border: 2px solid #000;
    background: linear-gradient(180deg, #e3f2fd 0%, #f8f9fa 50%, #e8f5e8 100%);
}

.region {
    fill: #e9ecef;
    stroke: #000;
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.region:hover {
    fill: #dee2e6;
    stroke-width: 2;
}

.region[data-projects="0"] {
    fill: #f8f9fa;
}

.region[data-projects="1"] {
    fill: #ffeaa7;
}

.region[data-projects="2"] {
    fill: #fdcb6e;
}

.region[data-projects="3"] {
    fill: #e17055;
}

.region[data-projects="4"] {
    fill: #d63031;
}

.region[data-projects="5"] {
    fill: #a29bfe;
}

/* Puntos de proyectos */
.project-point {
    cursor: pointer;
    stroke: #000;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.project-point:hover {
    r: 6;
    stroke-width: 3;
}

.high-performance {
    fill: #2ecc71;
}

.medium-performance {
    fill: #f39c12;
}

.development {
    fill: #e74c3c;
}

.project-point.active {
    fill: #000;
    r: 10;
    stroke-width: 4;
    stroke: #fff;
}

/* Líneas de costa */
.coastline {
    stroke: #2196F3;
    stroke-width: 3;
    fill: none;
}

/* Etiquetas de regiones */
.region-label {
    fill: #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    text-anchor: middle;
}

/* Efectos de hover mejorados para mapa horizontal */
.region:hover {
    fill: #dee2e6;
    stroke-width: 3;
    stroke: #2196F3;
}

/* Colores por número de proyectos - mejorados para visibilidad horizontal */
.region[data-projects="0"] {
    fill: #f1f3f4;
}

.region[data-projects="1"] {
    fill: #fff3e0;
}

.region[data-projects="2"] {
    fill: #ffe0b2;
}

.region[data-projects="3"] {
    fill: #ffcc02;
}

.region[data-projects="4"] {
    fill: #ff9800;
}

.region[data-projects="5"] {
    fill: #ff5722;
}

/* Panel de información del proyecto */
.project-info-panel {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
}

.project-info-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.project-info-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-info-header p {
    color: #666;
    font-size: 0.9rem;
}

.project-details {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RENDIMIENTO COMPARATIVO ===== */
.analysis-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.analysis-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Responsive para analysis-controls */
@media (max-width: 768px) {
    .analysis-controls {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .control-section {
        padding: 1.25rem;
        border-width: 1px;
    }
    
    .control-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .analysis-controls {
        gap: 1rem;
    }
    
    .control-section {
        padding: 1rem;
    }
    
    .criteria-select,
    .filter-select {
        padding: 0.6rem;
        font-size: 0.85rem;
        border-width: 1px;
    }
    
    .filter-select[multiple] {
        min-height: 100px;
    }
}

.control-section {
    background-color: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
}

.control-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.criteria-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.criteria-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.criteria-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.criteria-select,
.filter-select {
    padding: 0.75rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.criteria-select:focus,
.filter-select:focus {
    outline: none;
    border-color: #666;
    background-color: #f9f9f9;
}

/* Estilos específicos para filtros de especies múltiples */
.filter-select[multiple] {
    min-height: 120px;
    background-image: none; /* Eliminar flecha dropdown */
    resize: vertical; /* Permitir redimensionar verticalmente */
}

.filter-select[multiple] option {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filter-select[multiple] option:hover {
    background-color: #f0f0f0;
}

.filter-select[multiple] option:checked {
    background-color: #4CAF50;
    color: white;
}

.especies-selected-info {
    margin-top: 0.25rem;
}

.especies-selected-info small {
    color: #666;
    font-style: italic;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.analysis-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* Contenedor del gráfico */
.chart-container {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
}

/* Responsive para chart-container */
@media (max-width: 1024px) {
    .chart-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .chart-container {
        padding: 1rem;
        border-width: 1px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .chart-header h3 {
        font-size: 1.2rem;
    }
    
    /* Asegurar que los canvas de Chart.js sean responsive */
    .chart-container canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 0.75rem;
    }
    
    .chart-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom-width: 1px;
    }
    
    .chart-header h3 {
        font-size: 1.1rem;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000;
}

.chart-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.chart-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.chart-canvas-container {
    position: relative;
    height: 500px;
    margin-bottom: 1rem;
}

#comparison-chart {
    max-width: 100%;
    height: 100% !important;
}

/* Estadísticas del análisis */
.analysis-stats {
    background-color: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background-color: #f9f9f9;
    border: 2px solid #000;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background-color: #f0f0f0;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000;
    word-break: break-word;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Tabla de ranking */
.ranking-container {
    background-color: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
}

.ranking-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.ranking-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ranking-header p {
    color: #666;
    font-size: 0.9rem;
}

.ranking-table-container {
    overflow-x: auto;
    border: 2px solid #000;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ranking-table th,
.ranking-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ranking-table th {
    background-color: #000;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.ranking-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ranking-table tr:hover {
    background-color: #f0f0f0;
}

.ranking-position {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.species-scientific {
    font-style: italic;
    font-weight: 600;
}

.species-common {
    color: #666;
}

.criteria-value,
.combined-score {
    text-align: center;
    font-weight: 600;
}

.combined-score {
    color: #000;
    font-weight: 700;
}

.ranking-row.top-performer {
    background-color: #fffacd !important;
    font-weight: 600;
}

.ranking-row.top-performer:hover {
    background-color: #fff8dc !important;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem !important;
}

/* Ícono para gráficos */
.chart-icon {
    width: 16px;
    height: 16px;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v8H3zm4-6h2v14H7zm4-6h2v20h-2zm4 2h2v18h-2zm4 5h2v13h-2z'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v8H3zm4-6h2v14H7zm4-6h2v20h-2zm4 2h2v18h-2zm4 5h2v13h-2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
}

/* Responsive para análisis */
@media (max-width: 768px) {
    .analysis-controls {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .analysis-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-canvas-container {
        height: 400px;
    }
    
    .ranking-table {
        font-size: 0.8rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.5rem;
    }
}

/* ===== ESTILOS PARA CHECKBOXES Y FILTROS ===== */
.filter-title {
    margin: 1.5rem 0 1rem 0;
    text-align: center;
}

.filter-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-left: 2rem;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #000;
}

.checkbox-label:hover .checkmark {
    background-color: #f9f9f9;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #000;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Responsive para checkboxes */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .checkbox-label {
        font-size: 0.8rem;
        padding-left: 1.75rem;
    }
    
    .checkmark {
        height: 16px;
        width: 16px;
    }
    
    .checkbox-label .checkmark:after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }
}

.project-basic-info {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.project-basic-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-basic-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.project-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.project-metric {
    text-align: center;
    padding: 1rem;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
}

.project-metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.project-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.project-description h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-description p {
    line-height: 1.6;
    color: #444;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 0.75rem 0;
    border-top: 3px solid #000;
}

.footer p {
    font-size: 0.9rem;
}

.landscapelab-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s ease;
}

.landscapelab-link:hover {
    color: #ccc;
    text-decoration: none;
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.loading::after {
    content: '...';
    animation: loading-dots 1s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ===== PROYECTOS DE RENDIMIENTO ===== */
.performance-projects-container {
    margin: 3rem 0;
    padding: 2rem;
    border: 2px solid #000;
    background: #f9f9f9;
}

.projects-header {
    text-align: center;
    margin-bottom: 2rem;
}

.projects-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.projects-header p {
    font-size: 0.9rem;
    color: #666;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: #fff;
    border: 2px solid #000;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #000;
}

.project-card.project-selected {
    border-color: #27ae60;
    border-width: 3px;
    background: #f0fff0;
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 #27ae60;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    margin-right: 1rem;
}

.project-status {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #000;
    white-space: nowrap;
}

.project-status.alto-rendimiento {
    background: #2ecc71;
    color: #fff;
}

.project-status.rendimiento-medio {
    background: #f39c12;
    color: #fff;
}

.project-status.bajo-rendimiento {
    background: #e74c3c;
    color: #fff;
}

.project-location {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-location::before {
    content: "📍";
    font-size: 0.8rem;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

.project-metric {
    text-align: center;
    padding: 0.5rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #007bff;
}

.metric-label {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.25rem;
}

.project-description {
    font-size: 0.8rem;
    color: #333;
    line-height: 1.4;
    margin-top: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== MODAL DE PROYECTO ===== */
.project-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.project-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border: 2px solid #000;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
}

.project-modal-body {
    padding: 2rem;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid #000;
    padding-bottom: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
}

.info-value {
    font-size: 0.9rem;
    color: #000;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metric-card {
    text-align: center;
    padding: 1rem;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.metric-card-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.metric-card-label {
    font-size: 0.8rem;
    color: #666;
}

.project-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    border: 1px solid #ddd;
    background: #fff;
}

.project-details-sections {
    margin-top: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.rich-text-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    padding: 1rem;
    background: #f9f9f9;
    border-left: 4px solid #007bff;
}

.project-modal-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.project-modal-close:hover,
.project-modal-close:focus {
    color: #000;
}

/* Responsive para proyectos */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-info-grid {
        grid-template-columns: 1fr;
    }
    
    .project-chart-container {
        min-height: 250px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .performance-projects-container {
        padding: 1rem;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .project-metrics {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE HERO CENTRADO ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        text-align: center;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
        text-align: center;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 0.5rem;
    }
    
    /* ===== EXTRA SMALL MOBILE ===== */
    .container {
        padding: 0 0.5rem;
    }
    
    .especies-grid {
        grid-template-columns: repeat(auto-fill, 140px);
        gap: 0.75rem;
    }
    
    .especie-card {
        width: 140px;
        height: 140px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .mobile-menu-toggle {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Inputs más grandes para dispositivos táctiles */
    .input-group input,
    .form-input,
    .form-select,
    .form-textarea,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        min-height: 44px;
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    /* Botones más grandes en móvil */
    button,
    .btn,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Submenú en móvil - mostrar debajo en lugar de al lado */
    .submenu {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        box-shadow: none;
        background-color: #000;
    }
    
    .dropdown-link.has-submenu:hover .submenu {
        display: block;
        animation: none;
    }
    
    .submenu-arrow {
        transform: rotate(90deg);
    }
    
    .dropdown-link.has-submenu:hover .submenu-arrow {
        transform: rotate(90deg) translateX(3px);
    }
}

/* ===== NAVEGACIÓN MÓVIL MEJORADA ===== */
.mobile-menu-toggle {
    display: none;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    padding: 0.5rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    font-size: 0.9rem;
}

.mobile-menu-toggle:hover {
    background: #fff;
    color: #000;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        min-height: 44px; /* Tamaño mínimo táctil recomendado */
        padding: 12px 20px;
    }
    
    .header .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        position: relative;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: #000;
        border-top: 3px solid #fff;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        gap: 0;
        flex-direction: column;
        align-items: stretch;
        display: flex;
        background: #000;
        padding: 10px 0;
    }
    
    .nav ul li {
        width: 100%;
        border-bottom: 1px solid #333;
    }
    
    .nav ul li:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid #333;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .nav-dropdown:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .nav-link {
        color: #fff;
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 44px;
        border: 1px solid #333;
        margin-bottom: 0.5rem;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        border: 1px solid #333;
        border-top: none;
        margin-top: 0;
        background: #000;
        padding: 0;
    }
    
    .nav-dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown-link {
        color: #ccc;
        padding: 0.5rem 1rem;
        display: block;
        border-bottom: 1px solid #222;
    }
    
    .dropdown-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-link:hover {
        background: #222;
        color: #fff;
    }
    
    /* ===== FORMULARIOS RESPONSIVE ===== */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .fieldset {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 1rem;
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .filters {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-group {
        min-width: auto;
        gap: 0.15rem;
    }
    
    .filter-group label {
        font-size: 0.6rem !important;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        font-size: 0.65rem !important;
        padding: 0.35rem !important;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .especies-grid {
        grid-template-columns: repeat(auto-fill, 160px);
        gap: 1rem;
        justify-content: center;
    }
    
    .especie-card {
        width: 160px;
        height: 160px;
        padding: 0.4rem;
        overflow: hidden;
    }
    
    .especie-nombre-cientifico {
        font-size: 0.6rem !important;
    }
    
    .especie-nombre-comun {
        font-size: 0.55rem !important;
    }
    
    .especie-info {
        font-size: 0.5rem !important;
        gap: 0.03rem !important;
    }
    
    /* Modo horizontal en mobile */
    .especies-grid.horizontal-mode {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .especies-grid.horizontal-mode .especie-card {
        width: 100%;
        height: auto;
        min-height: 100px;
        padding: 0.75rem;
        flex-direction: row;
        align-items: center;
    }
    
    .especies-grid.horizontal-mode .especie-header {
        min-width: 140px;
        margin-right: 0.75rem;
    }
    
    .especies-grid.horizontal-mode .especie-info {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        font-size: 0.6rem;
    }
    
    .especies-grid.horizontal-mode .especie-nombre-cientifico {
        font-size: 0.85rem;
    }
    
    .especies-grid.horizontal-mode .especie-nombre-comun {
        font-size: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .import-export-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        align-items: stretch;
    }
    
    .import-buttons,
    .export-buttons {
        align-items: stretch;
    }
    
    .researchers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .researcher-card {
        padding: 1.5rem;
    }
    
    .researcher-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Métricas en móviles pequeños */
    .performance-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .metric-card {
        padding: 0.75rem;
    }
    
    .metric-number {
        font-size: 1.6rem;
        margin-bottom: 0.25rem;
    }
    
    .metric-label {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .map-container {
        padding: 1rem;
    }
    
    .map-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .map-legend {
        justify-content: center;
    }
    
    .chile-map {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .chile-svg {
        min-width: 800px;
        height: 300px;
    }
    
    .region-label {
        font-size: 9px;
    }
    
    .project-info-panel {
        padding: 1rem;
    }
    
    .project-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .project-metric {
        padding: 0.75rem;
    }
}

/* ===== MEJORAS ESPECÍFICAS MÓVIL PARA PERFORMANCE ===== */
@media (max-width: 768px) {
    /* Botones más grandes para táctil */
    .btn, .filter-btn, .analysis-btn, .generate-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Espaciado mejorado entre elementos */
    .section {
        padding: 2rem 0;
    }
    
    /* Contenedor principal responsive */
    .container {
        padding: 0 1rem;
    }
    
    /* Headers de sección */
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    /* Ajustes para pantallas muy pequeñas */
    .btn, .filter-btn, .analysis-btn, .generate-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Formularios más amigables para móvil */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Tablas responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 300px;
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
    }
}

/* ===== MEJORAS DE ACCESIBILIDAD MÓVIL ===== */
@media (max-width: 768px) {
    /* Mejor contraste para elementos interactivos */
    .metric-card:hover, .control-section:hover {
        background-color: #f5f5f5;
        border-color: #333;
    }
    
    /* Mejor espaciado para touch */
    .criteria-group {
        margin-bottom: 1rem;
    }
    
    .criteria-group label {
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Selects más grandes para móvil */
    .criteria-select, .filter-select {
        min-height: 44px;
        font-size: 16px; /* Previene zoom en iOS */
    }
}

/* ===== SCROLL SUAVE PARA NAVEGACIÓN MÓVIL ===== */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }
    
    /* Asegurar que los elementos no se corten */
    .performance-dashboard > * {
        margin-bottom: 1rem;
    }
    
    .performance-dashboard > *:last-child {
        margin-bottom: 0;
    }
}

/* ===== UTILIDADES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }



/* ===== SECCIÓN PROBLEMA ===== */
.problema-content {
    padding: 40px 0;
}

/* ===== ANÁLISIS MÚLTIPLES ===== */
.analysis-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive para analysis-controls-grid */
@media (max-width: 768px) {
    .analysis-controls-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .analysis-controls-grid {
        gap: 10px;
        margin-bottom: 15px;
    }
}

.control-section {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
}

.control-section h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.btn-generate {
    width: 100%;
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-generate:hover {
    background: #0056b3;
}

.chart-container-combined {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
    margin-bottom: 30px;
}

.analysis-stats-combined {
    margin-top: 20px;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

/* ===== DIRECTORIO DE PAISAJISTAS ===== */
.directory-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.directory-header {
    margin-bottom: 40px;
    text-align: center;
}

.directory-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.directory-header p {
    font-size: 1.1rem;
    color: #000;
}

.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar de filtros */
.filters-sidebar {
    background: #fff;
    border: 4px solid #000;
    padding: 24px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #000;
}

.filters-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.filter-reset {
    background: #fff;
    border: 3px solid #000;
    color: #000;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 6px 12px;
    transition: all 0.2s;
}

.filter-reset:hover {
    background: #000;
    color: #fff;
}

.filter-section {
    margin-bottom: 28px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section h3::before {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.filter-section.collapsed h3::before {
    transform: rotate(-90deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 4px;
}

.filter-section.collapsed .filter-options {
    display: none;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #000;
}

.filter-option label {
    font-size: 0.95rem;
    cursor: pointer;
    flex: 1;
    line-height: 1.4;
}

.filter-option:hover label {
    font-weight: 700;
}

/* Resultados */
.results-container {
    background: #fff;
    border: 4px solid #000;
    padding: 24px;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #000;
    flex-wrap: wrap;
    gap: 16px;
}

.results-count {
    font-size: 1.1rem;
    font-weight: 600;
}

.results-count strong {
    color: #000;
    font-weight: 700;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 400px;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 3px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    border-radius: 0;
    background: #fff;
}

.search-bar button {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: 3px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(0,0,0,1);
}

.search-bar button:hover {
    background: #fff;
    color: #000;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,1);
}

/* Grid de profesionales */
.professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.professional-card {
    background: #fff;
    border: 4px solid #000;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
}

.professional-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 rgba(0,0,0,1);
}

.professional-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.professional-logo {
    width: 60px;
    height: 60px;
    background: #000;
    border: 3px solid #000;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.professional-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.professional-location {
    font-size: 0.85rem;
    color: #000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.professional-services {
    margin-bottom: 16px;
}

.professional-services h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #000;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tag {
    padding: 4px 10px;
    background: #fff;
    border: 2px solid #000;
    font-size: 0.75rem;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
}

.professional-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    background: #000;
    color: #fff;
    border: 3px solid #000;
}

.badge.commercial {
    background: #000;
    color: #fff;
    border: 3px solid #000;
}

.badge.residential {
    background: #fff;
    color: #000;
    border: 3px solid #000;
}

.badge.certified {
    background: #000;
    color: #fff;
    border: 3px solid #000;
}

.badge.spanish {
    background: #fff;
    color: #000;
    border: 3px solid #000;
}

.professional-footer {
    display: flex;
    gap: 10px;
}

.contact-btn {
    flex: 1;
    padding: 10px;
    background: #000;
    color: #fff;
    border: 3px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border-radius: 0;
}

.contact-btn:hover {
    background: #fff;
    color: #000;
}

.view-profile-btn {
    flex: 1;
    padding: 10px;
    background: #fff;
    color: #000;
    border: 3px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border-radius: 0;
}

.view-profile-btn:hover {
    background: #000;
    color: #fff;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 3px solid #000;
}

.pagination-btn {
    padding: 10px 16px;
    background: #fff;
    border: 3px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: #000;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .directory-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .directory-header h1 {
        font-size: 2rem;
    }
    
    .professionals-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar {
        max-width: 100%;
        width: 100%;
    }
    
    .professional-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .directory-container {
        padding: 20px 10px;
    }
    
    .directory-header h1 {
        font-size: 1.6rem;
    }
    
    .filters-sidebar,
    .results-container,
    .professional-card {
        padding: 16px;
    }
}

.stats-grid-combined {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-group {
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 4px;
    background: #f8f9fa;
}

.stat-group-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-card-mini {
    text-align: center;
    padding: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 3px;
}

.stat-number-mini {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.stat-label-mini {
    font-size: 10px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .analysis-controls-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.placeholder-content {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.placeholder-content h3 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 500;
}

.placeholder-content p {
    color: #6c757d;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== ICONOS DE REDES SOCIALES FIJOS ===== */
.social-icons-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.social-icon-fixed {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #000;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-icon-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon-inner {
    width: 24px;
    height: 24px;
    position: relative;
    background-color: #000;
}

/* Facebook Icon */
.facebook-icon-fixed::before {
    content: 'f';
    position: absolute;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: serif;
}

.facebook-fixed:hover .facebook-icon-fixed {
    background-color: #4267B2;
}

.facebook-fixed:hover {
    border-color: #4267B2;
}

/* Instagram Icon */
.instagram-icon-fixed::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 4px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.instagram-icon-fixed::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.instagram-fixed:hover .instagram-icon-fixed {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.instagram-fixed:hover {
    border-color: #e6683c;
}

/* LinkedIn Icon */
.linkedin-icon-fixed::before {
    content: 'in';
    position: absolute;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-transform: lowercase;
}

.linkedin-fixed:hover .linkedin-icon-fixed {
    background-color: #0077B5;
}

.linkedin-fixed:hover {
    border-color: #0077B5;
}

/* Responsive para mobile */
@media (max-width: 768px) {
    .social-icons-fixed {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .social-icon-fixed {
        width: 45px;
        height: 45px;
    }
    
    .social-icon-inner {
        width: 20px;
        height: 20px;
    }
    
    .facebook-icon-fixed::before {
        font-size: 14px;
    }
    
    .instagram-icon-fixed::before {
        width: 14px;
        height: 14px;
    }
    
    .instagram-icon-fixed::after {
        width: 5px;
        height: 5px;
    }
    
    .linkedin-icon-fixed::before {
        font-size: 9px;
    }
}

/* ===== GENERADOR DE CRITERIOS ===== */
.criteria-generator-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.criteria-filters-panel,
.criteria-results-panel {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
}

.criteria-filters-panel h3,
.criteria-results-panel h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

.filter-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.filter-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.5rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.filter-select,
.filter-input {
    padding: 0.75rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #666;
    background-color: #f9f9f9;
}

.criteria-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #000;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.results-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.results-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.criteria-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.criteria-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    align-items: center;
}

.criteria-item:hover {
    background-color: #f0f0f0;
    border-color: #000;
}

.criteria-item-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.criteria-scientific {
    font-size: 1rem;
    font-weight: 700;
    font-style: italic;
    color: #000;
}

.criteria-common {
    font-size: 0.9rem;
    color: #666;
}

.criteria-value {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.criteria-value-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: normal;
    display: block;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #333;
}

.no-results p {
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Lista compacta para muchos resultados */
.criteria-list.compact .criteria-item {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 0.75rem;
    font-size: 0.85rem;
}

.criteria-list.compact .criteria-scientific {
    font-size: 0.9rem;
}

.criteria-list.compact .criteria-common {
    font-size: 0.8rem;
}

/* Responsive para generador de criterios */
@media (max-width: 768px) {
    .criteria-generator-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .criteria-filters-panel,
    .criteria-results-panel {
        padding: 1.5rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .criteria-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .criteria-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
    
    .criteria-value {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .criteria-value:last-child {
        border-bottom: none;
    }
}

/* ===== ESTILOS PARA TARJETAS DE RESULTADOS CRITERIOS ===== */
.criteria-result-card {
    background: #fff;
    border: 2px solid #000;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.criteria-result-card:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.result-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.result-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    font-style: italic;
}

.result-common-name {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
    font-weight: 500;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.result-label {
    font-weight: 600;
    color: #000;
    min-width: 80px;
    font-size: 0.9rem;
}

.result-value {
    color: #333;
    font-weight: 500;
    text-align: right;
    font-size: 0.9rem;
}

/* Colores para origen en resultados */
.result-value.origin-nativo {
    color: #228B22;
    font-weight: 600;
}

.result-value.origin-endémico {
    color: #FF8C00;
    font-weight: 600;
}

.result-value.origin-exótico {
    color: #DC143C;
    font-weight: 600;
}

.result-value.origin-introducido {
    color: #DC143C;
    font-weight: 600;
}

/* Responsive para resultados */
@media (max-width: 768px) {
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .criteria-result-card {
        padding: 0.75rem;
    }
    
    .result-header h4 {
        font-size: 1rem;
    }
    
    .result-row {
        padding: 0.2rem 0;
    }
    
    .result-label,
    .result-value {
        font-size: 0.85rem;
    }
}

/* ===== ESTILOS PARA SECCIÓN PROBLEMÁTICA ===== */
.objectives-motivations {
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.8;
}

.objectives-motivations h2 {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #000;
    border-bottom: 3px solid #000;
    padding-bottom: 1rem;
}

.motivation-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border: 2px solid #000;
    background-color: #f9f9f9;
}

.motivation-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #000;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.75rem;
    margin: -2rem -2rem 1.5rem -2rem;
}

.motivation-section p {
    margin-bottom: 1.2rem;
    text-align: justify;
    font-size: 1rem;
    color: #333;
}

.motivation-section p:last-child {
    margin-bottom: 0;
}

.motivation-section p strong {
    background-color: #fffacd;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 700;
}

.indicators-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border: 2px solid #000;
    background-color: #fff;
}

.indicators-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.75rem;
    margin: -2rem -2rem 1.5rem -2rem;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.indicator-item {
    border: 2px solid #000;
    padding: 1.5rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.indicator-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.indicator-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.indicator-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000;
}

.indicator-item p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.objectives-section {
    margin-bottom: 3rem;
}

.objectives-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #000;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.75rem;
}

.main-objective {
    border: 3px solid #000;
    padding: 2rem;
    background-color: #e8f5e8;
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
}



.specific-objectives {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.objective-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 2px solid #000;
    background-color: #fff;
    transition: all 0.2s ease;
}

.objective-item:hover {
    background-color: #f8f9fa;
}

.objective-number {
    background-color: #000;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.objective-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    color: #333;
}

.impact-section {
    margin-bottom: 2rem;
}

.impact-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.75rem;
}

.impact-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    border: 3px solid #000;
    background-color: #f0f8ff;
}

.impact-icon {
    font-size: 4rem;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
}

.impact-content p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
    color: #333;
}

.impact-content p:last-child {
    margin-bottom: 0;
}

.impact-content p strong {
    background-color: #fffacd;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 700;
}

/* Responsive para problemática */
@media (max-width: 768px) {
    .objectives-motivations h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .motivation-section,
    .indicators-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .motivation-section h3,
    .indicators-section h3,
    .objectives-section h3,
    .impact-section h3 {
        font-size: 1.2rem;
        margin: -1.5rem -1.5rem 1rem -1.5rem;
    }
    
    .indicators-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .indicator-item {
        padding: 1rem;
    }
    
    .indicator-icon {
        font-size: 2rem;
    }
    
    .main-objective {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .objective-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    .objective-number {
        align-self: center;
    }
    
    .objective-item p {
        text-align: justify;
    }
    
    .impact-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        text-align: center;
    }
    
    .impact-icon {
        font-size: 3rem;
        width: 60px;
        height: 60px;
    }
    
    .impact-content p {
        text-align: justify;
    }
    
    /* Ajustes de iconos en mobile */
    .water-drop-icon,
    .pollution-icon,
    .carbon-icon,
    .shade-icon {
        width: 32px;
        height: 32px;
        transform: scale(0.8);
    }
    
    .world-icon {
        width: 48px;
        height: 48px;
        transform: scale(0.8);
    }
    
    .indicator-icon {
        height: 48px;
    }
}

/* ===== SECCIÓN NUEVO PROYECTO ===== */
.new-project-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.project-creation-form {
    background-color: #fff;
    border: 2px solid #000;
    padding: 2rem;
}



.form-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.form-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    background-color: #000;
    padding: 0.75rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    text-align: center;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
}

.species-form-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 2px solid #000;
    background-color: #fff;
}

.species-form-group h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    background-color: #000;
    padding: 0.5rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.form-input,
.form-select {
    padding: 0.75rem;
    border: 2px solid #000;
    background-color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #666;
    background-color: #f9f9f9;
}

.form-input.required,
.form-select.required {
    border-left: 4px solid #e74c3c;
}

.form-input.required:focus,
.form-select.required:focus {
    border-left-color: #2ecc71;
}

/* Checkboxes personalizados */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-left: 2rem;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #000;
}

.checkbox-label:hover .checkbox-custom {
    background-color: #f9f9f9;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background-color: #000;
}

.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
}

.checkbox-label .checkbox-custom:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Botones de acción */
.project-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #000;
}



/* Responsive para nuevo proyecto */
@media (max-width: 768px) {
    .new-project-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-creation-form,
    .existing-projects {
        padding: 1.5rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
        padding: 1rem;
    }
    
    .form-section h3 {
        margin: -1rem -1rem 1rem -1rem;
        font-size: 1.1rem;
    }
    
    .species-form-group {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .species-form-group h4 {
        margin: -1rem -1rem 1rem -1rem;
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .checkbox-row {
        gap: 0.5rem;
    }
    
    .project-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .project-actions-small {
        justify-content: center;
    }
}