/* ========================================
   PUBLIC.CSS - Stili per pagine pubbliche
   ======================================== */

/* Reset e stili base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

/* Banner comuni */
.banner-header {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.banner-corse-header,
.banner-percorsi-header {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-banner {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Card comuni */
.corsa-card,
.percorso-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.corsa-card:hover,
.percorso-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Stati delle card corse */
.corsa-evidenza {
    border-left-color: #dc3545 !important;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

/* Stati delle card percorsi - AGGIORNATO CON MARATONA E MEZZA MARATONA */
.percorso-card {
    border-left: 4px solid #28a745;
}

.percorso-evidenza {
    border-left-color: #dc3545 !important;
    background-color: #fff5f5;
}

/* NUOVI TIPI PERCORSO */
.percorso-maratona {
    border-left-color: #007bff !important;
}

.percorso-mezza-maratona {
    border-left-color: #28a745 !important;
}

.percorso-allenamento {
    border-left-color: #ffc107 !important;
}

.percorso-gara {
    border-left-color: #007bff !important;
}

.percorso-turistico {
    border-left-color: #17a2b8 !important;
}

.percorso-ludico-motoria {
    border-left-color: #6c757d !important;
}

.percorso-competitiva {
    border-left-color: #6f42c1 !important;
}

/* Badge e indicatori */
.distanza-badge {
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-radius: 25px;
    padding: 8px 16px;
}

.prezzo-badge {
    font-size: 0.9em;
    font-weight: bold;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-radius: 15px;
    padding: 4px 8px;
}

.percorso-badge {
    background: linear-gradient(45deg, #e9ecef, #f8f9fa);
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 5px;
    display: inline-block;
    transition: all 0.2s;
}

.percorso-badge:hover {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    transform: scale(1.05);
}


/* Badge per percorsi senza nome */
.percorso-card .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    margin: 2px;
}

.percorso-card .mb-3 .badge {
    font-size: 1rem;
    padding: 8px 15px;
}



/* Badge per admin - AGGIORNATO CON NUOVI COLORI */
.tipo-badge.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.tipo-badge.bg-purple {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* Sezioni filtri */
.filter-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Loading states */
.loading-select {
    position: relative;
}

.loading-select::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Contenuti collassabili */
.collapse-content {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    margin-top: 15px;
    background: rgba(0,123,255,0.02);
    border-radius: 8px;
    padding: 20px;
}

.info-item {
    margin-bottom: 8px;
}

.info-item i {
    width: 20px;
    color: #6c757d;
}

/* Percorsi specifici */
.corsa-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.download-gpx {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Paginazione */
.pagination-wrapper {
    margin-top: 30px;
}

/* Footer */
footer {
    margin-top: 50px;
}

/* Info page styles */
.info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.step-number {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 20px;
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-item {
    display: flex;
    align-items: start;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.checklist-item {
    background: white;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: all 0.2s;
}

.checklist-item:hover {
    background: #f8fff9;
    border-left-color: #20c997;
}

.checklist-item i {
    color: #28a745;
    margin-right: 10px;
}

.warning-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffecb5;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-card h5 {
    color: #007bff;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.app-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
}

.app-item:hover {
    background: #007bff;
    color: white;
    transform: scale(1.05);
}

/* Contatti page styles */
.contact-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
}

.contact-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card .card-body {
    padding: 30px;
    text-align: center;
}

.contact-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-col {
        margin-top: 30px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .info-section {
        padding: 20px;
    }
    
    .contact-section {
        padding: 20px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 15px;
    }
}