:root {
    /* Light theme colors */
    --primary: 13 110 253; /* #0d6efd */
    --secondary: 108 117 125; /* #6c757d */
    --success: 25 135 84; /* #198754 */
    --info: 13 202 240; /* #0dcaf0 */
    --warning: 255 193 7; /* #ffc107 */
    --danger: 220 53 69; /* #dc3545 */
    --light: 248 249 250; /* #f8f9fa */
    --dark: 33 37 41; /* #212529 */
    --white: 255 255 255; /* #ffffff */
    
    /* Background colors */
    --bs-body-bg: hsl(0 0% 100%);
    --bs-body-color: hsl(210 11% 15%);
    --card-bg: hsl(0 0% 100%);
    --navbar-bg: hsl(0 0% 100%);
    --footer-bg: hsl(210 11% 15%);
    
    /* Text colors */
    --text-primary: hsl(rgb(var(--primary)));
    --text-muted: hsl(210 8% 62%);
    --text-white: hsl(0 0% 100%);
    
    /* Border colors */
    --border-color: hsl(210 14% 89%);
    
    /* Shadow */
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

[data-bs-theme="dark"] {
    /* Dark theme colors */
    --bs-body-bg: hsl(210 11% 15%);
    --bs-body-color: hsl(210 17% 95%);
    --card-bg: hsl(210 9% 26%);
    --navbar-bg: hsl(210 9% 18%);
    --footer-bg: hsl(210 11% 10%);
    
    --text-muted: hsl(210 8% 65%);
    --border-color: hsl(210 6% 35%);
    
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}



/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Main content offset for fixed navbar */
.main-content {
    padding-top: 0px;
}

/* Navigation Styles */
.navbar {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: opacity 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: rgb(var(--primary)) !important;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid rgb(var(--primary));
    color: rgb(var(--primary));
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgb(var(--primary));
    color: white;
    transform: scale(1.1);
}



/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(var(--primary), 0.1) 0%, rgba(var(--primary), 0.05) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(var(--primary), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--info), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(var(--success), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(var(--primary), 0.2));
}

/* Service Cards */
.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary), 0.3);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary), 0.1), rgba(var(--primary), 0.05));
    border-radius: 1rem;
}

.service-icon img {
    width: 50px;
    height: 50px;
}

.service-card h4 {
    color: var(--bs-body-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
    background-color: rgb(var(--primary));
    border-color: rgb(var(--primary));
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: rgba(var(--primary), 0.9);
    border-color: rgba(var(--primary), 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
}

.btn-outline-primary {
    color: rgb(var(--primary));
    border-color: rgb(var(--primary));
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: rgb(var(--primary));
    border-color: rgb(var(--primary));
    color: white;
    transform: translateY(-2px);
}

/* Stats Section */
.stat-item {
    padding: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(var(--primary), 0.1), rgba(var(--primary), 0.05));
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(var(--primary));
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background-color: var(--footer-bg) !important;
    border-top: 1px solid var(--border-color);
}

.footer h5,
.footer h6 {
    color: var(--text-white);
    font-weight: 600;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--text-white);
}

.social-links a {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    color: rgb(var(--primary)) !important;
}

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

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

/* Form Styles */
.form-control,
.form-select {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--card-bg);
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 0.2rem rgba(var(--primary), 0.25);
    color: var(--bs-body-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

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

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(var(--primary), 0.2);
    color: var(--bs-body-color);
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary), 0.25);
}

/* Hero Section Spacing */
.hero-section {
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
}

/* Company Logo */
.company-logo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    max-width: 180px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    filter: none;
    transition: all 0.3s ease;
}

/* Logo theme adaptations */
[data-bs-theme="light"] .company-logo {
    filter: invert(1) brightness(0) contrast(100%);
}

[data-bs-theme="dark"] .company-logo {
    filter: none;
}

.company-logo:hover {
    transform: scale(1.02) translateZ(0);
    -webkit-transform: scale(1.02) translateZ(0);
    -moz-transform: scale(1.02) translateZ(0);
}

[data-bs-theme="light"] .company-logo:hover {
    filter: invert(1) brightness(0) contrast(100%);
}

[data-bs-theme="dark"] .company-logo:hover {
    filter: none;
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .company-logo {
        max-width: 140px;
        max-height: 90px;
    }
}

