/* Map of Italy - Main Stylesheet */

:root {
    --primary-color: #2B5AA0;
    --secondary-color: #1E3A8A;
    --success-color: #059669;
    --warning-color: #D97706;
    --danger-color: #DC2626;
    --info-color: #0EA5E9;
    --light-color: #F8FAFC;
    --dark-color: #1E293B;
    --purple-color: #7C3AED;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.btn-purple {
    background-color: var(--purple-color);
    border-color: var(--purple-color);
    color: white;
}

.btn-purple:hover {
    background-color: #6D28D9;
    border-color: #6D28D9;
    color: white;
}

.text-purple {
    color: var(--purple-color) !important;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    min-height: 100vh;
    /* Fallback background - Italian landscape SVG */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('/assets/images/italy-backup-bg.svg');
    /* Main background - High quality Italian Tuscany landscape photo */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2066&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-buttons .btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-stats {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Map Area Styles */
.map-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.map-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    background: white;
}

.italy-map {
    height: 600px;
    width: 100%;
    border-radius: 15px;
}

.map-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.map-controls .btn {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-controls .btn:hover {
    background: rgba(255,255,255,1) !important;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: rgba(0,0,0,0.2) !important;
}

.map-controls .btn-primary,
.map-controls .btn-success {
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #333 !important;
}

.map-controls .btn-primary:hover,
.map-controls .btn-success:hover {
    background: rgba(255,255,255,1) !important;
    border-color: rgba(0,0,0,0.2) !important;
    color: #000 !important;
}

/* City Information Panel */
.city-info-panel {
    position: sticky;
    top: 100px;
}

.city-info-panel .card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
}

.city-info-panel .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Feature Card Styles */
.features-section {
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Content Card Styles */
.content-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: none;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.content-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.content-card:hover .card-img-top {
    transform: scale(1.05);
}

/* CTA Section Styles */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(43, 90, 160, 0.25);
}

.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Custom Map Marker Styles */
.custom-marker {
    background: transparent !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.custom-marker i {
    color: var(--primary-color);
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
    transform-origin: center bottom;
}

.custom-marker:hover i {
    transform: scale(1.2);
    color: var(--danger-color);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

/* Fix marker position offset issue */
.leaflet-marker-icon {
    margin-left: -20px !important;
    margin-top: -40px !important;
}

/* Highlight Effect */
.custom-marker.highlighted i {
    color: var(--warning-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Map Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.leaflet-popup-content {
    margin: 15px;
}

.popup-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    margin: -15px -15px 15px -15px;
    border-radius: 15px 15px 0 0;
}

.popup-header h5 {
    margin: 0;
    font-weight: bold;
}

.popup-content {
    max-height: 300px;
    overflow-y: auto;
}

.popup-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.popup-buttons .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Achievement Badge Styles */
.achievement-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
    margin: 0.25rem;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        min-height: 80vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .italy-map {
        height: 400px;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .city-info-panel {
        position: relative;
        top: auto;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .map-controls {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem;
        justify-content: center;
    }
    
    .map-controls .btn {
        background: rgba(255,255,255,0.95) !important;
        color: #333 !important;
        border: 1px solid rgba(0,0,0,0.15) !important;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Tooltip Styles */
.tooltip-inner {
    background-color: var(--primary-color);
    border-radius: 8px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--primary-color);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* User Avatar in Navbar */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
}

/* User Dropdown Enhancement */
#navbarUser .dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
    min-width: 200px;
}

#navbarUser .dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

#navbarUser .dropdown-item:hover {
    background-color: #f8f9fa;
}

#navbarUser .dropdown-item.active {
    background-color: #007bff;
    color: white;
}

#navbarUser .dropdown-divider {
    margin: 0.5rem 0;
}

/* Right-click Context Menu Styles */
.context-menu {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    animation: contextMenuShow 0.2s ease-out;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    color: #333;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.context-menu-item:active {
    background-color: #e9ecef;
}

.context-menu-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 5px 0;
}

@keyframes contextMenuShow {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Network Error Banner Styles */
.network-error-banner {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Keyboard Shortcuts Styles */
.keyboard-shortcuts {
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    margin-top: 15px;
}

.keyboard-shortcuts kbd {
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Virtual Content Styles */
.virtual-content {
    position: relative;
    opacity: 0.95;
}

.virtual-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 0.5rem;
    pointer-events: none;
    z-index: 1;
}

.virtual-content .card-body {
    position: relative;
    z-index: 2;
}

.virtual-content:hover {
    transform: translateY(-3px);
    opacity: 1;
}

/* Special styles for example content */
.virtual-content .badge.bg-info {
    background-color: rgba(59, 130, 246, 0.8) !important;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Enhanced CTA Section Styles */
.bg-light.rounded-4 {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Enhanced Content Card Hover Effects */
.content-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Like button styles for virtual content */
.virtual-content .btn-outline-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced Animation Effects */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .virtual-content .badge.bg-info {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}
