/* ===== GP82 — Foglio di stile condiviso da tutte le pagine ===== */

:root {
    --primary-color: #00bcd4;
    --secondary-color: #0097a7;
    --background-color: #1a202c;
    --card-background: #2d3748;
    --input-background: #1a202c;
    --text-color: #e2e8f0;
    --light-text-color: #a0aec0;
    --border-color: #4a5568;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    --error-color: #ff8787;
}

/* --- Reset e Body Standard --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;

    background-image:
        radial-gradient(circle at 0% 0%, rgba(0, 188, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 107, 107, 0.12) 0%, transparent 50%),
        linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent);

    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    background-attachment: fixed;
}

/* --- Tipografia --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
    color: var(--light-text-color);
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--light-text-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.lead-text {
    text-align: center;
    font-size: 1.15rem;
    color: var(--light-text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: var(--secondary-color);
}

/* --- Header / Navbar --- */
.header-moderno {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}
.logo img {
    height: 80px;
    width: auto;
    vertical-align: middle;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: var(--light-text-color);
    font-weight: 400;
    transition: color 0.3s;
    text-decoration: none;
    font-size: 1rem;
}
.nav-link:hover {
    color: var(--primary-color);
}

/* --- Bottoni --- */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    text-align: center;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #111;
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #111;
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #111;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: #111;
    border-color: var(--primary-color);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border-color: #25D366;
}
.btn-whatsapp:hover {
    background-color: #1DA851;
    border-color: #1DA851;
    box-shadow: 0 0 15px #25D366;
}

/* --- Sezioni --- */
.hero-section {
    padding: 5rem 2rem;
    text-align: center;
    background: transparent;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.content-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 2px solid var(--border-color);
}

.no-border-top {
    border-top: none;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: block;
}

.bg-light {
    background-color: rgba(45, 55, 72, 0.8);
}
.bg-dark {
    background-color: rgba(17, 22, 31, 0.9);
}

/* --- Grids & Cards --- */
.grid-container {
    display: grid;
    gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.service-card, .sector-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover, .sector-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.3);
}

.service-card h3, .sector-card h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.chi-sono-content {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
}
.text-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
}
.text-content ul {
    color: var(--light-text-color);
    margin: 0 0 1rem 1.3rem;
}
.text-content li {
    margin-bottom: 0.5rem;
}

/* --- Riquadro informativo (box normativo, avvisi, ecc.) --- */
.info-box {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    max-width: 800px;
    margin: 2rem auto;
}
.info-box p:last-child { margin-bottom: 0; }

/* --- Breadcrumb / link di rientro --- */
.breadcrumb-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    font-size: 0.9rem;
}

/* --- Partner --- */
.partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 2rem;
}

.partner-logos img {
    max-height: 60px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border-radius: 4px;
}
.partner-logos img:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

.logo-wrapper {
    background-color: white;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.partner-logos a:hover .logo-wrapper {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

.logo-wrapper img {
    opacity: 1;
}
.logo-wrapper img:hover {
    transform: none;
    box-shadow: none;
    opacity: 1;
}

/* --- Galleria --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    background-color: var(--card-background);
}
.gallery-item img:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
}

/* --- Contatti & Form --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: var(--light-text-color);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--input-background);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}
.contact-list li {
    margin-bottom: 0.75rem;
    color: var(--light-text-color);
}
.contact-list li a {
    color: var(--light-text-color);
}
.contact-list li a:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
.footer-moderno {
    text-align: center;
    padding: 2rem;
    background-color: #11161f;
    border-top: 1px solid var(--border-color);
    color: var(--light-text-color);
    font-size: 0.9rem;
}
.footer-moderno p {
    margin: 0.5rem 0;
    color: var(--light-text-color);
}
.footer-moderno a {
    color: var(--light-text-color);
}
.footer-moderno a:hover {
    color: var(--primary-color);
}

/* --- Hamburger --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .navbar { position: relative; }
    .nav-menu {
        display: flex; flex-direction: column; align-items: center;
        position: absolute; top: 100%; left: 0; width: 100%;
        background-color: var(--card-background);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 8px 10px rgba(0,0,0,0.2);
        max-height: 0; overflow: hidden;
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
        gap: 0; padding: 0;
    }
    .nav-menu.nav-active { max-height: 500px; padding: 1rem 0; }
    .nav-menu .nav-item { width: 100%; text-align: center; }
    .nav-menu .nav-link { padding: 1rem; display: block; width: 100%; }
    .hamburger { display: block; font-size: 1.5rem; padding: 0.5rem; }
    .btn-outline { font-size: 0.8rem; padding: 8px 12px; }
    .logo { font-size: 1.5rem; }
    .logo img { height: 70px; }
}
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    .grid-2, .grid-3, .grid-4, .contact-container { grid-template-columns: 1fr; }
    .hero-section { padding: 3rem 1rem; }
    .content-section { padding: 3rem 1rem; }
    .navbar { padding: 0.5rem 1rem; }
    .header-moderno { padding: 0; }
}

/* --- Banner consenso cookie/Analytics --- */
.cookie-banner {
    position: fixed;
    right: 1.25rem;
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
    z-index: 2000;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    max-width: 300px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cookie-banner[hidden] {
    display: none;
}
.cookie-banner p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.4;
}
.cookie-banner-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.cookie-banner-buttons .btn {
    padding: 6px 14px;
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}
