/* ===========================================
   VARIABILI E RESET
============================================= */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e67e22;
    --light: #f9f9f9;
    --dark: #333333;
    --gray: #7f8c8d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Transizioni di scroll dolci */
    scroll-padding-top: 100px; /* Compensazione per header fisso */
}

/* body: non nascondere più il cursore di sistema globalmente */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Nascondi il cursore di sistema solo quando il cursore custom è attivo */
body.custom-cursor-active {
    cursor: none;
}

/* Stile base per il cursore custom */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.06s linear, opacity 0.12s linear;
    will-change: transform;
    display: block;
    background: var(--primary);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.15);
    opacity: 1;
}

/* mantieni pointer sugli elementi interattivi */
a, button, [role="button"], input, textarea { cursor: pointer !important; }


h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary);
}

h1 {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 0.5rem;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

h3 {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.2px;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 3px; /* Meno arrotondato per flat */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400; /* Meno pesante */
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: white;
}

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: #d35400;
}



/* ===========================================
   CUSTOM CURSOR
============================================= */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: transform 0.1s ease-out, background-color 0.2s ease;
}

/* Hover su link/bottone: ingrandisco il cursore e cambio colore */
a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
.btn:hover ~ .custom-cursor {
    transform: translate(-50%, -50%) scale(2);
    background-color: rgba(230, 126, 34, 0.3);
}


/* ===========================================
   HEADER + NAV
============================================= */
header {
    background-color: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300; /* Ultra-light come gli altri titoli */
    font-size: 1.2rem;
    color: white;
    letter-spacing: -0.2px; /* Letter-spacing negativo moderno */
    text-transform: uppercase;
    line-height: 1.1;
}

.logo-profession {
    font-family: 'Montserrat', sans-serif; /* Stesso font per coerenza */
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 1.2px; /* Spaziatura più ampia per eleganza */
    font-weight: 300; /* Light weight */
    margin-top: 2px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300; /* Light come tutto il resto */
    font-size: 0.85rem;
    color: white;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.8px; /* Più spaziato per flat design */
    padding: 0.5rem 0;
    transition: var(--transition);
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}


/* ===========================================
   HERO SECTION
============================================= */
.hero {
    height: 100vh;
    background-image:
        linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)),
        url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 80px; /* Compensa l'header fisso */
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-slider .hero-content h1 {
    font-size: 3.5rem;
    font-weight: 200;
    letter-spacing: -1px;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
}

.hero-slider .hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* ===========================================
   SERVICES SECTION
============================================= */
.services {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-weight: 300;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

.section-header h2:after {
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.service-content p {
    margin-bottom: 1.5rem;
    color: var(--dark);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 300;
}


/* ===========================================
   ABOUT SECTION (wide box + bottone a sinistra)
============================================= */
.about {
    padding: 3rem 0;
    background-color: var(--light);
    text-align: center;
}

.about-box {
    width: 100%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2.5rem 2rem;
    animation: fadeIn 1s ease forwards;
    text-align: left;
}

.about-box h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-align: center;
}

.about-box p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.8;
}

.about-box .about-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.about-box .info-item {
    display: flex;
    align-items: center;
}

.about-box .info-item i {
    color: var(--accent);
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.about-box .info-item span {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--dark);
}

/* Bottone “Scopri di più” allineato a sinistra */
.about-box .btn {
    margin-top: 1rem;
    margin-left: 0;
}

/* ===========================================
   TESTIMONIALS SECTION - SLIDING ELEGANTE
============================================= */
.testimonials {
    padding: 3rem 0;
    background-color: var(--light);
    text-align: center;
}

.testimonial-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.testimonial-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 800%; /* 8 slide = 900% */
}

.testimonial-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2.5rem 2rem;
    text-align: center;
    width: 12.5%; /* 100% / 8 slide */
    flex-shrink: 0;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 1.3rem;
    color: var(--grey);
    line-height: 1.7;
    font-weight: 300;
}

