/* ─────────────────────────────────────────────────────────────────────────
   Marinuzzi & Associati — Design system boutique (2026)
   Foglio condiviso da index.html, prodotti.html, lab.html, legale.html,
   referenze.html. Le classi header/nav/mobile-nav sono riusate identiche
   perché js/i18n.js vi inserisce il selettore lingua a runtime.
   ───────────────────────────────────────────────────────────────────────── */

:root {
    --primary-color: #0d2d4f;
    --secondary-color: #1a5276;
    --accent-color: #1a5276;
    --accent-light: #2980b9;
    --gold: #b8860b;
    --gold-light: #d4a020;
    --light-bg: #fbfaf8;
    --dark-text: #1e1e2d;
    --medium-text: #3a3a4a;
    --light-text: #6c7a89;
    --white: #ffffff;
    --hairline: rgba(13, 45, 79, 0.10);
    --box-shadow: 0 10px 30px rgba(13, 45, 79, 0.07);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark-text);
    line-height: 1.8;
    overflow-x: hidden;
    background-color: var(--light-bg);
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--primary-color);
}

p { color: var(--medium-text); font-size: 16px; line-height: 1.8; margin-bottom: 20px; }

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

/* ── Header & navigazione ─────────────────────────────────────────────── */
header {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 88px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}
header.scrolled { height: 68px; box-shadow: 0 4px 24px rgba(13, 45, 79, 0.08); }

nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 46px; transition: transform 0.3s ease; }
.logo img:hover { transform: scale(1.04); }

.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-left: 32px; position: relative; }
.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.4px;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}
.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
}
.nav-links a:hover { color: var(--secondary-color); }
.nav-links a:hover:after { width: 100%; }

.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    z-index: 1000;
    min-width: 220px;
}
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--transition);
}
.dropdown-menu a:hover { background-color: var(--light-bg); color: var(--secondary-color); }
.dropdown:hover .dropdown-menu { display: block; }

#mobile-menu { display: none; font-size: 24px; cursor: pointer; color: var(--dark-text); }

.mobile-nav {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background-color: var(--primary-color);
    z-index: 2000;
    padding: 70px 30px 30px;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    overflow-y: auto;
}
.mobile-nav.active { transform: translateY(0); }
.mobile-nav-close {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 24px;
    color: var(--white);
    background: none; border: none; cursor: pointer;
}
.mobile-nav ul { list-style: none; }
.mobile-nav ul li { margin-bottom: 16px; }
.mobile-nav ul li a {
    color: var(--white);
    font-size: 19px;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-nav .dropdown-menu {
    position: static;
    background-color: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    display: block;
}
.mobile-nav .dropdown-menu a { padding: 10px 0 10px 16px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mobile-nav .dropdown-menu a:hover { background-color: transparent; color: var(--gold-light); }
.mobile-nav .dropdown-toggle { display: none; }

/* ── Sezioni e titoli ─────────────────────────────────────────────────── */
section[id] { scroll-margin-top: 100px; }

.page-section { padding: 88px 0; }
.page-section.alt { background-color: var(--white); }

.section-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2.2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.section-title {
    font-size: clamp(1.9rem, 3.2vw, 2.5rem);
    margin-bottom: 14px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}
.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 56px; height: 2px;
    background-color: var(--gold);
}
.section-subtitle { font-size: 17px; color: var(--light-text); margin: 22px 0 30px; max-width: 760px; }
.section-head-center { text-align: center; }
.section-head-center .section-title:after { left: 50%; transform: translateX(-50%); }
.section-head-center .section-subtitle { margin-left: auto; margin-right: auto; }

.group-title {
    font-size: 1.6rem;
    color: var(--dark-text);
    margin-top: 70px;
    margin-bottom: 26px;
    text-align: center;
}

/* ── Bottoni ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, #0d2d4f 0%, #1a5276 100%);
    color: var(--white);
    box-shadow: 0 10px 26px -10px rgba(13, 45, 79, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(13, 45, 79, 0.55); color: var(--white); }
.btn-outline {
    background: var(--white);
    color: var(--secondary-color);
    border: 1.5px solid rgba(26, 82, 118, 0.35);
}
.btn-outline:hover { transform: translateY(-2px); border-color: rgba(26, 82, 118, 0.7); color: var(--primary-color); }
.btn-gold {
    background: linear-gradient(135deg, #8b6914 0%, #b8860b 60%, #d4a020 100%);
    color: var(--white);
    box-shadow: 0 10px 26px -10px rgba(139, 105, 20, 0.5);
}
.btn-gold:hover { transform: translateY(-2px); color: var(--white); }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1.5px dashed rgba(26, 82, 118, 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover { color: var(--primary-color); border-bottom-color: var(--gold); }

/* ── Card servizi / prodotti ──────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 44px;
}
.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 38px 30px;
    border: 1px solid var(--hairline);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(13, 45, 79, 0.12); }
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(to right, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}
.service-card:hover::after { transform: scaleX(1); transform-origin: left; }
.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px; height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    margin-bottom: 22px;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(13, 45, 79, 0.18);
}
.service-title { font-size: 21px; margin-bottom: 14px; }
.service-description { font-size: 15px; color: var(--medium-text); }

/* ── Referenze ────────────────────────────────────────────────────────── */
.detailed-references {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 34px;
}
.reference-item {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--hairline);
    padding: 30px 28px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}
