/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ffffff;
    --header-color: #f0f0ec;
    --accent-color: #666666;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --background-light: #f5f5f5;
    --background-dark: #2a2a2a;
    --transition: all 0.3s ease;
    --company: #ef483e; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-full {
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(240, 240, 236, 0.95);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    max-width: 150px;
}

.logo a {
    display: block;
}

.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

.header.dark .logo-dark {
    display: none;
}

.header.dark .logo-light {
    display: block;
}

/* Navigation Desktop */
.nav-desktop {
    display: none;
}

@media (min-width: 992px) {
    .nav-desktop {
        display: block;
    }
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.menu-item > a {
    letter-spacing: 0.5px;
    padding: 10px 0;
    display: block;
    white-space: nowrap;
}

.menu-item > a:hover {
    color: var(--accent-color);
}

/* Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    list-style: none;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
    border-radius: 8px;
    overflow: hidden;
}

.menu-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    border-bottom: none;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 400;
}

.submenu a:hover {
    background-color: #f5f5f5;
    color: var(--accent-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--secondary-color);
    transform: translateX(-100%);
    transition: var(--transition);
    overflow-y: auto;
    z-index: 999;
}

.nav-mobile.active {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .nav-mobile {
        display: none;
    }
}

.mobile-menu {
    list-style: none;
    padding: 20px;
}

.mobile-menu > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu > li > a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.mobile-menu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu .has-submenu.active .submenu {
    max-height: 500px;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('../immagini/lumenflon_copertina_001.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 70px;
}

.hero-main-video {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 70px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.hero-content {
    color: var(--text-light);
    padding: 20px;
}

.hero-content-video {
    position: relative;
    color: var(--text-light);
    padding: 20px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.hero-btn:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* Responsive video */
@media (max-width: 768px) {
    .hero {
        margin-top: 60px;
    }
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--background-light);
}

.section-dark {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.section-dark .section-subtitle {
    color: #999;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.3;
}

.section-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.section-dark .section-text {
    color: #ccc;
}

.section-text p {
    margin-bottom: 20px;
}

.section-parallax {
    position: relative;
    padding: 120px 0;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-light);
    overflow: hidden;
}

.section-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

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

.section-parallax .section-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-parallax .section-subtitle {
    color: #ccc;
}

.section-parallax .section-text {
    color: #e0e0e0;
}