.testimonial-text:before,
.testimonial-text:after {
    content: '"';
    font-size: 2rem;
    color: var(--secondary);
    opacity: 0.3;
}

.testimonial-author .testimonial-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--primary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0.3;
}

.testimonial-dot.active {
    background: var(--accent);
    opacity: 1;
    transform: scale(1.0);
}

/* ===========================================
   CONTACT SECTION (wide box)
============================================= */
.contact {
    padding: 5rem 0;
    background-color: var(--light);
    text-align: center;
}

.contact-box {
    width: 100%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: left;
}

.contact-item-box {
    display: flex;
    align-items: flex-start;
}

.contact-item-box i {
    color: var(--accent);
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.3rem;
}

.contact-item-box .contact-text h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.contact-item-box .contact-text p {
    color: var(--dark);
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}


/* ===========================================
   FOOTER
============================================= */
footer {
    background-color: var(--primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}

.footer-social {
    display: inline-flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-social li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: white;
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social li a:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-3px);
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-copyright {
        font-size: 0.75rem;
        text-align: center;
        line-height: 1.4;
    }
    
    .footer-content {
        gap: 1rem;
    }
}

/* ===========================================
   RESPONSIVE - MENU MOBILE FISSO
============================================= */
@media (max-width: 992px) {
    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        z-index: 1001;
        padding: 0.5rem;
    }

    #mainNav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(44, 62, 80, 0.98);
        backdrop-filter: blur(10px);
        transition: right 0.4s ease;
        z-index: 1000;
        padding-top: 100px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
    }

    #mainNav.active {
        right: 0 !important;
    }

    #mainNav ul {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0;
    }

    #mainNav ul li {
        margin: 0;
        text-align: left;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #mainNav ul li a {
        display: block;
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
        border-bottom: none;
        width: 100%;
    }

    #mainNav ul li a:after {
        display: none;
    }

    #mainNav ul li a:hover {
        background: rgba(255,255,255,0.1);
        color: var(--accent);
    }
}

/* Desktop - nascondi toggle */
@media (min-width: 993px) {
    .mobile-toggle {
        display: none !important;
    }
    
    #mainNav {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
}

/* Overlay per chiudere il menu mobile */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 993px) {
    .nav-overlay {
        display: none !important;
    }
}

/* ===========================================
   ANIMAZIONI
============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   HERO SLIDER
============================================= */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slider::before {
    /* sovrapposizione semi-trasparente per maggiore contrasto testo */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.5);
    z-index: 1;
}

/* Contenuto (testo + bottone) sopra lo slider */
.hero-slider .hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    color: white;
    padding-left: 1.5rem;
}

.hero-slider .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease forwards;
}

.hero-slider .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.2s;
}

.hero-slider .hero-buttons {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.4s;
}

/* ===========================================
   EDITING PAGE STYLES
============================================= */


/* Expertise Section */
.expertise {
    padding: 4rem 0;
    background-color: var(--light);
}

.expertise-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.expertise-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 300;
}