.reference-item:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(13, 45, 79, 0.10); }
.reference-item h3 {
    font-size: 1.06rem;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.reference-item p { font-size: 14.5px; line-height: 1.7; margin-bottom: 0; }
.reference-item.featured {
    border: 1px solid rgba(184, 134, 11, 0.4);
    background: linear-gradient(160deg, #fffdf7 0%, #ffffff 55%);
    grid-column: 1 / -1;
}
.reference-item.featured h3 { font-size: 1.25rem; }
.ref-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #8b6914;
    background: rgba(184, 134, 11, 0.10);
    border: 1px solid rgba(184, 134, 11, 0.32);
    padding: 4px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}
.confidentiality-note {
    font-size: 13.5px;
    color: var(--light-text);
    font-style: italic;
    text-align: center;
    margin: 34px auto 0;
    max-width: 640px;
}
.clients-grid { columns: 3; column-gap: 40px; font-size: 15px; margin-top: 30px; }
.clients-grid p { margin-bottom: 10px; break-inside: avoid; color: var(--medium-text); font-weight: 500; }
.clients-grid i { color: var(--gold); margin-right: 8px; }

/* ── Team ─────────────────────────────────────────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 36px;
    margin-top: 44px;
}
.team-member {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    box-shadow: var(--box-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.team-member:hover { transform: translateY(-8px); box-shadow: 0 16px 36px rgba(13, 45, 79, 0.10); }
.member-photo { position: relative; height: 280px; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.team-member:hover .member-photo img { transform: scale(1.04); }
.member-info { padding: 30px; }
.member-name { font-size: 22px; margin-bottom: 5px; }
.member-role { font-size: 14px; color: var(--gold); font-weight: 600; margin-bottom: 14px; display: block; letter-spacing: 0.4px; }
.member-bio { margin-bottom: 0; font-size: 15px; line-height: 1.7; }

/* ── Highlight box (valori) ───────────────────────────────────────────── */
.highlight-box {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid var(--hairline);
    padding: 40px;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}
.highlight-box:before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--secondary-color));
}
.values-list { list-style: none; }
.values-list li { margin-bottom: 14px; display: flex; align-items: baseline; gap: 14px; }
.values-list i { color: var(--gold); font-size: 17px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 72px 0 36px;
    position: relative;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}
.footer-logo { margin-bottom: 20px; }
.footer-info { flex: 1; max-width: 300px; }
.footer-info p { color: rgba(255, 255, 255, 0.7); font-size: 14px; margin-bottom: 20px; }
.footer-links { display: flex; flex: 2; justify-content: flex-end; gap: 60px; }
.footer-column h4 { color: var(--white); font-size: 17px; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-column h4:after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 30px; height: 2px;
    background-color: var(--gold);
}
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-column a:hover { color: var(--gold-light); }
.footer-contact-line { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.8); }
.footer-contact-line i { color: var(--gold-light); width: 16px; text-align: center; }
.footer-contact-line a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-contact-line a:hover { color: var(--gold-light); }
.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    z-index: 2;
}
.footer-bottom p { color: rgba(255, 255, 255, 0.6); font-size: 13.5px; margin: 0; }
.footer-legal-links { display: flex; gap: 15px; margin-top: 8px; justify-content: center; }
.footer-legal-links a { color: rgba(255, 255, 255, 0.5); font-size: 13px; text-decoration: none; transition: color 0.3s; }
.footer-legal-links a:hover { color: var(--gold-light); }

