/* === RUTA CAFETERA FUSAGASUGÁ - ESTILOS === */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====== PANTALLA COMPLETA ====== */
.ruta-cafetera-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #8B4513, #D2B48C);
}

/* ====== MENÚ MÓVIL ====== */
.ruta-mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #8B4513;
    border-radius: 50px;
    font-size: 24px;
    color: #8B4513;
    cursor: pointer;
    padding: 12px 16px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    transition: all 0.3s ease;
}

.ruta-mobile-menu-toggle:hover {
    background: #8B4513;
    color: white;
    transform: scale(1.1);
}

.ruta-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ruta-mobile-menu-overlay.active {
    opacity: 1;
}

.ruta-mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #F5F5DC 0%, #FFF8DC 100%);
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    border-left: 4px solid #8B4513;
}

.ruta-mobile-menu.active {
    right: 0;
}

.ruta-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
    border-bottom: 2px solid #8B4513;
    background: white;
}

.ruta-mobile-menu-logo {
    font-size: 18px;
    font-weight: 700;
    color: #8B4513;
}

.ruta-mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #8B4513;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.ruta-mobile-menu-close:hover {
    color: #D2B48C;
    transform: rotate(90deg);
}

.ruta-mobile-menu-items {
    padding: 30px 0;
}

.ruta-mobile-menu-items a {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.ruta-mobile-menu-items a:hover {
    background: rgba(139, 69, 19, 0.1);
    padding-left: 35px;
}

.ruta-header {
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.ruta-header h1 {
    font-size: 2.5rem;
    color: #8B4513;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.ruta-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.progress-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-bar {
    background: #e0e0e0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    background: linear-gradient(45deg, #8B4513, #D2B48C);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat {
    padding: 0.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B4513;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.map-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-section h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

#rutaCafeteraMap {
    height: 500px;
    border-radius: 10px;
    border: 3px solid #8B4513;
}

.controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ruta-btn {
    background: linear-gradient(45deg, #8B4513, #D2B48C);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ruta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-panel {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-panel h3 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.route-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.route-item:hover {
    border-color: #8B4513;
    background: #f9f9f9;
}

.route-item.completed {
    border-color: #28a745;
    background: #d4edda;
}

.route-item.active {
    border-color: #8B4513;
    background: #fff3e0;
}

.route-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.route-details h4 {
    color: #8B4513;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.route-details p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.weather-widget {
    background: linear-gradient(45deg, #87CEEB, #98FB98);
    color: white;
    text-align: center;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.tips-panel {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 1rem;
}

.tips-panel h4 {
    color: #e65100;
    margin-bottom: 0.5rem;
}

.tip-item {
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
}

.close:hover {
    background: #f0f0f0;
    color: #333;
}

.achievement-badge {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Leaflet custom styles */
.custom-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.custom-popup .leaflet-popup-content {
    margin: 1rem;
    line-height: 1.4;
}

.popup-header {
    font-weight: bold;
    color: #8B4513;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.popup-details {
    color: #666;
    margin-bottom: 1rem;
}

.popup-actions {
    text-align: center;
}

.popup-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0.2rem;
}

.popup-btn:hover {
    background: #A0522D;
}

/* Responsive */
@media (max-width: 768px) {
    .ruta-mobile-menu-toggle {
        display: block;
    }
    
    .ruta-header {
        padding: 1rem;
    }
    
    .ruta-header h1 {
        font-size: 2rem;
    }

    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        order: -1;
    }

    #rutaCafeteraMap {
        height: 400px;
    }

    .controls {
        justify-content: center;
    }

    .ruta-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
}