.highlight-link {
    color: var(--secondary);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.highlight-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.expertise-highlight {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.highlight-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 200;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.highlight-label {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Company Services */
.company-services {
    padding: 4rem 0;
    background: var(--light);
}

.services-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.service-category {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-category h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.3px;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 300;
    color: var(--dark);
    line-height: 1.6;
}

.service-list i {
    color: var(--accent);
    margin-right: 1rem;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: #d35400;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-editing h1 {
        font-size: 2.2rem;
    }
    
    .expertise-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-categories {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid-editing .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Page Hero per pagine interne */
.page-hero {
    padding: 6rem 0 3rem 0;
    margin-top: 80px;
    background-color: var(--light);
    text-align: center;
}

.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: -0.8px;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.page-hero p {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--dark);
    max-width: 700px;
    margin: 0 auto;
}

/* ===========================================
   STATS SIMPLE - NUMERI EDITING
============================================= */
.stats-simple {
    padding: 3rem 0;
    background-color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 200;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* ===========================================
   MOBILE HERO SLIDER FIX
============================================= */
@media (max-width: 768px) {
    .hero-slider {
        height: 70vh; /* Riduci altezza su mobile */
        min-height: 500px;
    }
    
    .hero-slider .hero-content {
        padding: 1rem;
        text-align: center; /* Centra su mobile */
    }
    
    .hero-slider .hero-content h1 {
        font-size: 2.2rem; /* Più piccolo su mobile */
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-slider .hero-content p {
        font-size: 1rem; /* Più piccolo su mobile */
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero-slider .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-slider .hero-content p {
        font-size: 0.9rem;
    }
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Spazio tra logo e testo */
}

.logo-image {
    height: 40px; /* Altezza del logo */
    width: auto;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo-image {
        height: 32px; /* Più piccolo su mobile */
    }
    
    .logo {
        gap: 0.5rem;
    }
}


/* Transizione semplice e veloce */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}
/* ===========================================
   EDITING ARTICLES PAGE STYLES
============================================= */
.filters-section {
    padding: 1rem 0;
    background-color: white;
    border-bottom: 1px solid #eee;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--gray);
    background: white;
    color: var(--dark);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

/* ===========================================
   EDITING ARTICLES PAGE STYLES - PARTE MANCANTE
============================================= */

.year-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.year-btn {
    padding: 0.3rem 0.8rem;
    background: white;
    border: 1px solid var(--gray);
    color: var(--dark);
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.year-btn:hover,
.year-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(230,126,34,0.3);
}

.articles-section {
    padding: 2.5rem 0;
    background-color: var(--light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 1;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.8), rgba(52,152,219,0.8));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-info h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.article-badge {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-btn {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.download-btn:hover {
    background: white;
    color: var(--primary);
    transform: scale(1.1);
}

.year-card .article-overlay {
    background: linear-gradient(135deg, rgba(230,126,34,0.9), rgba(211,84,0,0.9));
    opacity: 1;
    justify-content: center;
}

.year-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 2px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.next-year-card .article-overlay {
    background: linear-gradient(135deg, rgba(127,140,141,0.9), rgba(52,73,94,0.9));
    opacity: 1;
}

.page-navigation {
    padding: 1.5rem 0;
    background: white;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.nav-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Responsive per la pagina articoli */
@media (max-width: 768px) {
    .filter-controls {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.75rem;
    }

    .year-navigation {
        gap: 0.4rem;
    }

    .year-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================================
   SCROLL TO TOP BUTTON
============================================= */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4);
}

/* Responsive scroll to top */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}
/* ===========================================
   AGGIUNTE/MODIFICHE CSS PER MOBILE + OPERA MOBILE
============================================= */

/* Nascondi cursor personalizzato su dispositivi touch */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none;
    }
    
    body {
        cursor: auto !important;
    }
}

/* Fix specifici per Opera Mobile */
@supports (-webkit-appearance: none) {
    .mobile-toggle {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Modifiche al bottone hamburger per touch */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    /* Ottimizzazioni per touch e Opera Mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    /* Fix Opera Mobile */
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    position: relative;
    z-index: 1002;
}

.mobile-toggle:active,
.mobile-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

/* Fix per Opera Mobile - prevenire zoom su double tap */
.mobile-toggle,
.nav-overlay,
#mainNav ul li a {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

/* Aggiornamenti al responsive menu */
@media (max-width: 992px) {
    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        z-index: 1001;
        padding: 0.5rem;
        /* Ottimizzazioni touch specifiche per mobile e Opera */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        min-width: 44px;
        min-height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        /* Fix specifici Opera Mobile */
        -webkit-appearance: none;
        appearance: none;
        outline: none;
        position: relative;
        z-index: 1002;
    }

    .mobile-toggle:active,
    .mobile-toggle:focus,
    .mobile-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
        outline: none;
    }

    #mainNav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(44, 62, 80, 0.98);
        backdrop-filter: blur(10px);
        transition: right 0.4s ease;
        z-index: 1000;
        padding-top: 100px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        /* Migliora lo scrolling su iOS e Opera Mobile */
        -webkit-overflow-scrolling: touch;
        /* Fix Opera Mobile */
        will-change: transform;
        transform: translateZ(0);
    }

    #mainNav.active {
        right: 0 !important;
        /* Force repaint per Opera Mobile */
        transform: translateZ(0);
    }

    #mainNav ul {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0;
    }

    #mainNav ul li {
        margin: 0;
        text-align: left;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #mainNav ul li a {
        display: block;
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
        border-bottom: none;
        width: 100%;
        /* Ottimizzazioni touch per i link e Opera Mobile */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        transition: background-color 0.2s ease, color 0.2s ease;
        position: relative;
        z-index: 1001;
    }

    #mainNav ul li a:after {
        display: none;
    }

    #mainNav ul li a:hover,
    #mainNav ul li a:active,
    #mainNav ul li a:focus {
        background: rgba(255,255,255,0.1);
        color: var(--accent);
        outline: none;
    }
}

