:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #ecf0f1;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo {
    max-height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.btn-login {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-login:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Search Section */
.search-section {
    background-color: white;
    padding: 2rem 0;
    border-bottom: 1px solid #dee2e6;
}

.search-container {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.search-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-search {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    color: white;
}

/* Results Section */
.results-section {
    padding: 3rem 0;
    min-height: 400px;
}

.table {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-ficha {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-ficha:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    color: white;
}

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
}

.iniciativa-detalle {
    padding: 1rem;
}

.detalle-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.detalle-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.detalle-value {
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Badge Styles */
.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.badge.bg-info {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f1c40f, #d4ac0d) !important;
}

/* Map Styles */
#map {
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-container {
    margin-top: 1rem;
}

.map-alert {
    background-color: #fff3cd;
    border: 2px solid #ffeeba;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: #856404;
}

.leaflet-control-attribution {
    font-size: 0.8rem;
    background: rgba(255,255,255,0.8);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    bottom: 10px;
    right: 10px;
}

.leaflet-marker-icon {
    transition: transform 0.2s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

/* Result Counter */
.result-count-container {
    display: flex;
    justify-content: flex-start;
}

#resultCount {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    border: none;
    display: inline-flex;
    align-items: center;
}

#resultCount i {
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.2rem;
    }
    
    .search-container {
        padding: 1rem;
    }
    
    .search-container h2 {
        font-size: 1.4rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-ficha {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    #resultCount {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
}