/**
 * Miglioramenti Incrementali CSS - TurismoItalia
 * Version: 2.0
 * 
 * Miglioramenti estetici mantenendo il design attuale
 */

/* ==========================================================================
   LEGENDA MAPPA COLORATA - Marker per categoria
   ========================================================================== */

.ti-map-legend {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 15px;
}

.ti-map-legend-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.ti-map-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ti-map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
}

.ti-map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Colori specifici per categoria */
.ti-map-legend-dot.cat-eventi { background: #F44336; }
.ti-map-legend-dot.cat-monumenti { background: #8B4513; }
.ti-map-legend-dot.cat-musei { background: #9C27B0; }
.ti-map-legend-dot.cat-parchi { background: #4CAF50; }
.ti-map-legend-dot.cat-sagre { background: #FF9800; }
.ti-map-legend-dot.cat-terme { background: #00BCD4; }
.ti-map-legend-dot.cat-luoghi { background: #2196F3; }

/* ==========================================================================
   CARD HOVER MIGLIORATO - Effetti più fluidi
   ========================================================================== */

.ti-card,
.ti-province-card,
.ti-evento-card,
.ti-monumento-card,
.ti-museo-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ti-card:hover,
.ti-province-card:hover,
.ti-evento-card:hover,
.ti-monumento-card:hover,
.ti-museo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* ==========================================================================
   BADGE CATEGORIA - Indicatori visivi colorati
   ========================================================================== */

.ti-category-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.ti-category-badge.cat-eventi {
    background: #F44336;
    color: #fff;
}

.ti-category-badge.cat-monumenti {
    background: #8B4513;
    color: #fff;
}

.ti-category-badge.cat-musei {
    background: #9C27B0;
    color: #fff;
}

.ti-category-badge.cat-parchi {
    background: #4CAF50;
    color: #fff;
}

.ti-category-badge.cat-sagre {
    background: #FF9800;
    color: #fff;
}

.ti-category-badge.cat-luoghi {
    background: #2196F3;
    color: #fff;
}

/* ==========================================================================
   HEADER TRICOLORE - Accent italiano sottile
   ========================================================================== */

.ti-tricolor-line {
    height: 4px;
    background: linear-gradient(90deg, 
        #009246 0%, #009246 33.33%, 
        #fff 33.33%, #fff 66.66%, 
        #ce2b37 66.66%, #ce2b37 100%);
    border-radius: 2px;
    margin: 15px 0;
}

.ti-tricolor-border {
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, #009246, #fff, #ce2b37) 1;
}

/* ==========================================================================
   SEZIONE TITOLI - Più impattanti
   ========================================================================== */

.ti-section-title-enhanced {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.ti-section-title-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #009246, #4caf50);
    border-radius: 2px;
}

.ti-section-title-enhanced .emoji {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* ==========================================================================
   PULSANTI CTA - Più prominenti
   ========================================================================== */

.ti-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #009246 0%, #00a651 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,146,70,0.3);
}

.ti-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,146,70,0.4);
    background: linear-gradient(135deg, #00a651 0%, #00b95c 100%);
    color: #fff;
}

.ti-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #009246;
    border: 2px solid #009246;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ti-btn-secondary:hover {
    background: #009246;
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   MAPPA CONTAINER - Bordi arrotondati e ombra
   ========================================================================== */

.ti-map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border: 3px solid #e9ecef;
}

.ti-map-container .leaflet-container {
    border-radius: 10px;
}

/* ==========================================================================
   LOADING SPINNER - Più elegante
   ========================================================================== */

.ti-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.ti-loading-spinner::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #009246;
    border-radius: 50%;
    animation: ti-spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes ti-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   BREADCRUMB MIGLIORATO
   ========================================================================== */

.ti-breadcrumb-enhanced {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    font-size: 14px;
}

.ti-breadcrumb-enhanced a {
    color: #009246;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ti-breadcrumb-enhanced a:hover {
    color: #006633;
    text-decoration: underline;
}

.ti-breadcrumb-enhanced .separator {
    color: #ccc;
    font-size: 12px;
}

.ti-breadcrumb-enhanced .current {
    color: #666;
    font-weight: 600;
}

/* ==========================================================================
   CAROUSEL NAVIGATION - Frecce più visibili
   ========================================================================== */

.ti-carousel-nav button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #009246;
    background: #fff;
    color: #009246;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ti-carousel-nav button:hover {
    background: #009246;
    color: #fff;
    transform: scale(1.1);
}

/* ==========================================================================
   ANIMAZIONI INGRESSO
   ========================================================================== */

@keyframes ti-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ti-animate-in {
    animation: ti-fadeInUp 0.6s ease-out forwards;
}

.ti-stagger-1 { animation-delay: 0.1s; }
.ti-stagger-2 { animation-delay: 0.2s; }
.ti-stagger-3 { animation-delay: 0.3s; }
.ti-stagger-4 { animation-delay: 0.4s; }

/* ==========================================================================
   RESPONSIVE MIGLIORAMENTI
   ========================================================================== */

@media (max-width: 768px) {
    .ti-map-legend-items {
        flex-direction: column;
        gap: 8px;
    }
    
    .ti-btn-primary,
    .ti-btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .ti-section-title-enhanced {
        font-size: 1.5rem;
    }
}