/* Overlay migliorato per touch e Opera Mobile */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* Ottimizzazioni touch e Opera Mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    will-change: opacity;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 993px) {
    .nav-overlay {
        display: none !important;
    }
}

/* Fix per scroll su iOS e Opera Mobile quando menu è aperto */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    -webkit-overflow-scrolling: auto;
}

/* Bottoni touch-friendly per Opera Mobile */
.btn {
    /* Area touch minima raccomandada di 44px */
    min-height: 44px;
    /* Rimuovi highlight blu su touch */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    /* Fix Opera Mobile */
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

/* Scroll to top touch-friendly per Opera Mobile */
.scroll-to-top {
    /* Assicura che sia abbastanza grande per il touch */
    min-width: 50px;
    min-height: 50px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    /* Fix Opera Mobile */
    will-change: transform;
    position: relative;
    z-index: 1000;
}

@media (max-width: 768px) {
    .scroll-to-top {
        min-width: 45px;
        min-height: 45px;
    }
}

/* Media query specifica per Opera Mobile */
@media screen and (-webkit-min-device-pixel-ratio: 1) and (max-width: 992px) {
    .mobile-toggle {
        /* Force hardware acceleration per Opera Mobile */
        transform: translateZ(0);
        will-change: background-color;
        backface-visibility: hidden;
    }
    
    #mainNav {
        /* Migliora performance su Opera Mobile */
        transform: translateZ(0);
        will-change: right;
        backface-visibility: hidden;
    }
}

/* ===========================================
   EFFETTO “HOVER” SU SERVICE CARD VIA :target
============================================= */
.service-card:target {
  /* riprendo lo stesso hover styling */
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(230, 126, 34, 0.15);
  border: 2px solid var(--accent);
}

/* Per non perdere il bordo arrotondato */
.service-card:target .service-image,
.service-card:target .service-content {
  border-radius: 8px;
}

/* ===========================================
   EVIDENZIAZIONE SEMPLICE SEZIONE TARGET
============================================= */

/* Quando si clicca su Editing o Engineering, evidenzia la sezione target */
#editing:target,
#engineering:target,
{
    border: 3px solid var(--accent) !important;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.4) !important;
    animation: sectionPulse 2s ease-in-out;
    transform: scale(1.02);
}

/* Animazione di pulsazione */
@keyframes sectionPulse {
    0% {
        box-shadow: 0 0 0 rgba(230, 126, 34, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(230, 126, 34, 0.8);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.4);
        transform: scale(1.02);
    }
}

/* Rimuovi l'effetto dopo qualche secondo */
#editing:target {
    animation: sectionPulse 2s ease-in-out, fadeTarget 1s ease-in-out 3s forwards;
}

#engineering:target {
    animation: sectionPulse 2s ease-in-out, fadeTarget 1s ease-in-out 3s forwards;
}

@keyframes fadeTarget {
    to {
        border-color: transparent;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: scale(1);
    }
}

/* Fix per le service-card che hanno ID editing/engineering */
#editing:target,
#engineering:target,
.service-card#editing:target,
.service-card#engineering:target {
    border: 3px solid var(--accent) !important;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.4) !important;
    animation: sectionPulse 2s ease-in-out;
    transform: scale(1.02) translateY(-10px);
}

