:root {
    --primary-color: #255317;
    --secondary-color: #367335;
    --accent-color: #79a1b3;
    --dark-color: #010008;
    --light-color: #dbe3dc;
    --success-color: #285c29;
    --warning-color: #FFC107;
    --error-color: #F44336;
}

body {
    font-family: 'GMX-Regular', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

main {
    padding: 30px 0;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .app-container {
        grid-template-columns: 350px 1fr;
    }
}

.control-panel {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--light-color);
    border-left: 4px solid var(--primary-color);
}

.info-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.control-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn i {
    margin-right: 8px;
}

#map-container {
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
}

#map {
    height: 100%;
    width: 100%;
}

.result-panel {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.result-panel.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.district-info {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.district-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.district-details h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.district-details p {
    color: #666;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    margin-top: 10px;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.alert.error {
    background-color: #FFEBEE;
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
    display: block;
}

.alert.success {
    background-color: #E8F5E9;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
    display: block;
    animation: fadeIn 0.5s;
}

footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-links a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 5px;
}

.district-popup {
    text-align: center;
    padding: 10px;
}

.district-popup h3 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.district-popup p {
    margin: 5px 0;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 5px;
}

.badge.federal {
    background-color: #E3F2FD;
    color: #1976D2;
}

.badge.local {
    background-color: #E0F2F1;
    color: #00897B;
}

/* Media Queries para diferentes tamaños de pantalla */
@media (max-width: 768px) {
    .logos {
        display: flex;
        align-items: center; 
        justify-content: flex-start;
        gap: 10px;
        padding: 0; 
    }
    
    .logo img {
        max-width: 60px;
    }
    
    .title {
        margin-left: 0;
        width: 200px;
    }
    
    nav ul {
        padding: 0 2%;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    nav ul li a {
        font-size: 0.8rem;
    }

    footer {
        grid-template-columns: 1fr;
    }
    
    .link-media, .social-media {
        width: 100%;
    }

    #map-container {
        height: 600px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: block;
    }
    
    #map {
        height: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logos {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;        
    }
    
    .title {
        width: 180px;
    }
    
    nav ul li {
        margin: 5px;
        list-style: none;
    }
    
    nav ul li a {
        font-size: 0.7rem;
        list-style: none;
    }
    
    #map-container {
        height: 600px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: block;
    }
    
    #map {
        height: 100%;
        width: 100%;
    }
}