.section-parallax .section-link {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.section-parallax .section-link:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Disabilita parallax su mobile per performance */
@media (max-width: 768px) {
    .section-parallax {
        background-attachment: scroll;
        padding: 80px 0;
    }
}

.text-note {
    font-size: 14px;
    font-style: italic;
    margin-top: 20px;
}

.section-link {
    display: inline-block;
    padding: 12px 35px;
    background-color: var(--company);
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border-radius: 5px;
}

.section-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-dark .section-link {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.section-dark .section-link:hover {
    background-color: #e0e0e0;
}

/* Brands Section */
.brands-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.brands-section .section-subtitle,
.brands-section .section-title {
    text-align: center;
    margin-bottom: 50px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.brand-card {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Section with Image */
.section-with-image {
    position: relative;
    padding: 0;
}

.section-image-wrapper {
    position: relative;
    min-height: 600px;
}

.section-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-overlay .section-content {
    color: var(--text-light);
    padding: 40px;
}

.section-overlay .section-subtitle {
    color: #ccc;
}

.section-overlay .section-text {
    color: #e0e0e0;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--company);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top span {
    display: block;
    line-height: 1;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0 30px;
}

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

.footer-menu {
    margin-bottom: 40px;
}

.footer-menu ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
}

.footer-menu a {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-menu a:hover {
    color: var(--accent-color);
}

.footer-logo {
    max-width: 250px;
    margin: 0 auto 40px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 13px;
    color: #999;
}

.footer-bottom a {
    color: #999;
}

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

.footer-fiscal-data {
    margin: 30px 0;    
}

.footer-fiscal-data p {
    font-size: 12px;
    color: #999;
    margin: 5px 0;
    line-height: 1.6;
}

.footer-fiscal-data strong {
    color: #ccc;
    font-size: 13px;
}

.footer-fiscal-data a {
    color: #999;
    text-decoration: underline;
}

.footer-fiscal-data a:hover {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero {
        margin-top: 60px;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-menu ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-image-wrapper {
        min-height: 500px;
    }
    
    .section-image {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .hero-btn {
        padding: 12px 30px;
        font-size: 12px;
    }
    
    .section-link {
        padding: 10px 25px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .footer-fiscal-data p {
        font-size: 11px;
    }
}

.hero-internal {
    height: 50vh;
    min-height: 400px;
    max-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                var(--hero-bg) center/cover no-repeat;
    display: flex;
    align-items: center;
    margin-top: 70px;
    padding: 0;
}

.hero-internal-content {
    color: var(--text-light);
    padding: 40px 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

.hero-internal-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    max-width: 900px;
}

/* Content Page Sections */
.section-content-page {
    text-align: left;
}

.section-content-page-light {
    text-align: left;
    background-color: var(--background-light);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-main-title {
    font-size: clamp(32px, 2.5vw, 48px);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 30px;
    color: var(--text-dark);
    text-align: left;
}

.content-secondary-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 400;
    margin-bottom: 30px;
    color: #a7bc43;
    text-align: left;  
}

.content-colored-title {
    color: #a7bc43;
    font-weight: 400;
    margin-bottom: 30px;
}

.content-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    margin: 30px 0 20px;
    color: var(--primary-color);
    text-align: left;  
}

.content-wrapper p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: left;
}

.content-wrapper h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
    padding: 40px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.feature-item {
    text-align: left;
}

.feature-item h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--accent-color);
    margin: 0;
}

/* Full Width Image Section */
.section-image-full {
    width: 100%;
    padding: 0;
    margin: 0;
}

.section-image-full img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

/* Responsive per pagine interne */
@media (max-width: 768px) {
    .hero-internal {
        height: 40vh;
        min-height: 300px;
        margin-top: 60px;
    }

    .hero-internal-content {
        text-align: center;  /* Su mobile torna centrato */
    }
    
    .hero-internal-title {
        font-size: 24px;
    }
    
    .section-content-page {
        padding: 40px 0 30px;
    }

    .content-main-title {
        font-size: 28px;
    }
    
    .content-secondary-title {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
        padding: 30px 0;
    }
    
    .content-wrapper {
        padding: 0 20px;
    }
}

/* Section Split - Layout a due colonne */
.section-split {
    background-color: var(--background-light);
    padding: 80px 0;
}

.section-split-white {
    background-color: white;
    padding: 80px 0;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-split.reverse .split-content {
   grid-template-areas: "image text"; 
}

.section-split.reverse .split-text {
    grid-area: text;
    padding-right: 0;
    padding-left: 40px;
}

.section-split.reverse .split-image {
    grid-area: image;
}

.section-split-white.reverse .split-content {
   grid-template-areas: "image text"; 
}

.section-split-white.reverse .split-text {
    grid-area: text;
    padding-right: 0;
    padding-left: 40px;
}

.section-split-white.reverse .split-image {
    grid-area: image;
}

/* Definiamo le aree anche per la versione normale per sicurezza */
.section-split:not(.reverse) .split-content {
    grid-template-areas: "text image";
}
.section-split:not(.reverse) .split-text { grid-area: text; }
.section-split:not(.reverse) .split-image { grid-area: image; }

/* Colonna testo */
.split-text {
    padding-right: 20px;
}

.split-text .section-subtitle {
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.split-text .section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    margin-bottom: 25px;
    line-height: 1.3;
    text-align: left;
}

.split-text .section-text {
    text-align: left;
}

.split-text .section-text p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Colonna immagine */
.split-image {
    position: relative;
    height: 100%;
    min-height: 500px;
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive - Mobile */
@media (max-width: 968px) {
    .split-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* IMPORTANTE: Immagine prima, testo dopo */
    .split-text {
        order: 2;  /* Testo va dopo */
        padding-right: 0;
    }
    
    .split-image {
        order: 1;  /* Immagine va prima */
        min-height: 400px;
    }
    
    .split-text .section-subtitle,
    .split-text .section-title {
        text-align: center;
    }
    
    .split-text .section-text {
        text-align: left;
    }
    .section-split.reverse .split-content,
    .section-split .split-content {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "image"
            "text"; /* Forza l'immagine sopra il testo su mobile */
        gap: 30px;
    }

    .section-split.reverse .split-text {
        padding-left: 0;
        text-align: center;
    }
    .section-split-white.reverse .split-content,
    .section-split-white .split-content {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "image"
            "text"; /* Forza l'immagine sopra il testo su mobile */
        gap: 30px;
    }

    .section-split-white.reverse .split-text {
        padding-left: 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .section-split {
        padding: 60px 0;
    }

    .section-split-dark {
        padding: 60px 0;
    }
    
    .split-image {
        min-height: 300px;
    }
    
    .split-content {
        gap: 30px;
    }
}

/* ==========================================
   GALLERY MOSAIC SECTION
   ========================================== */

.gallery-section {
    background-color: var(--secondary-color);
    padding: 0 0 80px 0;
}

.section-intro {
    font-size: 16px;
    color: var(--accent-color);
    max-width: 700px;
    margin: 20px auto 50px;
    text-align: center;
    line-height: 1.6;
}

/* Mosaic Gallery Grid */
.mosaic-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 15px;
    margin-top: 50px;
}

/* Gallery Items */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Varianti dimensioni */
.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}

.gallery-item-big {
    grid-column: span 2;
    grid-row: span 2;
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    padding: 25px;
    color: var(--text-light);
    width: 100%;
}

.gallery-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-content h4 {
    transform: translateY(0);
}

.gallery-content p {
    font-size: 14px;
    color: #e0e0e0;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.2s;
}

.gallery-item:hover .gallery-content p {
    transform: translateY(0);
}

/* CTA Button */
.gallery-cta {
    text-align: center;
    margin-top: 50px;
}

/* ==========================================
   LIGHTBOX (Modale per zoom immagini)
   ========================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-caption {
    color: var(--text-light);
    margin-top: 20px;
    font-size: 16px;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 10px 20px;
    line-height: 1;
}

.lightbox-close:hover {
    color: #999;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 20px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px;
        gap: 12px;
    }

    .gallery-item-tall {
        grid-row: span 2;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }

    .gallery-item-big {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }

    .mosaic-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
        gap: 15px;
    }

    /* Su mobile tutti gli item diventano standard */
    .gallery-item-tall,
    .gallery-item-wide,
    .gallery-item-big {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Overlay sempre visibile su mobile */
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    }

    .gallery-content h4,
    .gallery-content p {
        transform: translateY(0);
    }

    .gallery-content {
        padding: 20px;
    }

    .gallery-content h4 {
        font-size: 18px;
    }

    .gallery-content p {
        font-size: 13px;
    }

    /* Lightbox su mobile */
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .mosaic-gallery {
        grid-auto-rows: 250px;
        gap: 10px;
    }

    .section-intro {
        font-size: 14px;
        margin: 15px auto 30px;
    }

    .gallery-cta {
        margin-top: 40px;
    }
}

/* ==========================================
   ANIMATION VARIANTS (Opzionali)
   ========================================== */

/* Effetto Zoom-Out al posto di Zoom-In */
.gallery-item.zoom-out img {
    transform: scale(1.1);
}

.gallery-item.zoom-out:hover img {
    transform: scale(1);
}

/* Effetto Blur */
.gallery-item.blur-effect:hover img {
    filter: blur(3px);
}

/* Effetto Grayscale */
.gallery-item.grayscale-effect img {
    filter: grayscale(100%);
}

.gallery-item.grayscale-effect:hover img {
    filter: grayscale(0%);
}

/* Loading Skeleton (per lazy loading) */
.gallery-item.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================
   ENVIRONMENT COUNTERS – FULL VERSION
   ========================================== */

.env-counters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 100px;
    max-width: 100%;
    margin: 70px auto;
    padding: 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Box */
.counter-box {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.counter-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Icona */
.counter-icon {
    font-size: 34px;
    margin-bottom: 10px;
}

/* Numero */
.counter-value {
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 12px;
}

.counter-value .suffix {
    font-size: 0.6em;
    margin-left: 2px;
}

/* Colore aziendale */
.company-color {
    color: var(--company);
}

/* Testo */
.counter-label {
    font-size: 15px;
    color: var(--accent-color);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

.counter-label span {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Mobile */
@media (max-width: 768px) {
    .env-counters {
        grid-template-columns: 1fr;
        gap: 35px;
        margin: 50px 0;
    }

    .counter-box {
        text-align: center;
    }
}

/* ==========================================
CERTIFICAZIONI
========================================== */

.certificazioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 60px;
    align-items: start;
}

.certificato-item {
    text-align: center;
}

.certificato-item img {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 20px;
    height: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.certificato-item img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Bottone download */
.btn-download {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--company);
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-download:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* =========================================================
   FORCE: su mobile immagine sopra, testo sotto (tutte le split) - DEVE RIMANERE IN FONDO
   ========================================================= */
@media (max-width: 968px) {

  /* 1 colonna sempre */
  .section-split .split-content,
  .section-split-white .split-content {
    grid-template-columns: 1fr !important;
  }

  /* Disattiva eventuali template-areas desktop che interferiscono */
  .section-split .split-content,
  .section-split-white .split-content {
    grid-template-areas: none !important;
  }

  /* Forza posizione: immagine prima */
  .section-split .split-image,
  .section-split-white .split-image {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  /* Forza posizione: testo dopo */
  .section-split .split-text,
  .section-split-white .split-text {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    padding-right: 0 !important;
  }
}