/* ===========================================
   FIX MOBILE PER EVIDENZIAZIONE TARGET
============================================= */

/* Classe JavaScript per dispositivi mobile */
.mobile-target-active {
    border: 3px solid var(--accent) !important;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.4) !important;
    animation: mobileSectionPulse 2s ease-in-out !important;
    transform: scale(1.02) translateY(-10px) !important;
}

/* Animazione specifica per mobile */
@keyframes mobileSectionPulse {
    0% {
        box-shadow: 0 0 0 rgba(230, 126, 34, 0.4);
        transform: scale(1) translateY(-10px);
    }
    50% {
        box-shadow: 0 0 30px rgba(230, 126, 34, 0.8);
        transform: scale(1.02) translateY(-10px);
    }
    100% {
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.4);
        transform: scale(1.02) translateY(-10px);
    }
}

/* Fadeout per mobile */
.mobile-target-fadeout {
    animation: mobileFadeTarget 1s ease-in-out forwards !important;
}

@keyframes mobileFadeTarget {
    to {
        border-color: transparent !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
        transform: scale(1) translateY(-10px) !important;
    }
}

/* Media query specifica per dispositivi touch */
@media (hover: none) and (pointer: coarse) {
    /* Su dispositivi touch, disabilita l'effetto :target originale per evitare conflitti */
    #editing:target,
    #engineering:target,
    .service-card#editing:target,
    .service-card#engineering:target {
        border: 2px solid transparent !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
        animation: none !important;
        transform: translateY(-10px) !important;
    }
    
    /* Usa solo gli effetti JavaScript su mobile */
    .mobile-target-active {
        border: 3px solid var(--accent) !important;
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.4) !important;
        animation: mobileSectionPulse 2s ease-in-out !important;
        transform: scale(1.02) translateY(-10px) !important;
    }
}


.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    background-color: var(--light);
    opacity: 0.5;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background-color: var(--accent);
    opacity: 1;
    transform: scale(1.2);
}

/* ---------------------------
   Migliorie responsive per /engineering
   Inserire alla fine di css/style.css
   --------------------------- */

/* Preferiamo il min-width più piccolo per permettere più colonne su schermi stretti */
.services-grid {
  /* lasciare la regola esistente per default, ma forziamo un fallback più stretto */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; /* spaziatura leggermente più contenuta sui dispositivi piccoli */
}

/* Se vuoi specificare solo il portfolio della pagina engineering (se ha wrapper unico) */
/* .services-grid.engineering-portfolio { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } */

/* Rendiamo le immagini più “responsabili” mantenendo crop corretto */
.service-image {
  overflow: hidden;
  /* rimuovere altezza fissa per permettere adattamento: sarà controllata dall'img */
  height: auto;
}

/* manteniamo aspect-ratio per avere proporzioni coerenti */
.service-image img {
  width: 100%;
  height: auto;           /* evita stretching verticale */
  aspect-ratio: 16 / 9;   /* supportato dalla maggior parte dei browser moderni */
  object-fit: cover;      /* mantiene crop elegante */
  display: block;
}

/* Se il browser non supporta aspect-ratio usa fallback max-height */
@supports not (aspect-ratio: 16/9) {
  .service-image img {
    height: 200px;
  }
}

/* Miglior uso dello spazio su schermi piccoli */
@media (max-width: 768px) {
  .about { padding: 3rem 0 2rem 0; margin-top: 60px; } /* riduce margin-top su mobile */
  .section-header h2 { font-size: 1.6rem; }
  .services-grid { gap: 1rem; }
  .service-card { padding: 1rem; }
  .service-image img { aspect-ratio: auto; height: 160px; }
}

/* Ulteriore compressione per schermi molto piccoli */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section-header h2 { font-size: 1.4rem; }
  .service-image img { height: 140px; }
  .btn { padding: 0.8rem 1.25rem; font-size: 0.95rem; }
}
