/*
================================================================================
 FABER GREEN SOLUTIONS – Global Stylesheet
 Notes for maintainers:
 - Variables define the green palette derived from the brand logo.
 - Header is fixed; scroll-padding-top on html ensures in-page anchors align.
 - JS toggles .header.solid on scroll for compact state; sizes respond in CSS.
 - Animations are progressive-enhancement via IntersectionObserver; reduced
     motion respected via prefers-reduced-motion.
 - Keep selectors scoped and avoid heavy repaints; use will-change sparingly.
================================================================================
*/

/* Brand fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

/* CSS Variables (palette derived from logo greens) */
:root {
    --primary-color: #2c5530;   /* deep green */
    --secondary-color: #3e7b3e; /* medium green */
    --accent-color: #4CAF50;    /* accent green */
    --surface: #ffffff;
    --surface-alt: #f8f9fa;
    --text: #333333;
    --muted: #6b7280;
    --shadow-1: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-2: 0 8px 25px rgba(0,0,0,0.12);
    /* added for translucent utilities */
    --primary-color-rgb: 44, 85, 48;
    --secondary-color-rgb: 62, 123, 62;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

/* Global smooth scroll & padding (moved from inline) */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* 404 page */
body.not-found { margin:0; min-height:100vh; display:grid; place-items:center; background-image:linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.55)), url('images/sfondo.png'); background-size:cover; background-position:center; color:#fff; }
.nf-wrap { text-align:center; padding:24px; }
.nf-code { font-size:clamp(2.2rem,6vw,3.5rem); font-weight:700; text-shadow:0 3px 18px rgba(0,0,0,.55); }
.nf-text { font-size:clamp(1rem,2.5vw,1.25rem); opacity:.95; margin:10px 0 18px; text-shadow:0 2px 12px rgba(0,0,0,.5); }
.nf-link { display:inline-block; padding:12px 18px; border-radius:12px; text-decoration:none; color:#fff; background:linear-gradient(135deg, #2c5530, #3e7b3e); box-shadow:0 8px 18px rgba(0,0,0,.18); transition:transform .15s ease, box-shadow .2s ease; }
.nf-link:hover { transform:translateY(-1px); box-shadow:0 12px 26px rgba(0,0,0,.22); }

/* Cookie preferences inline button */
.btn-cookie-link { background:none; border:none; color:#4CAF50; cursor:pointer; padding:0; font:inherit; }
.btn-cookie-link:hover, .btn-cookie-link:focus { text-decoration:underline; }

/* Image gallery backgrounds (index)
    Aggiornato per collegare i file realmente presenti in /images
    NOTE: i percorsi devono risalire di una directory (style.css sta in /css)
    Mappatura:
    - img-pansol -> pansol.jpg
    - img-progetto-2 (Audit industriale) -> audit.jpg
    - img-pompcal -> pompcal.png
    - img-led -> led.png
    - img-progetto-5 (Monitoraggio consumi) -> monitoraggio.png
    - img-progetto-6 (Comunità energetica) -> comunitaenergertica.jpg (nome file con refuso mantenuto)
*/
.img-pansol { background: url('../images/pansol.jpg') center/cover no-repeat; }
.img-progetto-2 { background: url('../images/audit.jpg') center/cover no-repeat; }
.img-pompcal { background: url('../images/pompcal.png') center/cover no-repeat; }
.img-led { background: url('../images/led.png') center/cover no-repeat; }
.img-progetto-5 { background: url('../images/monitoraggio.png') center/cover no-repeat; }
.img-progetto-6 { background: url('../images/comunitaenergertica.jpg') center/cover no-repeat; }

/* Honeypot field (anti-spam) - hidden accessibly */
.hidden-honey {
    position: absolute !important;
    left: -5000px !important;
    width: 1px; height: 1px; overflow: hidden;
    opacity: 0; pointer-events: none;
}

/* Headings use Poppins for a subtle brand feel */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Roboto', sans-serif;
    line-height: 1.25;
    text-wrap: balance;
}

/* Avoid anchor jump under fixed header */
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 80px; 
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

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

/* Touch target optimization for mobile */
@media (max-width: 768px) {
    /* Ensure all clickable elements are at least 44px in height */
    .nav-link,
    .cta-button,
    .cta-button-outline,
    .submit-btn,
    .service-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    /* Improve button spacing */
    .cta-actions,
    .cta-buttons {
        gap: 0.75rem;
    }
    
    /* Better form controls */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Prevent accidental zooms */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background .35s ease, background-color .35s ease;
}

/* Mobile header stability */
@media (max-width: 768px) {
    .header {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Solid state + subtle backdrop on scroll */
.header.solid { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }

/* Homepage: header shows hero image underneath, then fades to green when solid */
.home .header {
    /* transparent gradient so browsers can animate to the solid gradient */
    background: linear-gradient(135deg,
        rgba(var(--primary-color-rgb), 0),
        rgba(var(--secondary-color-rgb), 0)
    );
}
.home .header.solid { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }

/* Smooth header text transitions only, no blur */
.nav-link, .nav-logo h2, .nav-logo span { transition: opacity .2s ease; }

.navbar {
    /* Slightly slimmer header band without shrinking the logo */
    padding: 0.5rem 0;
}

/* Mobile navbar adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.4rem 0;
    }
    
    .nav-container {
        padding: 0 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .nav-logo {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    
    .hamburger {
        position: relative;
        flex-shrink: 0;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.nav-logo span {
    color: #a8d8a8;
    font-size: 0.9rem;
    font-weight: 300;
}
/* Image logo support */
.nav-logo { display: flex; align-items: center; gap: 10px; }
/* Clean logo link */
.nav-logo .logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    padding: 2px; /* keep good hit area, reduce vertical thickness */
    background: transparent;
    border: none;
    box-shadow: none;
    isolation: isolate; /* keep halo behind image only */
    transition: transform .2s ease;
}
.nav-logo .logo-link:hover { transform: translateY(-1px); }
@media (max-width: 768px){ .nav-logo .logo-link { padding: 4px; } }

/*
    Subtle radial halo behind the logo (no rectangle background)
    - Uses mix-blend-mode: screen to lift the logo from the header gradient
    - Keep opacity/blur conservative to avoid overpowering content
*/
.nav-logo .logo-link::after {
    content: '';
    position: absolute;
    inset: -28px -32px; /* larger spread for stronger presence */
    border-radius: 999px; /* pill/circle-ish glow */
    background: radial-gradient(60% 60% at 50% 50%,
        rgba(255,255,255,.42) 0%,
        rgba(190, 255, 220, .45) 24%,
        rgba(var(--secondary-color-rgb), .52) 46%,
        transparent 78%
    );
    filter: blur(22px);
    opacity: .92;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: -1;
    will-change: opacity, transform, filter;
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}
/* Compatibility helpers (toggled via JS if needed) */
.no-backdrop .office,
.no-backdrop .map-container,
.no-backdrop .nav-menu { /* mobile drawer */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(255,255,255,0.85) !important;
}

.no-blend .nav-logo .logo-link::after { /* disable blend halo and use simpler glow */
    mix-blend-mode: normal !important;
    background: radial-gradient(60% 60% at 50% 50%, rgba(255,255,255,.35) 0%, rgba(120,255,190,.35) 30%, rgba(62,123,62,.25) 55%, transparent 80%);
    filter: blur(16px);
    opacity: .65;
}
.nav-logo .logo-link:hover::after {
    opacity: 1;
}

/* Logo image sizing with responsive and scroll states */
/*
    Logo image glow
    - Layered drop-shadows create an inner white lift and an outer green halo
    - Sizes are adjusted responsively and shrink when header gains .solid
*/
.nav-logo img.logo-with-text {
    height: 80px;
    width: auto;
    display: block;
    /* delicate green halo + subtle depth */
    filter:
    drop-shadow(0 1px 1px rgba(0,0,0,0.12))
    drop-shadow(0 0 3px rgba(255,255,255,.55))
    drop-shadow(0 0 22px rgba(120, 255, 190, .46))
    drop-shadow(0 0 42px rgba(var(--secondary-color-rgb), .30));
    transition: height .2s ease, filter .25s ease;
}
/* slightly enhance glow on hover */
.nav-logo .logo-link:hover img.logo-with-text {
    filter:
    drop-shadow(0 1px 1px rgba(0,0,0,0.12))
    drop-shadow(0 0 4px rgba(255,255,255,.65))
    drop-shadow(0 0 28px rgba(140, 255, 200, .55))
    drop-shadow(0 0 50px rgba(var(--secondary-color-rgb), .36));
}
/* Shrink on scroll (header gains .solid) to save vertical space */
.header.solid .nav-logo img.logo-with-text { height: 48px; }
@media (max-width: 1024px){ .nav-logo img.logo-with-text { height: 52px; } .header.solid .nav-logo img.logo-with-text { height: 42px; } }
@media (max-width: 768px){ .nav-logo img.logo-with-text { height: 43px; } .header.solid .nav-logo img.logo-with-text { height: 38px; } }

/* Top development banner (global) */
.dev-banner {
    background: linear-gradient(90deg, #f59e0b, #f97316);
    color: #fff;
    text-align: center;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.dev-banner .dev-banner__icon { font-size: 16px; opacity: .95; }
.dev-banner strong { font-weight: 600; }
@media (max-width: 768px){
    .dev-banner { 
        font-size: 13px; 
        padding: 8px 12px; 
        line-height: 1.3;
        text-align: center;
    }
    .dev-banner .dev-banner__icon { 
        display: none; 
    }
    .dev-banner strong {
        display: block;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px){
    .dev-banner { 
        font-size: 12px; 
        padding: 6px 10px; 
    }
}

/* Home page emphasis: larger logo with scroll-aware shrink */
.home .nav-logo img.logo-with-text { height: 77px; }
.home .header.solid .nav-logo img.logo-with-text { height: 61px; }
@media (max-width: 1024px){ .home .nav-logo img.logo-with-text { height: 67px; } .home .header.solid .nav-logo img.logo-with-text { height: 53px; } }
@media (max-width: 768px){ .home .nav-logo img.logo-with-text { height: 54px; } .home .header.solid .nav-logo img.logo-with-text { height: 46px; } }

/* Compensate hero top offset for larger home header */
.home .hero {
    padding-top: 120px;
    /* Dark overlay on top of background image for better text readability */
    background-image: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/sfondo.png');
    background-size: cover, cover;
    background-position: center, center;
}

/* Slightly stronger text shadow on homepage hero for contrast */
.home .hero .hero-content h1,
.home .hero .hero-subtitle {
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.home .header.solid ~ .hero { padding-top: 100px; }

/* Optional footer brand icon */
.footer .footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer .footer-brand img { height: 32px; width: auto; display: block; }
/* Simple footer logo variant */
.footer .footer-logo { height: 32px; width: auto; display: block; margin-bottom: 10px; opacity: 0.95; }

/* Accessibility utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Typography safeguards to avoid overlaps/wrapping issues */
h1, h2, h3 { line-height: 1.2; }
.section-title, .page-header h1 { overflow-wrap: anywhere; hyphens: auto; }
.page-header h1 i { margin-right: 8px; }
@media (max-width: 480px){
    .page-header h1 { font-size: 1.75rem; }
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    position: relative;
    margin-left: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #a8d8a8;
}

.nav-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 250px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: .5rem;
    list-style: none;                 /* remove bullets */
    padding-left: 0;                  /* reset UA default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.98);
    transform-origin: top left;
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    margin: 0;
    list-style: none;                 /* ensure no bullets */
}

.dropdown-menu a {
    color: #2b2b2b;
    padding: .6rem 1rem .6rem 2.25rem; /* room for icon */
    display: block;
    text-decoration: none;
    border-radius: 8px;
    position: relative;
    transition: background-color .2s ease, color .2s ease, transform .1s ease;
}

.dropdown-menu a::before {
    content: "\f0da"; /* fa-chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--secondary-color);
    opacity: .9;
}

.dropdown-menu a:hover {
    background-color: #f5f7f6;
    color: #2c5530;
}

.dropdown .nav-link i { transition: transform .2s ease; }
.dropdown:hover .nav-link i,
.dropdown:focus-within .nav-link i,
.dropdown.open .nav-link i { transform: rotate(180deg); }

/* Desktop: arrange dropdown links in two columns if there is room */
@media (min-width: 1024px) {
    .dropdown-menu {
        min-width: 520px;
        display: grid;
        grid-template-columns: repeat(2, minmax(220px, 1fr));
        gap: .25rem .5rem;
        padding: .75rem;
    }
    .dropdown-menu li { margin: 0; break-inside: avoid; }
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    z-index: 1002;
}

.hamburger:hover {
    background-color: rgba(255,255,255,0.1);
}

.hamburger:active {
    background-color: rgba(255,255,255,0.2);
}

.bar {
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    display: block;
}

/* Hero Section */
.hero {
    /* Cleaner, lighter hero to emphasize brand mark */
    background-image:
        linear-gradient(135deg, rgba(44, 85, 48, 0.85), rgba(62, 123, 62, 0.85)),
        url('../images/hero.jpg');
    background-size: cover, cover;
    background-position: center, center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 80px;
    position: relative;
}

/* Hero floating shapes for subtle motion */
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
}
.hero::before {
    width: 280px; height: 280px; left: 5%; top: 20%;
    background: radial-gradient(circle at 30% 30%, #a8d8a8, transparent 60%);
    animation: floatY 10s ease-in-out infinite;
}
.hero::after {
    width: 360px; height: 360px; right: 8%; bottom: 12%;
    background: radial-gradient(circle at 70% 70%, #ffffff, transparent 60%);
    animation: floatX 12s ease-in-out infinite;
}

@keyframes floatY {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}
@keyframes floatX {
    0%,100% { transform: translateX(0); }
    50% { transform: translateX(18px); }
}

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

.hero-content { will-change: opacity, filter, transform; transition: opacity .25s linear, filter .25s linear, transform .25s ease-out; }

.hero-content h1 {
    font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Prominent hero logo (home inspiration) */
.hero-logo { width: clamp(160px, 14.4vw, 272px); height: auto; margin: 0 auto 14px; display: block; filter: drop-shadow(0 4px 22px rgba(0,0,0,.28)); }

/* Fallback width for browsers without clamp() support */
.no-clamp .hero-logo { width: 220px; }

.hero-subtitle {
    font-size: clamp(1rem, 1vw + 0.9rem, 1.3rem);
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.feature i {
    font-size: 2.5rem;
    color: #a8d8a8;
}

.feature span {
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.28s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Microinteraction utilities */
.ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: ripple .6s ease-out forwards; background: rgba(255,255,255,.35); pointer-events: none; mix-blend-mode: overlay; }
.no-blend .ripple { mix-blend-mode: normal; background: rgba(255,255,255,.25); }
@keyframes ripple { to { transform: scale(8); opacity: 0; } }
.tilt { will-change: transform; transition: transform .28s ease, box-shadow .28s ease; transform-style: preserve-3d; }
.tilt:hover { box-shadow: 0 18px 40px rgba(0,0,0,.12); }

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, var(--accent-color), #45a049);
}

/* Chi Siamo Section */
.chi-siamo-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.stat h3 {
    font-size: 1.5rem;
    color: #2c5530;
    margin-bottom: 0.5rem;
}

/* Services Overview */
.services-overview {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
    padding: 5rem 0;
    position: relative;
}

/* Wave separator for a dynamic section transition */
.services-overview::before {
    content: '';
    position: absolute;
    top: -40px; left: 0; right: 0; height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path d="M0,100 C360,0 1080,0 1440,100 L1440,0 L0,0 Z" fill="%23f8f9fa"/></svg>') no-repeat center/cover;
}
.about-preview { position: relative; }
.about-preview::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 0; right: 0; height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path d="M0,0 C360,100 1080,100 1440,0 L1440,100 L0,100 Z" fill="%23ffffff"/></svg>') no-repeat center/cover;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #4CAF50;
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.2);
}

.service-card i {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
        line-height: 1.5;
        font-size: .98rem;
}

/* Services landing: keep it clean and simple */
.page-services .page-header { padding: 3.5rem 0; }
.page-services .services-section { padding: 3.5rem 0 4rem; }
.page-services .intro-text.center { text-align: center; max-width: 760px; margin: 0 auto; }
.page-services .intro-text.center p { opacity: .9; }
.page-services .service-card { box-shadow: 0 6px 14px rgba(0,0,0,.06); }
.page-services .service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 22px rgba(76,175,80,.18); }

@media (max-width: 768px){
    .page-services .services-grid { gap: 1rem; }
    .page-services .service-card { padding: 1.25rem; }
}

/* Center last row for common card grids across the site */
/* Defaults; can be overridden per-grid with custom properties */
:root { --grid-col-min: 280px; --grid-col-max: 320px; }

/* Per-grid preferred widths (tuned for existing content density) */
.services-grid { --grid-col-min: 280px; --grid-col-max: 320px; }
.benefits-grid { --grid-col-min: 280px; --grid-col-max: 340px; }
.partners-grid { --grid-col-min: 300px; --grid-col-max: 360px; }
.values-grid { --grid-col-min: 260px; --grid-col-max: 320px; }
.renewable-grid { --grid-col-min: 220px; --grid-col-max: 260px; }
.features-grid { --grid-col-min: 260px; --grid-col-max: 320px; }
.technologies-grid, .tech-grid { --grid-col-min: 260px; --grid-col-max: 320px; }
.maps-grid { --grid-col-min: 300px; --grid-col-max: 360px; }
.quick-contact-grid { --grid-col-min: 260px; --grid-col-max: 300px; }
.types-grid, .incentives-grid { --grid-col-min: 260px; --grid-col-max: 320px; }
.clients-grid, .cases-grid, .stories-grid, .support-grid, .definition-grid, .legal-grid, .heritage-grid { --grid-col-min: 260px; --grid-col-max: 320px; }
.open-positions .positions-grid { --grid-col-min: 280px; --grid-col-max: 320px; }

/* Activate centering via root helper class set in JS */
.center-last-rows .services-grid,
.center-last-rows .benefits-grid,
.center-last-rows .partners-grid,
.center-last-rows .values-grid,
.center-last-rows .renewable-grid,
.center-last-rows .features-grid,
.center-last-rows .technologies-grid,
.center-last-rows .tech-grid,
.center-last-rows .maps-grid,
.center-last-rows .quick-contact-grid,
.center-last-rows .types-grid,
.center-last-rows .incentives-grid,
.center-last-rows .clients-grid,
.center-last-rows .cases-grid,
.center-last-rows .stories-grid,
.center-last-rows .support-grid,
.center-last-rows .definition-grid,
.center-last-rows .legal-grid,
.center-last-rows .heritage-grid,
.center-last-rows .open-positions .positions-grid,
.center-last-rows .badges-grid {
    display: grid;
    justify-content: center;                  /* center tracks as group */
    grid-template-columns: repeat(
        auto-fit,
        minmax(var(--grid-col-min, 280px), var(--grid-col-max, 320px))
    );
}

/* Ensure tiles don’t shrink oddly inside centered columns */
.center-last-rows [class*="-grid"] > * { width: 100%; }

/* Final override (placed late) to ensure centering wins over fixed column rules */
.center-last-rows .services-grid,
.center-last-rows .benefits-grid,
.center-last-rows .partners-grid,
.center-last-rows .values-grid,
.center-last-rows .renewable-grid,
.center-last-rows .features-grid,
.center-last-rows .technologies-grid,
.center-last-rows .tech-grid,
.center-last-rows .maps-grid,
.center-last-rows .quick-contact-grid,
.center-last-rows .types-grid,
.center-last-rows .incentives-grid,
.center-last-rows .clients-grid,
.center-last-rows .cases-grid,
.center-last-rows .stories-grid,
.center-last-rows .support-grid,
.center-last-rows .definition-grid,
.center-last-rows .legal-grid,
.center-last-rows .heritage-grid,
.center-last-rows .open-positions .positions-grid,
.center-last-rows .badges-grid,
.center-last-rows .related-grid {
    justify-content: center !important;
    grid-template-columns: repeat(
        auto-fit,
        minmax(var(--grid-col-min, 280px), var(--grid-col-max, 320px))
    ) !important;
}

/* End-of-file priority override: only design-process flows (avoid generic .process-flow) */
.center-last-rows .design-process .process-flow {
    --grid-col-min: 320px;
    --grid-col-max: 420px;
    justify-content: center !important;
    grid-template-columns: repeat(
        auto-fit,
        minmax(var(--grid-col-min, 320px), var(--grid-col-max, 420px))
    ) !important;
}

/* Service Detail Sections */
.service-detail {
    padding: 4rem 0;
}

.service-detail.alt-bg {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
}

.service-detail h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.service-content {
    max-width: 900px;
    margin: 0 auto;
}

.service-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    overflow-wrap: break-word;
    hyphens: auto;
}

.service-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.service-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* Renewable Energy Grid */
.renewable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.renewable-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.renewable-item:hover {
    transform: translateY(-5px);
}

.renewable-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.renewable-item span {
    font-weight: 500;
    text-align: center;
}

/* Project Phases and Types */
.project-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.phase {
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.phase h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.project-types {
    margin-top: 3rem;
}

.project-type {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.project-type h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-type i {
    color: var(--accent-color);
}

/* TEE Highlight */
/* Utility */
.mt-24 { margin-top: 24px; }
.center { text-align: center; }
.muted { color: #6b7280; }

/* Two columns generic */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: start; }

@media (max-width: 900px){ 
    .two-col { 
        grid-template-columns: 1fr; 
        gap: 2rem;
    }
}

@media (max-width: 768px){ 
    .two-col { 
        gap: 1.5rem;
        padding: 0 16px;
    }
    
    .two-col > div {
        padding: 1.5rem;
    }
    
    /* Ensure definition grids are single column */
    .definition-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Better spacing for benefits comparison */
    .benefits-comparison {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .benefit-column {
        padding: 1.5rem;
    }
}

/* ESCo badges */
/* Grid of highlights used on ESCo pages and home */
.badges-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 24px; margin-bottom: 48px; }
@media (max-width: 1100px){ .badges-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .badges-grid { grid-template-columns: 1fr; } }
/* Badge card aesthetics (lighter, brand-aligned) */
.badge { background: #ffffff; color: #1f2937; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px; box-shadow: 0 10px 24px rgba(0,0,0,0.06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.badge i { font-size: 26px; color: var(--accent-color); }
.badge h3 { margin: 10px 0 6px; font-weight: 600; color: var(--primary-color); }
.badge p { font-size: 14px; line-height: 1.6; color: #475569; }
.badge:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.10); border-color: #d1d5db; }

/* Clean separation and improved layout for the block following badges on ESCo page */
.badges-grid + .two-col { gap: 40px; border-top: 1px solid #e5e7eb; padding-top: 32px; margin-top: 8px; }
.badges-grid + .two-col > div { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.badges-grid + .two-col h3 { margin-top: 0; color: var(--primary-color); }
.badges-grid + .two-col p { color: #475569; }
.badges-grid + .two-col .checklist { margin-top: 10px; }
.badges-grid + .two-col .checklist li { margin: 10px 0; }

/* Careers CTA */
.careers-cta { background: linear-gradient(135deg,#0ea5e9 0%, #22c55e 100%); color: #fff; padding: 48px 0; }
.careers-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.careers-copy h2 { font-size: 28px; margin-bottom: 6px; }
.careers-copy p { opacity: .95; }
.careers-action .cta-button { background: #0f172a; }
@media (max-width: 800px){ .careers-cta-inner { flex-direction: column; text-align: center; } }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { position: relative; padding-left: 28px; margin: 8px 0; }
.checklist li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #22c55e; position: absolute; left: 0; top: 0; }

/* Values pills */
.values-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.value-pill { background: #e8f5e9; color: #065f46; border: 1px solid #bbf7d0; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.value-pill i { margin-right: 6px; color: #10b981; }

/* Positions grid */
.open-positions .positions-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 1100px){ .open-positions .positions-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 700px){ .open-positions .positions-grid { grid-template-columns: 1fr; } }
.position-card { background: #ffffff; border-radius: 14px; border: 1px solid #e5e7eb; padding: 18px; transition: transform .2s ease, box-shadow .2s ease; }
.position-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,.06); }
.position-head { display:flex; gap:8px; justify-content: space-between; align-items:center; margin-bottom:6px; }
.badge-role, .badge-type { font-size: 12px; padding: 4px 8px; border-radius: 999px; font-weight: 600; }
.badge-role { background:#eff6ff; color:#1d4ed8; }
.badge-type { background:#ecfeff; color:#0e7490; }
.position-card h3 { margin: 6px 0 6px; font-size: 18px; }
.position-card p { color: #4b5563; }
.position-card .tags { display:flex; gap:8px; list-style:none; padding:0; margin:10px 0 14px; flex-wrap: wrap; }
.position-card .tags li { background:#f1f5f9; color:#334155; padding:4px 8px; border-radius:8px; font-size:12px; }

/* Forms enhancements */
.apply-form .form-group { margin-bottom: 12px; }
.apply-form label { display:block; font-weight:600; margin-bottom:6px; }
.apply-form input, .apply-form select, .apply-form textarea { width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.apply-form .form-actions { margin-top: 10px; }
/* Visual feedback when a form group gains focus via JS */
.form-group.focused label { color: var(--primary-color); }
.form-group.focused input,
.form-group.focused select,
.form-group.focused textarea { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.12); }

/* Note box */
.note-box { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:18px; }
.tee-highlight {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid var(--accent-color);
}

.tee-highlight h3 {
    color: #2c5530;
    margin-bottom: 1rem;
}

/* CER Benefits */
.cer-benefits h3 {
    color: #2c5530;
    margin: 2rem 0 1rem 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.benefit i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.benefit h4 {
    color: #2c5530;
    margin-bottom: 1rem;
}

/* Intermediation Steps */
.intermediation-steps {
    margin: 3rem 0;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.step-number {
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step h3 {
    color: #2c5530;
    margin-bottom: 1rem;
}

.exclusive-treatment {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid #f39c12;
}

.exclusive-treatment h3 {
    color: #d68910;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exclusive-treatment i {
    color: #f39c12;
}

/* Legal Note */
.legal-note {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid #2196f3;
}

.legal-note p {
    margin: 0;
    font-style: italic;
}

/* Partners Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Quadro Normativo specific layout (2x2) */
.legal-framework .legal-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem 2rem;
        align-items: start;
}
.legal-framework .legal-card { background:#ffffff; border:1px solid #e5e7eb; border-radius:14px; padding:1.4rem 1.25rem; box-shadow:0 6px 16px rgba(0,0,0,.06); }
.legal-framework .legal-card h3 { margin-top:0; font-size:1.05rem; color: var(--primary-color); }
.legal-framework .legal-card ul { margin:0; padding-left:1.1rem; }
.legal-framework .legal-card li { margin: .45rem 0; line-height:1.4; font-size:.9rem; }

@media (max-width: 820px) {
    .legal-framework .legal-grid { grid-template-columns: 1fr; }
}

.partner-card {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-10px);
}

.partner-logo {
    margin-bottom: 2rem;
}

.partner-logo i {
    font-size: 4rem;
    color: #4CAF50;
}

.partner-card h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.partners-note {
    text-align: center;
    margin-top: 3rem;
    font-style: italic;
    color: #666;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5rem 0;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.offices {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.office {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.office h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a8d8a8;
}

.office i {
    color: var(--accent-color);
}

/* Contact Form */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25);
}

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.map-container {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.map-container i {
    color: #4CAF50;
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Mobile footer optimization */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid #333;
    }
    
    .footer-section:last-child {
        border-bottom: none;
    }
    
    .footer-section h3,
    .footer-section h4 {
        margin-bottom: 1rem;
    }
    
    .footer-section ul li {
        margin-bottom: 0.75rem;
    }
    
    .footer-section a {
        font-size: 1rem;
        padding: 0.25rem 0;
        display: block;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .social-links a {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 1.1rem;
    }
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #4CAF50;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #4CAF50;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 0.5rem;
}

.footer-section i {
    color: #4CAF50;
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #45a049;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Scroll-to-top hover/focus state */
.scroll-to-top:hover, .scroll-to-top:focus-visible { filter: brightness(1.05); transform: translateY(-2px); }

/* Basic lazy image styling */
img.lazy { filter: blur(6px); transition: filter .3s ease; }
img:not(.lazy) { filter: none; }

/* ------------------------------------------------------
   Tooltip / Disclaimer per dati indicativi (CER, ecc.)
   Utilizzo: avvolgere l'asterisco in span.data-disclaimer
   Esempio: <span class="data-disclaimer" role="note"><button class="disc-trigger" aria-describedby="disc-econ">*</button><span class="disc-tooltip" id="disc-econ">Valori indicativi calcolati su ipotesi medie; non costituiscono garanzia di risultato.</span></span>
   Accessibilità: il trigger è un button focusabile; il tooltip appare on hover/focus.
------------------------------------------------------- */
.data-disclaimer { position: relative; display: inline-flex; align-items: center; }
.data-disclaimer .disc-trigger {
    background: none;
    border: none;
    padding: 0 2px;
    margin-left: 4px;
    font: inherit;
    line-height: 1;
    cursor: help;
    color: var(--accent-color);
    font-weight: 600;
    position: relative;
}
.data-disclaimer .disc-trigger:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}
.data-disclaimer .disc-tooltip {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, 8px);
    background: #1f2937;
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.72rem;
    line-height: 1.4;
    width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 30;
}
.data-disclaimer .disc-tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px; height: 12px;
    background: #1f2937;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
.data-disclaimer:hover .disc-tooltip,
.data-disclaimer:focus-within .disc-tooltip {
    opacity: 1;
    transform: translate(-50%, 4px);
    pointer-events: auto;
}
@media (max-width: 600px){
    .data-disclaimer .disc-tooltip { left: 0; transform: translate(0,8px); width: min(260px, 80vw); }
    .data-disclaimer:hover .disc-tooltip,
    .data-disclaimer:focus-within .disc-tooltip { transform: translate(0,4px); }
}

/* Asterisco disclaimer inline compatto (ripristino base, attaccato al testo) */
.data-disclaimer { display:inline-flex; align-items: center; }
.data-disclaimer .disc-trigger {
    font-size: 0.75em; /* leggermente più piccolo ma non superscript */
    line-height: 1;
    background:none; border:none; padding:0; margin:0;
    cursor: help; font-weight:600; color: var(--accent-color);
}
.data-disclaimer .disc-trigger:hover { color:#2c5530; }
/* Mantieni numero e asterisco uniti */
.result-value, .stat-item h3, .client-benefits span { white-space: nowrap; }

/* Privacy Policy Styles */
.privacy-policy {
    padding: 2rem 0;
}

.privacy-content {
    max-width: 1000px;
    margin: 0 auto;
}

.privacy-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.privacy-section:last-child {
    border-bottom: none;
}

.privacy-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.privacy-section h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.privacy-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.privacy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.privacy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
}

.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.purpose-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.purpose-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.purpose-card i {
    color: var(--secondary-color);
}

.formsubmit-info {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    margin: 1rem 0;
}

.formsubmit-info strong {
    color: #856404;
}

.rights-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.right-simple {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.privacy-contact {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.privacy-contact h2 {
    color: white;
    margin-bottom: 1rem;
}

.privacy-contact p {
    margin-bottom: 1rem;
}

.privacy-contact ul {
    list-style: none;
    margin-left: 0;
}

.privacy-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.privacy-contact a {
    color: white;
    text-decoration: underline;
}

.privacy-contact a:hover {
    color: #f0f0f0;
}

/* Mobile optimization for privacy page */
@media (max-width: 768px) {
    .purpose-grid,
    .rights-simple {
        grid-template-columns: 1fr;
    }
    
    .privacy-section {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .privacy-section h2 {
        font-size: 1.3rem;
    }
    
    .contact-box,
    .formsubmit-info,
    .privacy-contact {
        padding: 1rem;
    }
    
    .privacy-section p {
        text-align: left;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        padding: 80px 1rem 1rem 1rem !important;
    }
    
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .page-header {
        padding: 80px 0 40px;
        margin-top: 50px;
    }
    
    .hamburger {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }
    
    .bar {
        width: 18px;
    }
}

/* Intermediate tablet optimization */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 24px;
    }
    
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .hero-features {
        gap: 2rem;
    }
    
    .feature {
        min-width: 200px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        flex-direction: column;
        background: linear-gradient(135deg, rgba(44, 85, 48, 0.97), rgba(62, 123, 62, 0.97));
        width: 100%;
        width: 100vw; /* Ensure full width */
        text-align: center;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        padding: 100px 1rem 2rem 1rem;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    /* iOS Safari specific fixes */
    @supports (-webkit-touch-callout: none) {
        .nav-menu {
            height: -webkit-fill-available;
        }
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem;
        display: block;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Better menu backdrop */
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
        background-color: #fff;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
        background-color: #fff;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.1);
        margin: 0.5rem 1rem;
        border-radius: 8px;
        min-width: auto;
        padding: 0.5rem;
    }
    
    .dropdown-menu li {
        margin: 0.25rem 0;
    }
    
    .dropdown-menu a {
        color: #f8fafc;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 6px;
    }
    
    .dropdown-menu a:hover {
        background: rgba(255,255,255,0.15);
        color: #ffffff;
    }

    .hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    /* Home page hero specific */
    .home .hero {
        padding-top: 90px;
    }
    
    .hero-container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
        line-height: 1.2;
        margin-bottom: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    /* Stack horizontal feature lists vertically on mobile */
    .hero-features {
        flex-direction: column;
        align-items: stretch;
        gap: 1.2rem;
        margin: 2rem 0;
    }
    
    .feature {
        align-items: center;
        text-align: center;
        padding: 1rem;
        background: rgba(255,255,255,0.1);
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
    
    .feature i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .feature span {
        font-size: 0.95rem;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 0.9rem 1.8rem;
    }

    .chi-siamo-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 16px;
    }
    
    .text-content p {
        text-align: left;
        margin-bottom: 1.2rem;
        font-size: 1rem;
        line-height: 1.6;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .stat {
        flex: none;
        min-width: auto;
        width: 100%;
        padding: 1.5rem;
        margin-bottom: 0;
        text-align: center;
    }
    
    .stats-extended {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Ensure stats work in about preview */
    .about-preview .stats {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 16px;
    }
    
    .contact-main {
        padding: 3rem 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .contact-form {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .step {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .step-number {
        align-self: center;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .step h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .step p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .offices {
        gap: 1rem;
    }
    
    .office {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefit {
        padding: 1.5rem;
    }
    
    .benefit i {
        font-size: 2rem;
    }

    /* Force vertical flow for process/steps and objectives */
    .objectives-flow { flex-direction: column; align-items: stretch; gap: 1rem; }
    .step-arrow { display: none; }
    /* Generic process flows into single-column grid on mobile */
    .process-flow, .tee-flow, .design-process .process-flow, .buying-process .process-flow {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Make all key grids single column for strong vertical layout */
    .services-grid,
    .benefits-grid,
    .partners-grid,
    .values-grid,
    .renewable-grid,
    .features-grid,
    .technologies-grid,
    .tech-grid,
    .maps-grid,
    .quick-contact-grid,
    .types-grid,
    .incentives-grid,
    .clients-grid,
    .cases-grid,
    .stories-grid,
    .support-grid,
    .definition-grid,
    .legal-grid,
    .heritage-grid,
    .related-grid,
    .open-positions .positions-grid,
    .badges-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Stack call-to-action button rows */
    .cta-actions, .cta-buttons { flex-direction: column; align-items: stretch; gap: 10px; }

    /* Testimonials: switch from horizontal slider to vertical list on mobile */
    .testimonials { 
        display: grid; 
        gap: 16px; 
        overflow: visible; 
        scroll-snap-type: none; 
        padding: 0 16px;
    }
    .testimonial-card { 
        width: 100%; 
        flex: 1 1 auto; 
        scroll-snap-align: unset;
        padding: 1.25rem;
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .testimonial-author {
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .testimonial-role {
        font-size: 0.8rem;
    }
    
    /* About preview mobile specific fixes */
    .about-preview {
        padding: 3rem 0;
    }
    
    .about-preview .container {
        padding: 0 16px;
    }
    
    .about-preview .text-content h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .about-preview .stat {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    
    .about-preview .stat i {
        font-size: 2rem;
    }
    
    .about-preview .stat h3 {
        font-size: 1.3rem;
    }
    
    /* Service cards mobile optimization */
    .service-card {
        padding: 1.5rem;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .service-card:hover {
        transform: translateY(-3px);
    }
    
    .service-card i {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Ensure centering helper does not fight single-column intent */
    .center-last-rows .services-grid,
    .center-last-rows .benefits-grid,
    .center-last-rows .partners-grid,
    .center-last-rows .values-grid,
    .center-last-rows .renewable-grid,
    .center-last-rows .features-grid,
    .center-last-rows .technologies-grid,
    .center-last-rows .tech-grid,
    .center-last-rows .maps-grid,
    .center-last-rows .quick-contact-grid,
    .center-last-rows .types-grid,
    .center-last-rows .incentives-grid,
    .center-last-rows .clients-grid,
    .center-last-rows .cases-grid,
    .center-last-rows .stories-grid,
    .center-last-rows .support-grid,
    .center-last-rows .definition-grid,
    .center-last-rows .legal-grid,
    .center-last-rows .heritage-grid,
    .center-last-rows .open-positions .positions-grid,
    .center-last-rows .badges-grid,
    .center-last-rows .related-grid {
        grid-template-columns: 1fr !important;
        justify-content: stretch !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    /* Reduce section padding for better mobile spacing */
    .section {
        padding: 3rem 0;
    }
    
    .page-header {
        padding: 100px 0 60px;
        margin-top: 60px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .section-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }

    /* Ensure all grids are single column on small screens */
    .services-grid,
    .renewable-grid,
    .project-phases,
    .partners-grid,
    .benefits-grid,
    .features-grid,
    .tech-grid,
    .values-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1rem;
    }
    
    /* Reduce card padding for better fit */
    .service-card,
    .benefit-card,
    .feature-card,
    .value-card,
    .partner-card {
        padding: 1.25rem;
    }

    /* Make image gallery fully single-column */
    .image-gallery { 
        display: grid; 
        grid-template-columns: 1fr; 
        gap: 0.75rem;
    }
    .image-card.large, 
    .image-card.medium, 
    .image-card.small { 
        grid-column: 1/-1; 
        min-height: 180px;
    }
    
    /* Better CTA button sizing */
    .cta-button,
    .cta-button-outline {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Improve footer spacing */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

/* Smooth Scrolling handled above with scroll-padding-top */

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* New reveal variants */
.reveal-left { opacity: 0; transform: translateX(-30px); transition: transform .7s ease, opacity .7s ease; }
.reveal-right { opacity: 0; transform: translateX(30px); transition: transform .7s ease, opacity .7s ease; }
.reveal-up { opacity: 0; transform: translateY(24px); transition: transform .7s ease, opacity .7s ease; }
.scale-in { opacity: 0; transform: scale(0.96); transition: transform .6s ease, opacity .6s ease; }
.reveal-left.active, .reveal-right.active, .reveal-up.active, .scale-in.active { opacity: 1; transform: none; }

/* Slight stagger support */
[data-delay="1"] { transition-delay: .05s; }
[data-delay="2"] { transition-delay: .1s; }
[data-delay="3"] { transition-delay: .15s; }
[data-delay="4"] { transition-delay: .2s; }

/* Image Gallery */
.image-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.image-card { position: relative; border-radius: 14px; overflow: hidden; min-height: 220px; background: linear-gradient(135deg, #e8f5e9, #e0f2f1); box-shadow: 0 10px 24px rgba(0,0,0,.08); cursor: pointer; background-size: cover; background-position: center; background-repeat: no-repeat; }
.image-card img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; display:block; transition: transform .6s ease, filter .6s ease; }
.image-card:hover img { transform: scale(1.05); }
.image-card::before, .image-card::after { pointer-events:none; }
.image-card::before { content: ''; position: absolute; inset: 0; background: var(--overlay, radial-gradient(circle at 30% 30%, rgba(0,0,0,.25), rgba(0,0,0,.45))); opacity: .35; transition: opacity .3s ease; }
.image-card::after { content: attr(data-title); position: absolute; left: 16px; bottom: 14px; color: #fff; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.5); letter-spacing: .2px; }
.image-card:hover::before { opacity: .25; }
.image-card.large { grid-column: span 6; min-height: 300px; }
.image-card.medium { grid-column: span 4; }
.image-card.small { grid-column: span 3; }

/* Improved mobile image gallery */
@media (max-width: 1100px){ 
    .image-card.small { grid-column: span 4; } 
}

@media (max-width: 800px){ 
    .image-gallery { gap: 8px; }
    .image-card.large, .image-card.medium, .image-card.small { 
        grid-column: span 6; 
        min-height: 200px;
    } 
}

@media (max-width: 560px){ 
    .image-gallery { 
        grid-template-columns: 1fr; 
        gap: 1rem;
        padding: 0 16px;
    }
    .image-card.large, .image-card.medium, .image-card.small { 
        grid-column: 1/-1; 
        min-height: 180px;
    }
    .image-card::after {
        left: 12px;
        bottom: 12px;
        font-size: 0.9rem;
    }
}

/* Testimonials slider */
.testimonials { overflow-x: auto; display: flex; gap: 16px; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.testimonial-card { flex: 0 0 360px; scroll-snap-align: center; background: white; border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.08); padding: 20px; border: 1px solid #e5e7eb; position: relative; }
.testimonial-card::before { content: '“'; position: absolute; top: -10px; left: 14px; font-size: 64px; line-height: 1; color: #e5e7eb; font-family: 'Poppins', sans-serif; }
.testimonial-author { display:flex; align-items:center; gap:10px; margin-top:12px; color: #334155; font-weight: 600; }
.testimonial-role { color:#64748b; font-weight: 500; font-size: 12px; }

/* Decorative gradient border */
.testimonial-card { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #0ea5e9, #22c55e) border-box; border: 2px solid transparent; }

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.page-header i {
    margin-right: 1rem;
    color: #a8d8a8;
}

/* Navigation Active State */
.nav-link.active {
    color: #a8d8a8 !important;
    font-weight: 500;
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
}

/* Service Link Buttons */
.service-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #45a049);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.service-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* About Preview Section */
.about-preview {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Mobile about content optimization */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }
    
    .about-content .text-content {
        order: 1;
        margin-bottom: 1rem;
    }
    
    .about-content .stats {
        order: 2;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-content .text-content p {
        text-align: left;
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .about-content .cta-button {
        margin-top: 1.5rem;
    }
}

.about-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

/* Extended Stats */
.stats-extended {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Company Heritage */
.company-heritage {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
    padding: 5rem 0;
}

.heritage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.heritage-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.heritage-card:hover {
    transform: translateY(-10px);
}

.heritage-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.heritage-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Our Values */
.our-values {
    padding: 5rem 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #4CAF50;
}

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

.value-card i {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1.5rem;
}

.value-card h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-outline {
    display: inline-block;
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button-outline:hover {
    background: white;
    color: #2c5530;
    transform: translateY(-2px);
}

/* Service Page Specific Styles */
.service-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.intro-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.service-details {
    max-width: 1000px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* Concepts Grid */
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.concept-card {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid var(--accent-color);
}

.concept-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.concept-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Solution Benefits */
.solution-benefits {
    margin: 2rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 10px;
}

.benefit-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Objectives Flow */
.objectives-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 3rem 0;
}

.objective-step {
    text-align: center;
    max-width: 200px;
}

.step-number {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.objective-step h4 {
    color: #2c5530;
    margin-bottom: 0.5rem;
}

.step-arrow {
    font-size: 2rem;
    color: #4CAF50;
    font-weight: bold;
}

/* Key Features */
.key-features {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: #2c5530;
    margin-bottom: 1rem;
}

/* Technologies Grid */
.technologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.tech-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.tech-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.tech-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.tech-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.tech-card li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.tech-card li::before {
    content: '•';
    color: #4CAF50;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact Page Styles */
.contact-main {
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.offices {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===== Nuovo layout verticale contatti + sedi (fisarmonica) ===== */
.contact-layout-vertical { display: flex; flex-direction: column; gap: 4rem; }
.contact-layout-vertical .contact-form-section, .contact-layout-vertical .offices-accordion { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 2rem 2.2rem 2.4rem; box-shadow: 0 10px 28px rgba(0,0,0,0.05); }
.contact-layout-vertical h2 { margin-top: 0; color: var(--primary-color); font-size: clamp(1.6rem, 1.1rem + 1vw, 2rem); }

/* Accordion base */
.accordion { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.office-panel { border: 1px solid #e2e8f0; border-radius: 14px; background: linear-gradient(135deg,#ffffff,#f8fafc); box-shadow: 0 4px 16px rgba(0,0,0,0.04); overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease; }
.office-panel[open] { border-color: var(--accent-color); box-shadow: 0 6px 26px rgba(76,175,80,0.18); }
.office-summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; font-weight: 600; color: var(--primary-color); position: relative; }
.office-summary::-webkit-details-marker { display: none; }
.office-summary span { display: inline-flex; align-items: center; gap: .6rem; font-size: 1rem; }
.office-summary i { color: var(--accent-color); font-size: 1.05rem; }
.office-summary .badge { background: #e8f5e9; color: #065f46; border: 1px solid #bbf7d0; padding: 4px 10px; font-size: .7rem; letter-spacing: .5px; font-weight: 600; border-radius: 999px; text-transform: uppercase; }

/* Disclosure chevron */
.office-summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 16px; top: 50%; transform: translateY(-50%) rotate(0deg); transition: transform .35s ease; font-size: .85rem; color: var(--accent-color); }
.office-panel[open] > .office-summary::after { transform: translateY(-50%) rotate(180deg); }

.office-body { padding: 0 1.4rem 1.6rem; animation: fadeAccordion .4s ease; }
@keyframes fadeAccordion { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.office-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem; align-items: start; }
@media (max-width: 860px){ .office-columns { grid-template-columns: 1fr; } }

.office-text p { margin: 0 0 1rem; font-size: .96rem; line-height: 1.55; }
.office-text i { color: var(--accent-color); margin-right: 4px; }
.office-text strong { color: var(--primary-color); }
.office-services h4 { margin: .75rem 0 .5rem; font-size: .95rem; color: var(--primary-color); }
.office-services ul { margin: 0 0 .5rem 1.1rem; padding: 0; font-size: .9rem; line-height: 1.4; }
.office-services li { margin: .3rem 0; }

/* Map container inside accordion */
.office-map-wrapper { position: relative; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #f1f5f9; box-shadow: inset 0 0 0 1px #f8fafc; padding: 0; }
/* Map dimensioni compatte per iframe Google Maps */
.map-embed { width: 100%; height: clamp(200px, 32vh, 320px); min-height: 200px; border: 0; display: block; }
@media (max-width: 860px){ .map-embed { height: clamp(190px, 38vh, 300px); } }
@media (max-width: 520px){ .map-embed { height: clamp(170px, 42vh, 260px); } }

/* Hover & focus states */
.office-summary:focus-visible { outline: 3px solid rgba(var(--primary-color-rgb), .4); outline-offset: 2px; border-radius: 10px; }
.office-panel:not([open]) .office-summary:hover { background: linear-gradient(135deg,#f1f5f9,#ffffff); }

/* Mobile adjustments */
@media (max-width: 640px){
    .contact-layout-vertical .contact-form-section, .contact-layout-vertical .offices-accordion { padding: 1.5rem 1.25rem 1.9rem; border-radius: 14px; }
    .office-summary { padding: .95rem 1.2rem; }
    .office-body { padding: 0 1.1rem 1.2rem; }
    .office-map-wrapper { min-height: 220px; }
}

/* Dark header gradient background compatibility (if nested) */
body .offices-accordion h2 { margin-bottom: .4rem; }

/* Utility: smooth open/close height (progressive enhancement) */
.office-panel { transition: box-shadow .35s ease, border-color .35s ease; }

/* Optional subtle separator between panels when closed */
.accordion .office-panel:not(:last-child) { margin-bottom: 0; }

/* Provide better print output: expand all */
@media print { .office-panel { border-color: #ccc !important; } .office-panel:not([open]) .office-body { display: block; } }

/* Utility */
.hidden { display: none !important; }

/* ===== Compact Contact Form ===== */
.contact-form.compact { --field-gap: 1rem; --field-gap-y: 1.1rem; }
.contact-form.compact .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--field-gap-y) var(--field-gap); }
.contact-form.compact .form-group { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.contact-form.compact .form-group--full { grid-column: 1 / -1; }
.contact-form.compact label { font-size: .85rem; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--primary-color); }
.contact-form.compact input, .contact-form.compact select, .contact-form.compact textarea { border: 1px solid #d9e2dc; background: #ffffff; padding: .7rem .85rem; font-size: .9rem; border-radius: 10px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.contact-form.compact input:focus, .contact-form.compact select:focus, .contact-form.compact textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), .15); }
.contact-form.compact textarea { resize: vertical; min-height: 140px; }
.contact-form.compact .assistive-hint { font-size: .7rem; opacity: .75; }
.contact-form.compact .checkbox-group.inline { display: flex; align-items: flex-start; gap: .6rem; font-size: .8rem; }
.contact-form.compact .checkbox-group.inline label { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .75rem; line-height: 1.3; }
.contact-form.compact .form-actions { display: flex; justify-content: flex-end; }
.contact-form.compact .submit-btn { padding: .85rem 1.6rem; font-size: .9rem; border-radius: 999px; }
.contact-form.compact .submit-btn i { margin-right: .4rem; }
.contact-form.compact .form-group input::placeholder, .contact-form.compact .form-group textarea::placeholder { color: #94a3b8; font-size: .75rem; }
@media (max-width: 640px){
    .contact-form.compact .form-grid { grid-template-columns: 1fr; }
    .contact-form.compact .form-actions { justify-content: center; }
    .contact-form.compact .submit-btn { width: 100%; }
}
/* Subtle hover/focus elevation */
.contact-form.compact .form-group:focus-within { position: relative; }
.contact-form.compact .form-group:focus-within label { color: var(--accent-color); }

/* CTA sopra l'accordion sedi */
.offices-cta-top { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.cta-scroll-form { display: inline-flex; align-items: center; gap: .55rem; background: linear-gradient(135deg, var(--accent-color), #45a049); color: #fff; text-decoration: none; font-weight: 500; padding: .65rem 1.15rem; border-radius: 999px; font-size: .9rem; box-shadow: 0 6px 18px rgba(76,175,80,.32); transition: transform .25s ease, box-shadow .25s ease; }
.cta-scroll-form i { font-size: .95rem; }
.cta-scroll-form:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(76,175,80,.4); }
@media (max-width: 640px){ .offices-cta-top { justify-content: center; } .cta-scroll-form { font-size: .85rem; padding: .6rem 1rem; } }


/* ======================== */
/* PDCA Circular Diagram    */
/* Scoped to .pdca only     */
/* ======================== */
.pdca { margin-top: 1rem; }

.pdca .pdca-circle {
    position: relative;
    width: min(720px, 100%);
    aspect-ratio: 1 / 1;
    margin: 2rem auto;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.03), rgba(0,0,0,0.02) 40%, transparent 41%),
                            conic-gradient(
                                #2f7d32 0 25%,
                                #007bff 0 50%,
                                #f59f00 0 75%,
                                #e03131 0 100%
                            );
    box-shadow: inset 0 0 0 8px rgba(255,255,255,0.9), 0 6px 18px rgba(0,0,0,0.08);
}

.pdca .pdca-center {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 44%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    padding: 1rem;
}

.pdca .pdca-title {
    display: block;
    font-weight: 700;
    font-size: clamp(1.25rem, 3.6vw, 1.75rem);
    letter-spacing: 0.08em;
}

.pdca .pdca-subtitle {
    display: block;
    color: #666;
    font-size: clamp(0.8rem, 2.4vw, 0.95rem);
}

.pdca .pdca-step {
    position: absolute;
    width: 46%;
    max-width: 320px;
    background: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem 0.9rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.pdca .pdca-step h4 {
    margin: 0.1rem 0 0.35rem;
    font-size: 1.05rem;
}

.pdca .pdca-step p {
    margin: 0;
    color: #444;
    line-height: 1.35;
    font-size: 0.95rem;
}

.pdca .pdca-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

/* Quadrant placements */
.pdca .plan { /* top-right */
    top: 4%;
    right: -2%;
}
.pdca .plan .pdca-badge { background: #2f7d32; }

.pdca .do { /* bottom-right */
    right: -2%;
    bottom: 4%;
}
.pdca .do .pdca-badge { background: #007bff; }

.pdca .check { /* bottom-left */
    left: -2%;
    bottom: 4%;
}
.pdca .check .pdca-badge { background: #f59f00; }

.pdca .act { /* top-left */
    left: -2%;
    top: 4%;
}
.pdca .act .pdca-badge { background: #e03131; }

.pdca .pdca-notes {
    list-style: none;
    padding: 0;
    margin: 1rem auto 0;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

.pdca .pdca-notes li {
    background: #fff;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.pdca .pdca-notes i { color: #2f7d32; margin-top: 0.2rem; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .pdca .pdca-step { width: 52%; }
}

@media (max-width: 720px) {
    .pdca .pdca-circle { width: 100%; }
    .pdca .pdca-step { width: 56%; }
    .pdca .pdca-notes { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .pdca .pdca-circle { background: none; }
    .pdca .pdca-center { width: 58%; }
    .pdca .pdca-step {
        position: static;
        width: 100%;
        max-width: none;
        margin: 0.6rem 0;
        padding: 1rem;
    }
    
    /* Ensure all PDCA variants work well on mobile */
    .pdca.compact .pdca-step {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .pdca-grid {
        padding: 0 16px;
    }
    
    .pdca-card {
        padding: 1rem;
    }
    
    .pdca-notes {
        padding: 0 16px;
        gap: 0.75rem;
    }
    
    .pdca-notes li {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* TEE process mobile optimization */
    .tee-flow {
        gap: 1rem;
        padding: 0 16px;
    }
    
    .tee-step {
        padding: 1.25rem;
    }
    
    /* Process timeline mobile */
    .process-timeline {
        gap: 1rem;
        padding: 0 16px;
    }
    
    .process-timeline .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        top: -8px;
        left: -8px;
    }
    
    .process-timeline .step-content {
        padding: 1.25rem;
        border-radius: 10px;
    }
}

/* Compact PDCA variant (no big circle, delicate arrows, tight spacing) */
.pdca.compact { margin-top: .5rem; }
/* hide circle only when neither circular nor oval variant is used */
.pdca.compact:not(.circular):not(.oval) .pdca-circle,
.pdca.compact:not(.circular):not(.oval) .pdca-center { display: none; }

.pdca.compact .pdca-flow {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    gap: 10px; /* tighter than default */
    margin: 1rem auto 0;
    max-width: 1000px;
}

.pdca.compact .pdca-step {
    position: relative;
    width: auto;
    max-width: none;
    padding: .75rem .9rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.pdca.compact .pdca-step h4 { font-size: 1rem; margin: .1rem 0 .25rem; }
.pdca.compact .pdca-step p { font-size: .92rem; line-height: 1.35; }

.pdca.compact .pdca-badge {
    width: 26px; height: 26px; font-size: .8rem; margin-bottom: .3rem;
}

.pdca.compact .pdca-arrow {
    display: grid; place-items: center; color: #9ca3af;
}
.pdca.compact .pdca-arrow i { font-size: .95rem; opacity: .9; }

/* Loop arrow: place after last step, visually subtle */
.pdca.compact .pdca-arrow.loop i { color: #a3a3a3; font-size: .95rem; }

/* Use brand tints for badges */
.pdca.compact .plan .pdca-badge { background: #2f7d32; }
.pdca.compact .do .pdca-badge { background: #1580ff; }
.pdca.compact .check .pdca-badge { background: #f59f00; }
.pdca.compact .act .pdca-badge { background: #e03131; }

.pdca.compact .pdca-notes { margin-top: .9rem; gap: .6rem .8rem; }
.pdca.compact .pdca-notes li { padding: .65rem .8rem; }

/* Responsive: stack steps, arrows inline between cards */
@media (max-width: 900px){
    .pdca.compact .pdca-flow { grid-auto-flow: row; grid-auto-columns: initial; grid-template-columns: 1fr; }
    .pdca.compact .pdca-arrow { justify-content: center; }
}

/* Compact circular layout: smaller circle, uniform step positions, delicate connectors */
.pdca.compact.circular { --pdca-outset: 9%; display: block; overflow: visible; }
.pdca.compact.circular .pdca-circle {
    width: min(520px, 100%);
    aspect-ratio: 1/1;
    margin: 1.2rem auto 0;
    border-radius: 50%;
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
        position: relative;
        z-index: 0;
    overflow: visible;
}
/* subtle inner ring */
.pdca.compact.circular .pdca-circle::after{
    content: '';
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    border: 1px dashed rgba(0,0,0,0.06);
}
.pdca.compact.circular .pdca-center { width: 34%; padding: .55rem; z-index: 1; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.pdca.compact.circular .pdca-title { font-size: clamp(1.05rem, 2.8vw, 1.35rem); }
.pdca.compact.circular .pdca-subtitle { font-size: clamp(.75rem, 2.2vw, .9rem); }

/* Steps sized uniformly and closer to the circle edge */
.pdca.compact.circular .pdca-step {
    position: absolute;
    width: 34%;
    max-width: 230px;
    padding: .58rem .72rem;
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.pdca.compact.circular .pdca-step h4 { font-size: .98rem; margin: .05rem 0 .2rem; line-height: 1.2; }
.pdca.compact.circular .pdca-step p { font-size: .9rem; line-height: 1.35; }
.pdca.compact.circular .pdca-badge { width: 24px; height: 24px; font-size: .78rem; margin-bottom: .25rem; }

/* Uniform positions (top/right/bottom/left) placed just outside ring */
.pdca.compact.circular .plan { top: calc(-1 * var(--pdca-outset)); left: 50%; transform: translate(-50%, 0); }
.pdca.compact.circular .do { top: 50%; right: calc(-1 * var(--pdca-outset)); transform: translate(0, -50%); }
.pdca.compact.circular .check { bottom: calc(-1 * var(--pdca-outset)); left: 50%; transform: translate(-50%, 0); }
.pdca.compact.circular .act { top: 50%; left: calc(-1 * var(--pdca-outset)); transform: translate(0, -50%); }

/* Delicate connectors following the circle */
.pdca.compact.circular .pdca-connector { position: absolute; color: #a3a3a3; opacity: .9; z-index: 1; }
.pdca.compact.circular .pdca-connector i { font-size: .9rem; }
.pdca.compact.circular .pdca-connector.c1 { top: 20%; right: 24%; transform: rotate(45deg); }
.pdca.compact.circular .pdca-connector.c2 { right: 20%; bottom: 24%; transform: rotate(135deg); }
.pdca.compact.circular .pdca-connector.c3 { bottom: 20%; left: 24%; transform: rotate(-135deg); }
.pdca.compact.circular .pdca-connector.c4 { left: 20%; top: 24%; transform: rotate(-45deg); }

@media (max-width: 720px){
        .pdca.compact.circular { --pdca-outset: 10%; }
        .pdca.compact.circular .pdca-circle { width: min(440px, 100%); }
        .pdca.compact.circular .pdca-step { width: 44%; max-width: 260px; }
}
@media (max-width: 560px){
    /* fallback to stacked compact flow on very small screens */
    .pdca.compact.circular .pdca-circle { background: none; box-shadow: none; }
    .pdca.compact.circular .pdca-step { position: static; width: 100%; max-width: none; transform: none; }
    .pdca.compact.circular .pdca-connector { display: none; }
}

/* ===== PDCA COMPACT OVAL VARIANT ===== */
.pdca.compact.oval { --pdca-outset-x: 10%; --pdca-outset-y: 3.5%; overflow: visible; }
.pdca.compact.oval .pdca-circle { display: block; }
.pdca.compact.oval .pdca-center { display: grid; place-items: center; }
.pdca.compact.oval .pdca-circle {
    width: min(560px, 100%);
    aspect-ratio: 16 / 9; /* flatter oval (less tall) */
    margin: 1rem auto 0;
    border-radius: 50% / 38%;
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
    position: relative;
}
.pdca.compact.oval .pdca-circle::after {
    content: '';
    position: absolute;
    inset: 20% 16%;
    border-radius: 50% / 40%;
    border: 1px dashed rgba(0,0,0,0.06);
}
.pdca.compact.oval .pdca-center {
    width: 18%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.pdca.compact.oval .pdca-step {
    position: absolute;
    width: 33%;
    max-width: 280px;
    padding: .58rem .72rem;
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.pdca.compact.oval .pdca-step h4 { font-size: .98rem; margin: .05rem 0 .2rem; line-height: 1.2; }
.pdca.compact.oval .pdca-step p { font-size: .9rem; line-height: 1.35; }
.pdca.compact.oval .pdca-badge { width: 24px; height: 24px; font-size: .78rem; margin-bottom: .25rem; }

/* Positions arranged to avoid overlap (top, right, bottom, left) */
.pdca.compact.oval .plan { top: calc(-1 * var(--pdca-outset-y)); left: 50%; transform: translate(-50%, 0); }
.pdca.compact.oval .do { top: 50%; right: calc(-1 * var(--pdca-outset-x)); transform: translate(0, -50%); }
.pdca.compact.oval .check { bottom: calc(-1 * var(--pdca-outset-y)); left: 50%; transform: translate(-50%, 0); }
.pdca.compact.oval .act { top: 50%; left: calc(-1 * var(--pdca-outset-x)); transform: translate(0, -50%); }

/* Delicate connectors for oval */
.pdca.compact.oval .pdca-connector { position: absolute; color: #a3a3a3; opacity: .9; z-index: 1; }
.pdca.compact.oval .pdca-connector i { font-size: .9rem; }
.pdca.compact.oval .pdca-connector.c1 { top: 26%; right: 28%; transform: rotate(30deg); }
.pdca.compact.oval .pdca-connector.c2 { right: 22%; bottom: 28%; transform: rotate(120deg); }
.pdca.compact.oval .pdca-connector.c3 { bottom: 26%; left: 28%; transform: rotate(-150deg); }
.pdca.compact.oval .pdca-connector.c4 { left: 22%; top: 28%; transform: rotate(-60deg); }

@media (max-width: 900px){
    .pdca.compact.oval { --pdca-outset-x: 8%; --pdca-outset-y: 3%; }
        .pdca.compact.oval .pdca-circle { width: min(520px, 100%); }
}
@media (max-width: 720px){
    .pdca.compact.oval { --pdca-outset-x: 6%; --pdca-outset-y: 2.5%; }
        .pdca.compact.oval .pdca-circle { width: min(480px, 100%); }
    .pdca.compact.oval .pdca-step { width: 34%; }
}
@media (max-width: 560px){
    .pdca.compact.oval .pdca-circle { background: none; border: none; }
    .pdca.compact.oval .pdca-step { position: static; width: 100%; max-width: none; transform: none; }
    .pdca.compact.oval .pdca-connector { display: none; }
}

.office-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.office-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.office-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.office-header i {
    color: #a8d8a8;
}

.office-type {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.office-details {
    padding: 1.5rem;
}

.office-details p {
    margin-bottom: 1rem;
}

.office-details i {
    color: var(--accent-color);
    width: 20px;
}

.office-services {
    padding: 0 1.5rem 1.5rem;
}

.office-services h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.office-services ul {
    columns: 2;
    column-gap: 1rem;
}

.office-services li {
    margin-bottom: 0.5rem;
    break-inside: avoid;
}

/* Contact Form Styles */
.contact-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c5530;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-group label {
    margin-bottom: 0;
    line-height: 1.4;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Maps Section */
.maps-section {
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
    padding: 4rem 0;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.map-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-card h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    margin: 0;
    text-align: center;
}

.map-placeholder {
    padding: 3rem;
    text-align: center;
    background: #f8f9fa;
    color: #666;
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Quick Contact */
.quick-contact {
    padding: 4rem 0;
}

.quick-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.quick-contact-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.quick-contact-item:hover {
    transform: translateY(-5px);
}

.quick-contact-item i {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.quick-contact-item h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
}

.quick-contact-item p {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.quick-contact-item span {
    color: #666;
    font-size: 0.9rem;
}

/* Footer Offices */
.footer-offices {
    margin-top: 1rem;
}

.footer-offices small {
    color: #999;
}

/* Related Services */
.related-services {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface-alt), var(--surface));
}

/* Unified Related Services grid and cards */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Make the whole card clickable for better UX */
a.related-card {
    display: block;
    background: #fff;
    border: 1px solid #e8eef0;
    border-radius: 14px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

a.related-card:hover,
a.related-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(76,175,80,.16);
    border-color: var(--accent-color);
    outline: none;
}

a.related-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f8f4; /* soft green tint */
    color: var(--accent-color);
    font-size: 1.4rem;
}

a.related-card h3 {
    margin: 10px 0 6px;
    font-size: 1.05rem;
    color: var(--primary-color);
}

a.related-card p {
    color: #64748b;
    line-height: 1.45;
    font-size: .95rem;
}

/* Additional styles for new pages */
.highlight-box {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: center;
    border-left: 5px solid #4CAF50;
}

.highlight-box h3 {
    color: #2c5530;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.highlight-box i {
    color: #4CAF50;
}

/* Services Grid for Diagnosis page */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.services-grid .service-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1a5f3f;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-grid .service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(26, 95, 63, 0.1);
}

.services-grid .service-item i {
    color: #1a5f3f;
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.services-grid .service-item h4 {
    margin: 0 0 8px 0;
    color: #1a5f3f;
    font-weight: 600;
    font-size: 1rem;
}

.services-grid .service-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive behavior for services grid */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .services-grid .service-item {
        padding: 12px;
    }
}

/* Keep original services-list for other pages */
.services-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateX(10px);
}

.service-item i {
    color: #4CAF50;
    font-size: 1.5rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.service-item h4 {
    color: #2c5530;
    margin-bottom: 0.5rem;
}

.legal-framework {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 4rem 0;
}

.legal-box {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    border-left: 5px solid #2196f3;
}

.legal-box h3 {
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.obligations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.obligation-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 4px solid #4CAF50;
}

.obligation-card i {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.obligation-card h4 {
    color: #2c5530;
    margin-bottom: 1rem;
}

.audit-process {
    padding: 4rem 0;
}

.process-flow {
    /* Stable single-row flow: steps and arrows stay inline; scroll if needed */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 16px;
    margin: 3rem 0;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}
.process-flow > * { scroll-snap-align: center; }

/* ===== PROGETTAZIONE PAGE: IMPROVED DESIGN PROCESS ===== */
.design-process {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.design-process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.design-process .container {
    position: relative;
    z-index: 1;
}

.design-process .section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.design-process .process-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 0;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
    max-width: 1000px;
    margin: 0 auto;
}







.design-process .step-content h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.design-process .step-content p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

/* Add connecting lines between steps */
.design-process .process-step:not(:last-child)::before {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 2rem;
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .design-process .process-step {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .design-process .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .design-process .step-content h3 {
        font-size: 1.3rem;
    }
    
    .design-process .step-content p {
        font-size: 0.95rem;
    }
    
    .design-process .section-title {
        font-size: 2rem;
    }
}

/* ===== TECHNOLOGIES SECTION IMPROVEMENTS ===== */
.technologies {
    background: white;
}

.technologies .tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.technologies .tech-item {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.technologies .tech-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-8px) scale(1.02);
}

.technologies .tech-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    display: block;
}

.technologies .tech-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.technologies .tech-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== SERVICE INTRO IMPROVEMENTS ===== */
.service-intro {
    padding: 6rem 0;
}

.service-intro .intro-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
}

.service-intro .intro-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.service-intro .intro-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}

.service-intro .intro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-intro .stat-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.service-intro .stat-item:hover {
    transform: translateY(-8px);
}

.service-intro .stat-item i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.service-intro .stat-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-intro .stat-item p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.95;
}

@media (min-width: 992px) {
    .service-intro .intro-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}





/* Mobile responsiveness for all new sections */
@media (max-width: 768px) {
    .related-services .related-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .related-services a.related-card {
        padding: 2rem;
    }
    
    .cta-section .cta-content h2 {
        font-size: 2.2rem;
    }
    
    .cta-section .cta-content p {
        font-size: 1.1rem;
    }
    
    .service-intro .intro-text h2 {
        font-size: 2rem;
    }
    
    .service-intro .intro-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}



/* Ensure audit page process keeps its intended horizontal flow */
.audit-process .process-flow {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-items: stretch;
    align-items: stretch;
    gap: 16px;
    margin: 3rem 0;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
}
.audit-process .process-arrow { display: none; }
.audit-process .process-step { width: auto; }

@media (min-width: 1200px) {
    /* On large screens, force a single row of 5 columns */
    .audit-process .process-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ESCo: "Come lavoriamo" should be vertical instead of horizontal (page-scoped) */
.page-esco .design-process .process-flow {
    grid-auto-flow: initial;         /* use explicit grid */
    grid-auto-columns: initial;
    grid-template-columns: 1fr;      /* mobile: single column */
    align-items: stretch;
    justify-items: stretch;
    overflow: visible;               /* no horizontal scrolling */
    padding-bottom: 0;
    gap: 1rem;                       /* compact spacing */
    scroll-snap-type: none;
}
.page-esco .design-process .process-arrow { display: none; }
.page-esco .design-process .step {
    width: 100%;
    max-width: none;                 /* fill the column */
    margin: 0;                       /* rely on grid gap */
    padding: 1rem;                   /* tighter padding */
    gap: 0.75rem;                    /* inner spacing */
    display: grid;                   /* grid for consistent alignment */
    grid-template-columns: 44px 1fr; /* number + content */
    grid-auto-rows: auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: start;
    text-align: left;                /* left align titles and text */
}
.page-esco .design-process .step-number {
    width: 40px; height: 40px; font-size: 1.05rem;
    grid-column: 1; grid-row: 1 / span 2; /* span title + desc */
    align-self: start; justify-self: start;
}
.page-esco .design-process { padding: 3rem 0; }
.page-esco .design-process .section-title { margin-bottom: 1.5rem; }

/* Keep title inline with description and compact spacing */
.page-esco .design-process .step h4 {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    grid-column: 2; grid-row: 1;
}
.page-esco .design-process .step p {
    margin: 0;
    font-size: .95rem;
    opacity: .9;
    grid-column: 2; grid-row: 2;
    min-width: 16ch;                 /* avoid squishing to tiny widths */
    white-space: normal;             /* allow multiple lines */
    overflow: visible;               /* no truncation */
    text-overflow: clip;
    hyphens: auto; -webkit-hyphens: auto;
    overflow-wrap: anywhere;         /* prevent overflow on long words */
}

@media (min-width: 768px) {
    .page-esco .design-process .process-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .page-esco .design-process .process-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.process-step {
    text-align: center;
    width: 240px;
    background: white;
    padding: 2rem 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.process-arrow {
    font-size: 2rem;
    color: #4CAF50;
    font-weight: bold;
}

/* Benefits equal height for cleaner grid */
.benefits-grid { align-items: stretch; }
.benefits-grid .benefit-card { height: 100%; display: flex; flex-direction: column; justify-content: flex-start; }

.benefits-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 4rem 0;
}

.benefit-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-bottom: 4px solid #4CAF50;
}

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

.benefit-card i {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    color: #2c5530;
    margin-bottom: 1rem;
}

/* Partner page styles */
.partners-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.partners-categories {
    margin: 4rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h3 {
    color: #2c5530;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-section i {
    color: #4CAF50;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.partner-placeholder {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.partner-placeholder:hover {
    transform: translateY(-5px);
}

.logo-placeholder {
    width: 120px;
    height: 80px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.logo-placeholder i {
    font-size: 2rem;
    color: #ccc;
}

/* Partner SVG/logo sizing */
.partner-logo-img {
    display: block;
    max-width: 100%;
    max-height: 64px; /* keep margin inside the 80px placeholder */
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Fallback: explicit class to indicate a logo image exists */
.logo-placeholder.has-logo { border: none; background: transparent; }

/* Variante sfondo per loghi chiari */
.logo-placeholder.logo-light-bg { background: linear-gradient(135deg,#0095ff,#0099ff); border: none; }
.logo-placeholder.logo-light-bg img { filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }

.partner-placeholder h4 {
    color: #2c5530;
    margin-bottom: 1rem;
}

.partner-link {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.partner-link:hover {
    color: #45a049;
}

/* If a real logo image is present, drop the dashed placeholder styling */
.logo-placeholder:has(img) {
    border: none;
    background: transparent;
}

.partnership-benefits {
    padding: 4rem 0;
}

.partnership-instructions {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 3rem 0;
}

.instructions-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid #f39c12;
}

.instructions-box h2 {
    color: #d68910;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.instructions-box i {
    color: #f39c12;
}

.instructions-box a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

.instructions-box a:hover {
    text-decoration: underline;
}

/* ===== SERVICES DETAILED PAGE STYLES ===== */
.services-detailed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.service-detailed-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-detailed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-detailed-card .service-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.service-detailed-card .service-content {
    flex: 1;
}

.service-detailed-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-detailed-card p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-cta:hover {
    color: var(--secondary-color);
}

.service-cta::after {
    content: '→';
    transition: transform 0.3s ease;
}

.service-cta:hover::after {
    transform: translateX(5px);
}

.services-cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-button.secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* ===== INDIVIDUAL SERVICE PAGE STYLES ===== */
.service-types, .design-process, .technologies, .incentives-types, .cer-types, .buying-process {
    padding: 4rem 0;
}

.types-grid, .incentives-grid, .tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.type-card, .incentive-card, .tech-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.type-card:hover, .incentive-card:hover, .tech-item:hover {
    transform: translateY(-5px);
}

.type-icon, .incentive-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.type-card h3, .incentive-card h3, .tech-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.type-card ul, .incentive-card ul {
    list-style: none;
    padding: 0;
}

.type-card li, .incentive-card li {
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.type-card li::before, .incentive-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.incentive-details p {
    font-weight: 500;
    margin-bottom: 1rem;
}

.incentive-amount {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
}

/* Process Timeline */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 2rem;
    position: relative;
}

/* remove vertical guide line for grid layout */
.process-timeline::before { content: none; }

.process-timeline .process-step {
    position: relative;
    width: 100%;
}

.process-timeline .step-number {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    z-index: 1;
}

.process-timeline .step-content {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
}

/* small horizontal connector from dot to card */
/* no connector in grid layout */
.process-timeline .step-content::before { display: none !important; }

@media (max-width: 600px) {
    .process-timeline { grid-template-columns: 1fr; }
    .process-timeline .step-number { top: -10px; left: -10px; width: 40px; height: 40px; font-size: .95rem; }
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-content ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.step-content li {
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    color: #666;
}

.step-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* TEE Process Specific */
.tee-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tee-step {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



.step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.tee-step h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tee-step p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Financial Benefits Comparison */
.financial-benefits {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.financial-benefits .section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.benefits-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.benefit-column {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.benefit-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.benefit-column.highlighted {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0) !important;
    color: #333 !important;
    border: 3px solid #28a745 !important;
    position: relative;
    overflow: hidden;
}

.benefit-column.highlighted::before {
    content: '✓ CONSIGLIATO';
    position: absolute;
    top: 15px;
    right: -30px;
    background: #28a745;
    color: white;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: bold;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.benefit-column h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.benefit-column.highlighted h3 {
    color: #28a745 !important;
    font-weight: 700;
}

.benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.benefit-column.highlighted .benefit-item {
    border-bottom-color: rgba(40, 167, 69, 0.2);
}

.benefit-label {
    font-weight: 500;
    color: #333;
}

.benefit-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.benefit-column.highlighted .benefit-label {
    color: #333 !important;
    font-weight: 600;
}

.benefit-column.highlighted .benefit-value {
    color: #28a745 !important;
    font-weight: 800;
    font-size: 1.2rem;
}

/* Mobile responsiveness for benefits comparison */
@media (max-width: 768px) {
    .benefits-comparison {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .benefit-column {
        padding: 1.5rem;
    }
    
    .benefit-column.highlighted::before {
        font-size: 0.6rem;
        padding: 4px 35px;
        right: -35px;
    }
}

/* === Incentivi e TEE page: give more breathing space === */
.page-incentivi .page-header { padding: 5rem 0; }
.page-incentivi .service-intro { margin: 0; padding: 3.5rem 0; }
.page-incentivi .intro-text { max-width: 900px; line-height: 1.9; font-size: 1.15rem; }
.page-incentivi .intro-content { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: start; }
.page-incentivi .intro-benefits { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.page-incentivi .benefit-item { margin-bottom: .75rem; }

.page-incentivi .incentives-types { padding: 5rem 0 4.5rem; }
.page-incentivi .incentives-grid { gap: 2.5rem; margin-top: 2.5rem; }
.page-incentivi .incentive-card { padding: 2.25rem; }
.page-incentivi .incentive-card ul { margin-top: .75rem; }

.page-incentivi .tee-process { padding: 4.5rem 0; }
.page-incentivi .tee-flow { gap: 2rem; margin-top: 2.25rem; }
.page-incentivi .tee-step { padding: 1.75rem; }
.page-incentivi .tee-step p { line-height: 1.65; }

.page-incentivi .financial-benefits { padding: 4.5rem 0; }
.page-incentivi .benefits-comparison { gap: 2.5rem; margin-top: 2.25rem; }
.page-incentivi .benefit-column { padding: 2.25rem; }

.page-incentivi .support-services { padding: 4.5rem 0; }
.page-incentivi .support-grid { gap: 2rem; margin-top: 2.25rem; }
.page-incentivi .support-card { padding: 2rem; }

.page-incentivi .related-services { padding: 4.25rem 0; }
.page-incentivi .related-grid { gap: 2rem; margin-top: 2.25rem; }
.page-incentivi .related-card { padding: 1.75rem; }

.page-incentivi .cta-section { padding: 5rem 0; }

@media (max-width: 960px){
    .page-incentivi .intro-content { grid-template-columns: 1fr; gap: 2rem; }
    .page-incentivi .page-header { padding: 4rem 0; }
}
@media (max-width: 600px){
    .page-incentivi .incentives-grid, .page-incentivi .tee-flow, .page-incentivi .benefits-comparison, .page-incentivi .support-grid, .page-incentivi .related-grid { gap: 1.25rem; }
    .page-incentivi .intro-text { font-size: 1.06rem; line-height: 1.85; }
    .page-incentivi .page-header { padding: 3.2rem 0; }
}

.benefit-value {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Market Analysis */
.market-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.insight-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.insight-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.insight-data {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.data-point {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-red {
    color: #dc3545;
}

.text-green {
    color: #28a745;
}

/* Client Types */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.client-type {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.client-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.client-type h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.client-benefits {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.client-benefits span {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #555;
}

/* Success Cases */
.cases-grid, .stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.case-card, .story-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.case-tag {
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.case-results {
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.result-value {
    font-weight: bold;
    color: var(--primary-color);
}

.story-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.story-results {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.story-results span {
    background: #f0f9ff;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    text-align: center;
}

/* Support Services */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.support-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.support-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* CER Specific Styles */
.cer-definition {
    background: #f8f9fa;
    padding: 4rem 0;
}

.definition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.cer-requirements {
    list-style: none;
    padding: 0;
}

.cer-requirements li {
    padding: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid #eee;
}

.cer-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.cer-requirements strong {
    color: var(--primary-color);
}

.definition-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Narrow-scoped benefit card variant used in definition-benefits blocks */
.definition-benefits .benefit-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.definition-benefits .benefit-card i {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.definition-benefits .benefit-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.definition-benefits .benefit-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.type-card.highlighted {
    border: 2px solid var(--secondary-color);
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.type-specs {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.type-specs span {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-align: center;
}

/* Economic Benefits Calculator */
.benefits-calculator {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.calculator-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.calculator-intro h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.benefits-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item.highlight {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
}

/* Legal Framework */
.legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.legal-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legal-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.legal-card ul {
    list-style: none;
    padding: 0;
}

.legal-card li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

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

.legal-card strong {
    color: var(--primary-color);
}

/* Responsive Design for Service Pages */
@media (max-width: 768px) {
    /* Stack steps and hide arrows on small screens */
    .process-flow { grid-auto-flow: row; grid-auto-columns: initial; grid-template-columns: 1fr; justify-items: center; overflow: visible; }
    .process-flow .process-arrow { display: none; }
    .process-step { width: 100%; max-width: 520px; }
    .service-detailed-card {
        flex-direction: column;
        text-align: center;
    }
    
    .definition-grid, .benefits-comparison {
        grid-template-columns: 1fr;
    }
    
    .process-timeline .process-step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .insight-data, .client-benefits {
        flex-direction: column;
        align-items: center;
    }
    
    .case-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ======================== */
/* PDCA Simple Grid Layout  */
/* Clean 2x2 responsive     */
/* ======================== */
.pdca-simple {
  margin: 2rem 0;
}

.pdca-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Cerchio sottile per evidenziare il ciclo */
.pdca-grid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 90%);
  height: min(520px, 90%);
  border: 2px dashed rgba(76, 175, 80, 0.3);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Frecce circolari tra le card */
.pdca-grid::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 70%);
  height: min(360px, 70%);
  background: 
    radial-gradient(circle at 85% 15%, rgba(76, 175, 80, 0.6) 8px, transparent 8px),
    radial-gradient(circle at 85% 85%, rgba(76, 175, 80, 0.6) 8px, transparent 8px),
    radial-gradient(circle at 15% 85%, rgba(76, 175, 80, 0.6) 8px, transparent 8px),
    radial-gradient(circle at 15% 15%, rgba(76, 175, 80, 0.6) 8px, transparent 8px);
  z-index: 0;
  pointer-events: none;
}

.pdca-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}

.pdca-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Ordine visuale del ciclo PDCA */
.pdca-card.plan { 
  order: 1; 
  border-radius: 64px 12px 12px 12px; /* Angolo in alto a sinistra più stondato */
  text-align: right; /* Allineamento a sinistra per card sinistra */
}
.pdca-card.do { 
  order: 2; 
  border-radius: 12px 64px 12px 12px; /* Angolo in alto a destra più stondato */
  text-align: left; /* Allineamento a destra per card destra */
}
.pdca-card.check { 
  order: 4; 
  border-radius: 12px 12px 64px 12px; /* Angolo in basso a destra più stondato */
  text-align: left; /* Allineamento a destra per card destra */
}
.pdca-card.act { 
  order: 3; 
  border-radius: 12px 12px 12px 64px; /* Angolo in basso a sinistra più stondato */
  text-align: right; /* Allineamento a sinistra per card sinistra */
}

/* ISO Standards Section */
.iso-standards {
  margin: 3rem 0 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  border-left: 4px solid var(--accent-color);
}

/* ISO Standards as nested feature card */
.feature-card.iso-feature {
  grid-column: span 2; /* Occupa lo spazio di due caselle */
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem; /* Ridotto da 2rem a 1.5rem */
  align-self: center; /* Centra verticalmente nella griglia */
}

.iso-standards-nested {
  width: 100%;
}

.iso-header-main {
  text-align: center;
  margin-bottom: 1rem; /* Ridotto da 1.5rem a 1rem */
}

.iso-header-main i {
  font-size: 1.75rem; /* Ridotto da 2rem a 1.75rem */
  color: var(--accent-color);
  margin-bottom: 0.4rem; /* Ridotto da 0.5rem a 0.4rem */
  display: block;
}

.iso-header-main h3 {
  color: var(--primary-color);
  margin: 0;
  font-size: 1.2rem; /* Ridotto da 1.3rem a 1.2rem */
}

.iso-grid-nested {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem; /* Ridotto da 1.5rem a 1.25rem */
}

.iso-card-small {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(76, 175, 80, 0.1);
}

.iso-header-small {
  text-align: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.iso-header-small i {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: block;
}

.iso-header-small h4 {
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
}

.iso-subtitle-small {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  font-weight: 400;
}

.iso-card-small p {
  color: #555;
  line-height: 1.5;
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive per la feature card ISO */
@media (max-width: 768px) {
  .feature-card.iso-feature {
    grid-column: span 1; /* Su mobile occupa una sola colonna */
  }
  
  .iso-grid-nested {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .iso-card-small {
    padding: 1rem;
  }
}

.iso-standards h3 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 1.5rem;
  position: relative;
}

.iso-standards h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.iso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.iso-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(76, 175, 80, 0.1);
}

.iso-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.iso-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.iso-header i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.iso-header h4 {
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.iso-subtitle {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  font-weight: 400;
}

.iso-card p {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
  text-align: justify;
}

/* Responsive ISO section */
@media (max-width: 768px) {
  .iso-standards {
    margin: 2rem 0;
    padding: 1.5rem;
  }
  
  .iso-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .iso-card {
    padding: 1.25rem;
  }
  
  .iso-header i {
    font-size: 2rem;
  }
}

/* UNI 16247 Standard Section */
.uni-standard-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 4rem 0;
  margin: 2rem 0;
}

.uni-intro {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.uni-intro p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
}

.uni-parts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.uni-part-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid var(--accent-color);
}

.uni-part-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.uni-part-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.uni-part-header i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: block;
}

.uni-part-header h4 {
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.uni-subtitle {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  font-weight: 400;
}

.uni-part-card p {
  color: #555;
  line-height: 1.5;
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive UNI section */
@media (max-width: 1024px) {
  .uni-parts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .uni-standard-section {
    padding: 3rem 0;
  }
  
  .uni-parts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .uni-part-card {
    padding: 1.25rem;
  }
  
  .uni-part-header i {
    font-size: 1.75rem;
  }
}

.pdca-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.pdca-card.plan .pdca-badge { background: #2f7d32; }
.pdca-card.do .pdca-badge { background: #1976d2; }
.pdca-card.check .pdca-badge { background: #f57c00; }
.pdca-card.act .pdca-badge { background: #d32f2f; }

.pdca-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.pdca-card p {
  margin: 0;
  color: #666;
  line-height: 1.5;
  font-size: 0.95rem;
}

.pdca-notes {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  max-width: 800px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.pdca-notes li {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

.pdca-notes i {
  color: var(--accent-color);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* Desktop: icona e titolo sulla stessa linea */
@media (min-width: 769px) {
  .pdca-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .pdca-badge {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .pdca-title-wrapper {
    flex: 1;
  }
  
  .pdca-card h4 {
    margin: 0 0 0.2rem 0;
  }
  
  .pdca-translation {
    font-size: 0.7rem;
    color: #999;
    font-weight: 400;
    font-style: italic;
    display: block;
    line-height: 1;
  }
  
  /* Specchia P e A - badge a destra del testo */
  .pdca-card.plan .pdca-card-header,
  .pdca-card.act .pdca-card-header {
    flex-direction: row-reverse;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .pdca-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .pdca-notes {
    grid-template-columns: 1fr;
  }
  
  .pdca-card {
    padding: 1.25rem;
    text-align: center !important;
  }
  
  .pdca-card.plan,
  .pdca-card.do,
  .pdca-card.check,
  .pdca-card.act {
    border-radius: 12px !important;
  }
  
  .pdca-card::after {
    display: none;
  }
  
  .pdca-card-header {
    display: block;
    text-align: center;
  }
  
  .pdca-badge {
    margin-bottom: 1rem;
  }
}

/* =============================================================
     FINAL OVERRIDE: Legal framework grid forced to 2 columns max
     - Previous generic centered grid rules were constraining width
     - This rule uses higher specificity and appears at end of file
============================================================= */
body.page-comunita .legal-framework .legal-grid,
body.page-esco .legal-framework .legal-grid,
body .legal-framework .legal-grid { /* broad fallback */
        grid-template-columns: repeat(2, minmax(420px, 1fr)) !important;
        max-width: 1140px;
        margin-left: auto;
        margin-right: auto;
        gap: 2.2rem 2.4rem;
}

/* Equal height look (natural with stretch) */
body .legal-framework .legal-grid { align-items: stretch; }
body .legal-framework .legal-card { display: flex; flex-direction: column; }
body .legal-framework .legal-card ul { margin-top: 0.25rem; }

/* Mobile: single column */
@media (max-width: 900px) {
    body .legal-framework .legal-grid { grid-template-columns: 1fr !important; }
}

/* =============================================================
     Cookie Banner & Preferences Modal
     - Accessibile (focus trap gestito da JS)
     - Tema coerente con palette green
     - Mobile first, sticky bottom
============================================================== */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1.25rem 1rem 1.1rem;
    z-index: 1200;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.95rem;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner .cookie-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 1.25rem; align-items: flex-start; }
.cookie-banner .cookie-text { flex: 1; line-height: 1.5; }
.cookie-banner .cookie-text a { color: #b9f6ca; text-decoration: underline; }
.cookie-banner .cookie-text a:hover { color: #e8ffe0; }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie-actions button { cursor:pointer; border:none; font: inherit; font-weight:500; border-radius: 8px; padding: .65rem 1.1rem; display:inline-flex; align-items:center; gap:.4rem; }
.cookie-btn-primary { background:#4CAF50; color:#fff; box-shadow:0 4px 12px rgba(0,0,0,.25); }
.cookie-btn-primary:hover { background:#43a047; }
.cookie-btn-outline { background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.4); }
.cookie-btn-outline:hover { background:rgba(255,255,255,.2); }
.cookie-btn-link { background:none; color:#c8e6c9; padding:.4rem .6rem; }
.cookie-btn-link:hover { color:#fff; text-decoration: underline; }
@media (max-width: 900px){
    .cookie-banner .cookie-inner { flex-direction: column; }
    .cookie-actions { width:100%; }
    .cookie-actions button { flex:1 1 auto; justify-content: center; }
}

/* Preferences Modal */
.cookie-modal-backdrop { position: fixed; inset:0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); z-index: 1300; display:flex; align-items:center; justify-content:center; padding:1rem; }
.cookie-modal-backdrop[hidden] { display:none !important; }
.cookie-modal { background:#ffffff; border-radius:18px; max-width:680px; width:100%; padding:2rem 2rem 1.75rem; box-shadow:0 10px 40px rgba(0,0,0,.25); position:relative; overflow:hidden; }
.cookie-modal h2 { margin:0 0 .75rem; font-size:1.55rem; color: var(--primary-color); display:flex; align-items:center; gap:.6rem; }
.cookie-modal p { margin:0 0 1rem; line-height:1.55; font-size:.98rem; }
.cookie-modal section { margin-bottom:1.25rem; }
.cookie-modal .cookie-cat { border:1px solid #e5e7eb; border-radius:12px; padding:1rem 1.1rem; background:#f9fafb; position:relative; }
.cookie-modal .cookie-cat + .cookie-cat { margin-top:.85rem; }
.cookie-modal .cookie-cat h3 { margin:0 0 .35rem; font-size:1.05rem; color: var(--secondary-color); }
.cookie-modal .cookie-cat p { margin:0; font-size:.85rem; color:#4b5563; }
.cookie-modal .switch { position:absolute; top:1rem; right:1rem; }
.cookie-modal .modal-actions { display:flex; gap:.75rem; flex-wrap:wrap; margin-top:1.25rem; }
.cookie-modal button { cursor:pointer; border:none; border-radius:10px; padding:.75rem 1.2rem; font:inherit; font-weight:600; }
.cookie-modal .save-btn { background: linear-gradient(135deg,var(--accent-color),#45a049); color:#fff; box-shadow:0 4px 16px rgba(76,175,80,.35); }
.cookie-modal .save-btn:hover { filter:brightness(1.05); }
.cookie-modal .reject-btn { background:#e53935; color:#fff; }
.cookie-modal .reject-btn:hover { background:#d32f2f; }
.cookie-modal .accept-btn { background:#2e7d32; color:#fff; }
.cookie-modal .accept-btn:hover { background:#256428; }
.cookie-modal .close-btn { position:absolute; top:10px; right:10px; background:none; border:none; font-size:1.2rem; cursor:pointer; color:#555; }
.cookie-modal .close-btn:hover { color:#000; }
@media (max-width:600px){
    .cookie-modal { padding:1.4rem 1.25rem 1.25rem; border-radius:16px; }
    .cookie-modal h2 { font-size:1.35rem; }
    .cookie-modal .cookie-cat { padding:0.9rem 0.9rem; }
}

/* Toggle Switch */
.toggle { position:relative; display:inline-block; width:46px; height:24px; }
.toggle input { opacity:0; width:0; height:0; }
.slider { position:absolute; cursor:pointer; inset:0; background:#cbd5e1; border-radius:24px; transition:.25s; }
.slider:before { content:""; position:absolute; height:18px; width:18px; left:3px; top:3px; background:white; border-radius:50%; transition:.25s; box-shadow:0 2px 6px rgba(0,0,0,.25); }
.toggle input:checked + .slider { background: linear-gradient(135deg,var(--accent-color),#45a049); }
.toggle input:checked + .slider:before { transform:translateX(22px); }

/* Button in footer to reopen */
.reopen-cookie-btn { background:none; border:none; color:#4CAF50; cursor:pointer; font:inherit; font-size:.85rem; text-decoration:underline; }
.reopen-cookie-btn:hover { color:#66bb6a; }

/* Focus styles for accessibility */
.cookie-banner button:focus-visible,
.cookie-modal button:focus-visible,
.reopen-cookie-btn:focus-visible { outline:3px solid #fff; outline-offset:2px; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner, .cookie-modal { transition:none !important; }
}

/* Footer powered by link hover */
.footer-bottom a[href*="paroliniandrea.it"] { transition: all 0.2s ease; }
.footer-bottom a[href*="paroliniandrea.it"]:hover { text-decoration: underline !important; color: #666 !important; }


