/* DigitCom SRLS - Custom Styles */

:root {
    --primary-color: #fa5f2b;
    --primary-dark: #e54d1f;
    --dark: #232323;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --gradient: linear-gradient(135deg, #fa5f2b 0%, #ff8c42 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(250, 95, 43, 0.2);
}

/* Override Bootstrap Primary */
.btn-primary-custom {
    background: var(--gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 12px 30px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--gradient);
    color: white;
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

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

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

.bg-primary-custom {
    background: var(--gradient) !important;
    color: white;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #fff 0%, #fef5f2 100%);
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--dark);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.custom-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    margin: 0 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #fff 0%, #fef5f2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Spazio per la navbar fixed */
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.05;
    animation: float 20s infinite ease-in-out;
}

.hero-particles::before {
    top: -150px;
    right: -150px;
}

.hero-particles::after {
    bottom: -150px;
    left: -150px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 3px solid var(--primary-color);
    border-radius: 60px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 6px;
    height: 10px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    border-radius: 3px;
    animation: wheel 2s infinite;
}

@keyframes wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-20px); }
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.ai-icon-main {
    width: 100px;
    height: 100px;
    background: var(--gradient);
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Portfolio Cards */
.portfolio-card {
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.portfolio-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(250, 95, 43, 0.1) 0%, rgba(255, 140, 66, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Stats */
.stat-card {
    background: var(--light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.counter {
    display: inline-block;
}

/* Contact */
.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(250, 95, 43, 0.1) 0%, rgba(255, 140, 66, 0.1) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Form Styling */
.form-floating > .form-control {
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(250, 95, 43, 0.25);
}

.form-select {
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    padding: 0.75rem;
    height: calc(3.5rem + 2px);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(250, 95, 43, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert-custom-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #b1dfbb;
    color: #155724;
}

.alert-custom-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f1aeb5;
    color: #721c24;
}

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

/* Responsive */
@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    
    .hero-section {
        padding: 100px 0 50px;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .display-1 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}