/* ── Cookie banner ────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(13, 45, 79, 0.97);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 18px 0;
    z-index: 99999;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .container { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { flex: 1; min-width: 280px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.85); margin: 0; }
.cookie-banner a { color: var(--gold-light); text-decoration: underline; }
.cookie-btn {
    background: var(--gold);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}
.cookie-btn:hover { background: var(--gold-light); }

/* ── Bottone vocale flottante (sottopagine: lab) ─────────────────────── */
.marinuzzi-voice-btn, .marinuzzi-dj-btn, .marinuzzi-osservatorio-btn {
    position: fixed;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.marinuzzi-voice-btn {
    bottom: 28px;
    padding: 14px 24px 14px 18px;
    font-size: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 4px 24px rgba(15, 52, 96, 0.35), 0 1px 3px rgba(0,0,0,0.12);
}
.marinuzzi-voice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(15, 52, 96, 0.5);
    background: linear-gradient(135deg, #1a1a2e 0%, #1a2a4e 50%, #1a4a70 100%);
}
.marinuzzi-dj-btn {
    bottom: 28px;
    padding: 12px 22px 12px 16px;
    font-size: 14px;
    background: linear-gradient(135deg, #2d1b4e 0%, #4a2a72 50%, #2a7a6e 100%);
    box-shadow: 0 4px 20px rgba(45, 27, 78, 0.35), 0 1px 3px rgba(0,0,0,0.12);
}
.marinuzzi-dj-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(45, 27, 78, 0.5);
    background: linear-gradient(135deg, #3a2562 0%, #5a3380 50%, #3a8a7e 100%);
}
.marinuzzi-osservatorio-btn {
    bottom: 84px;
    padding: 12px 22px 12px 16px;
    font-size: 14px;
    background: linear-gradient(135deg, #0f3d2e 0%, #1e5e47 50%, #b8860b 100%);
    box-shadow: 0 4px 20px rgba(15, 61, 46, 0.35), 0 1px 3px rgba(0,0,0,0.12);
}
.marinuzzi-osservatorio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 61, 46, 0.5);
    background: linear-gradient(135deg, #144d3a 0%, #287052 50%, #d4a020 100%);
}
.marinuzzi-voice-btn.is-active, .marinuzzi-dj-btn.is-active, .marinuzzi-osservatorio-btn.is-active {
    background: linear-gradient(135deg, #8B0000 0%, #B22222 50%, #DC143C 100%);
    box-shadow: 0 4px 24px rgba(139, 0, 0, 0.4);
    animation: marinuzzi-pulse 2s ease-in-out infinite;
}
@keyframes marinuzzi-pulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(139, 0, 0, 0.4); }
    50% { box-shadow: 0 4px 32px rgba(220, 20, 60, 0.6); }
}
.marinuzzi-voice-icon { width: 22px; height: 22px; flex-shrink: 0; }
.marinuzzi-voice-icon svg { width: 100%; height: 100%; }
.marinuzzi-dj-icon, .marinuzzi-osservatorio-icon { width: 18px; height: 18px; flex-shrink: 0; }
.marinuzzi-dj-icon svg, .marinuzzi-osservatorio-icon svg { width: 100%; height: 100%; }
.marinuzzi-voice-label, .marinuzzi-dj-label, .marinuzzi-osservatorio-label { white-space: nowrap; }
.marinuzzi-bars { display: none; gap: 2px; align-items: center; height: 18px; }
.is-active .marinuzzi-bars { display: flex; }
.marinuzzi-voice-btn.is-active .marinuzzi-voice-icon,
.marinuzzi-dj-btn.is-active .marinuzzi-dj-icon,
.marinuzzi-osservatorio-btn.is-active .marinuzzi-osservatorio-icon { display: none; }
.marinuzzi-bar {
    width: 3px;
    background: #fff;
    border-radius: 2px;
    animation: marinuzzi-bar-bounce 1s ease-in-out infinite;
}
.marinuzzi-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.marinuzzi-bar:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.marinuzzi-bar:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.marinuzzi-bar:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.marinuzzi-bar:nth-child(5) { height: 6px; animation-delay: 0.6s; }
@keyframes marinuzzi-bar-bounce {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.2); }
}

/* ── Hero interno per sottopagine ─────────────────────────────────────── */
.page-hero {
    padding: 156px 0 56px;
    background: linear-gradient(160deg, #f7f5f0 0%, #ffffff 70%);
    border-bottom: 1px solid var(--hairline);
}
.page-hero .section-subtitle { margin-bottom: 0; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .clients-grid { columns: 2; }
}
@media (max-width: 992px) {
    .footer-content { flex-direction: column; gap: 40px; }
    .footer-info { max-width: 100%; }
    .footer-links { justify-content: flex-start; gap: 40px; flex-wrap: wrap; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    #mobile-menu { display: block; }
    .mobile-nav { display: block; }
    .page-section { padding: 64px 0; }
    .clients-grid { columns: 1; }
    .footer-links { flex-direction: column; gap: 30px; }
    .marinuzzi-voice-btn { bottom: 18px; right: 18px; padding: 12px 18px 12px 14px; font-size: 13px; }
    .marinuzzi-dj-btn { bottom: 18px; right: 18px; padding: 10px 16px 10px 12px; font-size: 12px; }
    .marinuzzi-osservatorio-btn { bottom: 70px; right: 18px; padding: 10px 16px 10px 12px; font-size: 12px; }
}
