/* Importazione font Google */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Variabili CSS */
:root {
    --primary-color: #FFD700;
    --secondary-color: #6C757D;
    --dark-color: #4A4A4A;
    --light-color: #F7F7F7;
    --accent-color: #FFC107;
}

/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Navbar personalizzata */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

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

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

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

.nav-link:hover::after {
    width: 80%;
}

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

/* Bottoni */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #333 !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #FFC107;
    border-color: #FFC107;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-dark {
    background-color: #333;
    border-color: #333;
    color: white !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-dark:hover {
    background-color: #4A4A4A;
    border-color: #4A4A4A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e0e0 100%);
    padding-top: 80px;
}

.hero-section h1 {
    color: var(--secondary-color);
    animation: fadeInUp 1s ease;
}

.hero-section p {
    animation: fadeInUp 1.2s ease;
}

.hero-section .btn {
    animation: fadeInUp 1.4s ease;
}

.hero-section img {
    animation: fadeInRight 1s ease;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Cards Servizi */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.service-icon i {
    font-size: 3.5rem;
}

.card {
    border-radius: 15px;
    overflow: hidden;
}

.card-body {
    position: relative;
}

/* Offcanvas personalizzato */
.offcanvas {
    width: 400px !important;
}

.offcanvas-header {
    padding: 1.5rem;
}

.offcanvas-body {
    padding: 1.5rem;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.1);
}

/* Accordion FAQ */
.accordion-button {
    font-weight: 500;
    color: var(--dark-color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: #333;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Statistiche */
.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
    background-color: var(--primary-color) !important;
    color: #333;
}

.stat-box:hover h3,
.stat-box:hover p {
    color: #333 !important;
}

/* Sezione CTA */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
    color: #333 !important;
}

/* Portfolio Prima/Dopo */
.before-after-card {
    transition: all 0.3s ease;
}

.before-after-card:hover {
    transform: translateY(-5px);
}

.before-after-container img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.before-after-container img:hover {
    transform: scale(1.05);
}

/* Processo di Lavoro */
.process-step {
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.process-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #333;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.step-icon i {
    font-size: 2.5rem;
}

/* Testimonianze */
.testimonial-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-color);
}

.avatar-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.testimonial-card .bi-star-fill {
    font-size: 1.2rem;
}

/* Certificazioni */
.cert-card {
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.cert-card i {
    transition: transform 0.3s ease;
}

.cert-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Footer */
footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Page Hero */
.page-hero {
    padding-top: 100px;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Responsive */
@media (max-width: 768px) {
    .offcanvas {
        width: 100% !important;
    }

    .navbar-brand img {
        height: 80px !important;
    }

    .hero-section {
        padding-top: 120px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .service-icon i {
        font-size: 2.5rem;
    }

    .page-hero {
        min-height: 30vh;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #FFC107;
}

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

/* Effetto parallasse per le immagini */
.img-fluid {
    transition: transform 0.5s ease;
}

.img-fluid:hover {
    transform: scale(1.02);
}

/* Badge e etichette */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Navbar scrolled */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

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

/* Animazione per gli elementi che entrano nella viewport */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Overlay menu */
.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Miglioramenti tipografici */
.display-4, .display-5 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.lead {
    font-weight: 400;
    line-height: 1.8;
}

/* Icone social */
footer a i {
    transition: all 0.3s ease;
}

footer a:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Form focus states */
.form-control:focus,
.form-select:focus {
    outline: none;
}

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