@media (max-width: 480px) {
    .company-logo {
        max-width: 120px;
        max-height: 80px;
    }
}

/* Image Slider Section */
.image-slider-section {
    margin: 0;
    padding: 0;
}

/* Custom Image Slider Styles */
.image-slider-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    max-height: 70vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background-color: var(--bs-body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-slider {
    position: relative;
    width: 100%;
    height: auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
}

.slide-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    filter: contrast(1.1) saturate(1.1);
    transition: all 0.3s ease;
    display: block;
    max-height: 70vh;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 0;
}

.placeholder-content {
    text-align: center;
}

.placeholder-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-content h4 {
    margin-bottom: 0.5rem;
}

/* Indicatori minimali */
.slider-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.5);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Controlli di navigazione */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.slider-nav.prev {
    left: 15px;
}

.slider-nav.next {
    right: 15px;
}

/* Responsive adjustments for custom slider */
@media (max-width: 768px) {
    .image-slider-container {
        min-height: 250px;
    }
    
    .placeholder-content h4 {
        font-size: 1.2rem;
    }
    
    .placeholder-content p {
        font-size: 0.9rem;
    }
    
    .placeholder-content i {
        font-size: 3rem !important;
    }
    
    .slider-nav {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .image-slider-container {
        min-height: 200px;
    }
    
    .placeholder-content h4 {
        font-size: 1rem;
    }
    
    .placeholder-content p {
        font-size: 0.8rem;
    }
    
    .placeholder-content i {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .slider-nav {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .slider-nav.prev {
        left: 10px;
    }
    
    .slider-nav.next {
        right: 10px;
    }
}

/* Contact icons fix */
.icon-wrapper {
    flex-shrink: 0 !important;
    min-width: 50px !important;
    min-height: 50px !important;
}

.icon-wrapper i {
    font-size: 1.2rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Specific fix for clock icon */
.icon-wrapper .bi-clock {
    font-size: 1.1rem !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .image-slider-container {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0 !important;
    }
}

/* Pride Mode Styles */
[data-pride-mode="true"] .navbar {
    background: var(--pride-gradient) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

[data-pride-mode="true"] .navbar-brand,
[data-pride-mode="true"] .nav-link,
[data-pride-mode="true"] .navbar-toggler-icon {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

[data-pride-mode="true"] .nav-link:hover,
[data-pride-mode="true"] .nav-link.active {
    color: #ffed00 !important;
    font-weight: bold;
}

[data-pride-mode="true"] .btn-primary {
    background: var(--pride-gradient);
    border: none;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

[data-pride-mode="true"] .btn-primary:hover {
    background: linear-gradient(135deg, 
        var(--pride-purple) 0%, 
        var(--pride-blue) 16.66%, 
        var(--pride-green) 33.33%, 
        var(--pride-yellow) 50%, 
        var(--pride-orange) 66.66%, 
        var(--pride-red) 100%);
    transform: scale(1.05);
}

[data-pride-mode="true"] .service-card:hover {
    border-color: var(--pride-red);
    box-shadow: 0 0 20px rgba(228, 3, 3, 0.3);
}

[data-pride-mode="true"] .service-icon {
    background: var(--pride-gradient);
}

[data-pride-mode="true"] .service-icon img {
    filter: brightness(0) invert(1);
}

[data-pride-mode="true"] .hero-title {
    background: var(--pride-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

[data-pride-mode="true"] .footer {
    background: linear-gradient(135deg, 
        rgba(228, 3, 3, 0.9) 0%, 
        rgba(255, 140, 0, 0.9) 16.66%, 
        rgba(255, 237, 0, 0.9) 33.33%, 
        rgba(0, 128, 24, 0.9) 50%, 
        rgba(0, 76, 255, 0.9) 66.66%, 
        rgba(115, 41, 130, 0.9) 100%);
}

[data-pride-mode="true"] .theme-toggle,
[data-pride-mode="true"] .pride-toggle {
    color: white !important;
}

.pride-toggle {
    font-size: 1.5rem;
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.pride-toggle:hover {
    color: #ff1493;
    transform: scale(1.1);
}

[data-pride-mode="true"] .pride-toggle {
    color: #ffed00 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

[data-pride-mode="true"] .pride-toggle:hover {
    color: white !important;
    transform: scale(1.2);
}
