/* ============================================================
   RIVIERA WEB STUDIO — STYLE.CSS
   Palette: Deep Blue #12304A | Teal #00A6A6 | Soft White #F7F9FA
   Graphite #1E252B | Mist Blue #DCE8EC
   Mobile-first — breakpoint desktop: 768px
   ============================================================ */

/* ============================================================
   SEZIONE 1: VARIABILI E RESET
   ============================================================ */

:root {
    --deep-blue:    #12304A;
    --teal:         #00A6A6;
    --soft-white:   #F7F9FA;
    --graphite:     #1E252B;
    --mist-blue:    #DCE8EC;
    --white:        #FFFFFF;

    --font-main:    'Plus Jakarta Sans', sans-serif;
    --font-mono:    'Space Mono', monospace;

    --radius:       8px;
    --shadow:       0 4px 20px rgba(18, 48, 74, 0.08);
    --shadow-hover: 0 8px 30px rgba(18, 48, 74, 0.12);

    --transition:   0.3s ease;
    --container:    1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--graphite);
    background: var(--soft-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--deep-blue);
}

ul {
    list-style: none;
}

/* ============================================================
   SEZIONE 2: UTILITÀ E LAYOUT BASE
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================================
   SEZIONE 3: HEADER E NAVIGAZIONE
   ============================================================ */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--mist-blue);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
}

/* Navigazione mobile */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--deep-blue);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--mist-blue);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.nav-list.is-open {
    display: block;
}

.nav-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--graphite);
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid var(--mist-blue);
}

.nav-link:last-child {
    border-bottom: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--teal);
}

/* CTA telefono header */
.header-cta {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--teal);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background var(--transition);
}

.header-cta:hover {
    background: var(--deep-blue);
    color: var(--white);
}

.cta-icon {
    font-size: 1.1rem;
}

/* ============================================================
   SEZIONE 4: HERO (condiviso tra tutte le pagine)
   ============================================================ */

.hero {
    background: var(--deep-blue);
    color: var(--white);
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 166, 166, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-monogramma-img {
    height: 80px;
    width: auto;
    margin: 0 auto 1rem;
    display: block;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-claim {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--teal);
    margin: 0.5rem 0 1.25rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--mist-blue);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Hero ridotto per pagine interne */
.hero-small {
    padding: 3rem 0;
}

.hero-small .hero-title {
    font-size: 2rem;
}

/* ============================================================
   SEZIONE 5: HOMEPAGE — index.php
   ============================================================ */

/* Chi c'è dietro */
.chi-c-e-dietro {
    background: var(--soft-white);
}

.chi-c-e-dietro-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.chi-c-e-dietro-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 4px solid var(--teal);
    box-shadow: var(--shadow);
}

.chi-c-e-dietro-content {
    text-align: center;
}

.chi-c-e-dietro-content h2 {
    font-size: 1.5rem;
    color: var(--deep-blue);
    margin-bottom: 1rem;
}

.chi-c-e-dietro-content p {
    margin-bottom: 1rem;
    color: var(--graphite);
    line-height: 1.7;
}

.chi-c-e-dietro-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--teal);
    font-weight: 600;
    font-size: 0.95rem;
}

.chi-c-e-dietro-link:hover {
    color: var(--deep-blue);
}

/* Servizi in evidenza (homepage) */
.servizi-evidenza {
    background: var(--white);
}

.servizi-grid {
    display: grid;
    gap: 1.5rem;
}

.servizio-card {
    background: var(--soft-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--mist-blue);
    transition: box-shadow var(--transition), transform var(--transition);
}

.servizio-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.servizio-icon {
    width: 48px;
    height: 48px;
    background: var(--deep-blue);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.servizio-card h3 {
    font-size: 1.125rem;
    color: var(--deep-blue);
    margin-bottom: 0.5rem;
}

.servizio-card p {
    font-size: 0.9rem;
    color: var(--graphite);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.servizio-prezzo {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--teal);
    font-family: var(--font-mono);
}

.servizio-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.servizi-cta-center {
    text-align: center;
    margin-top: 2rem;
}

/* ============================================================
   SEZIONE 6: PAGINA SERVIZI — servizi.php
   ============================================================ */

.servizi-full-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.servizio-card-full {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--mist-blue);
    transition: box-shadow var(--transition), transform var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.servizio-card-full:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.servizio-card-full.inattivo {
    opacity: 0.7;
    background: var(--soft-white);
}

.servizio-card-full.inattivo:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.servizio-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--teal);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.servizio-card-full h3 {
    font-size: 1.25rem;
    color: var(--deep-blue);
    margin-bottom: 0.75rem;
    padding-right: 5rem;
}

.servizio-card-full .servizio-desc {
    font-size: 0.95rem;
    color: var(--graphite);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.servizio-meta {
    background: var(--soft-white);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.servizio-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--mist-blue);
    font-size: 0.85rem;
}

.servizio-meta-row:last-child {
    border-bottom: none;
}

.servizio-meta-label {
    color: var(--graphite);
    opacity: 0.6;
    font-weight: 500;
}

.servizio-meta-value {
    color: var(--deep-blue);
    font-weight: 700;
    font-family: var(--font-mono);
}

.servizio-vantaggio {
    font-size: 0.9rem;
    color: var(--teal);
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--teal);
}

.servizio-card-full .btn-primary {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.servizio-card-full .btn-primary:disabled,
.servizio-card-full .btn-primary.btn-disabled {
    background: var(--mist-blue);
    color: var(--graphite);
    cursor: not-allowed;
    opacity: 0.6;
}

.servizio-card-full .btn-primary:disabled:hover,
.servizio-card-full .btn-primary.btn-disabled:hover {
    background: var(--mist-blue);
    transform: none;
}

/* CTA finale servizi */
.servizi-cta-finale {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--deep-blue);
    border-radius: var(--radius);
    color: var(--white);
}

.servizi-cta-finale h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.servizi-cta-finale p {
    color: var(--mist-blue);
    margin-bottom: 1.5rem;
}

/* ============================================================
   SEZIONE 7: PAGINA CONTATTI — contatti.php
   ============================================================ */

.contatti-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.contatti-grid {
    display: grid;
    gap: 1.5rem;
}

.contatti-col-sinistra {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contatti-col-destra {
    display: flex;
    flex-direction: column;
}

/* Card form — più compatta */
.card-form {
    padding: 1.5rem;
}

.card-form .card-title {
    font-size: 1.25rem;
    color: var(--deep-blue);
    margin-bottom: 1.25rem;
}

.contatti-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--graphite);
}

.form-group input,
.form-group textarea {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--mist-blue);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--graphite);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 166, 166, 0.1);
}

/* Card recapiti */
.card-recapiti {
    padding: 1.5rem;
}

.card-recapiti .card-title {
    font-size: 1.25rem;
    color: var(--deep-blue);
    margin-bottom: 1rem;
}

.recapito-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--mist-blue);
    font-size: 0.9rem;
}

.recapito-row:last-child {
    border-bottom: none;
}

.recapito-label {
    color: var(--graphite);
    opacity: 0.6;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 5rem;
}

.recapito-value {
    color: var(--deep-blue);
    font-weight: 600;
    text-align: right;
}

.recapito-value a {
    color: var(--teal);
}

.recapito-value a:hover {
    color: var(--deep-blue);
}

/* Card mappa */
.card-mappa {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-mappa .card-title {
    font-size: 1.25rem;
    color: var(--deep-blue);
    margin-bottom: 1rem;
}

.card-mappa iframe {
    flex-grow: 1;
    min-height: 320px;
    border-radius: var(--radius);
    filter: grayscale(20%);
}

/* ============================================================
   SEZIONE 8: PAGINA PRIVACY — privacy.php
   ============================================================ */

.privacy-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.privacy-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.privacy-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--mist-blue);
    transition: box-shadow var(--transition), transform var(--transition);
}

.privacy-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.privacy-card h3 {
    color: var(--deep-blue);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.privacy-card p {
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

.privacy-card a {
    color: var(--teal);
}

.privacy-card a:hover {
    text-decoration: underline;
}

/* ============================================================
   SEZIONE 9: PAGINA 404 — 404.php
   ============================================================ */

/* Stili minimali — eredita hero e section base */

/* ============================================================
   SEZIONE 10: CALCOLATORE
   ============================================================ */

.calcolatore {
    background: var(--deep-blue);
    color: var(--white);
    padding: 3rem 0;
}

.calcolatore .section-title {
    color: var(--white);
}

.calcolatore .section-subtitle {
    color: var(--mist-blue);
}

.calc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.calc-tab {
    flex: 1;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background var(--transition);
    text-align: center;
    white-space: nowrap;
}

.calc-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calc-tab.active {
    background: var(--teal);
    border-color: var(--teal);
}

.calc-panel {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.calc-panel.active {
    display: block;
}

.calc-field {
    margin-bottom: 1rem;
}

.calc-field label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--mist-blue);
}

.calc-field input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: var(--font-main);
    font-size: 1rem;
}

.calc-field input:focus {
    outline: none;
    border-color: var(--teal);
}

.calc-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.calc-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.calc-result {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(0, 166, 166, 0.15);
    border: 1px solid var(--teal);
    border-radius: var(--radius);
    text-align: center;
}

.calc-result.is-visible {
    display: block;
}

.calc-result-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--teal);
    font-family: var(--font-mono);
}

.calc-result-text {
    font-size: 0.95rem;
    color: var(--mist-blue);
    margin-top: 0.5rem;
}

/* ============================================================
   SEZIONE 11: FOOTER
   ============================================================ */

.site-footer {
    background: var(--deep-blue);
    color: var(--white);
    padding: 3rem 0 0;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-payoff {
    font-size: 0.8rem;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--mist-blue);
    line-height: 1.6;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-list li {
    margin-bottom: 0.6rem;
}

.footer-list a,
.footer-list span {
    color: var(--mist-blue);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-list a:hover {
    color: var(--teal);
}

.footer-tel,
.footer-mail {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-indirizzo {
    display: block;
    line-height: 1.5;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: background var(--transition);
}

.btn-whatsapp:hover {
    background: #1da851;
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--mist-blue);
    opacity: 0.7;
}

.footer-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* --------------------------------------------------------
   VALIDAZIONE W3C — badge HTML + CSS nel footer
   (sostituisce lo style inline degli snippet ufficiali)
   -------------------------------------------------------- */
.footer-validazione {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.footer-validazione img {
    display: block;
    border: 0;
    height: 31px;
    width: auto;
}    

/* ============================================================
   SEZIONE 12: COMPONENTI CONDIVISI
   ============================================================ */

/* --- 12.1 Card base --- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--mist-blue);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* --- 12.2 Bottoni --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--teal);
    color: var(--white);
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    transition: background var(--transition), transform var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #008f8f;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--white);
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--teal);
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--teal);
    color: var(--white);
}

/* --- 12.3 Alert --- */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- 12.4 Cookie banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--deep-blue);
    color: #fff;
    padding: 1rem 0;
    z-index: 1000;
    border-top: 2px solid var(--teal);
    display: none;
}

.cookie-banner[hidden] {
    display: none !important;
}

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

.cookie-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #fff;
}

.btn-cookie {
    background: #fff;
    color: var(--deep-blue);
    border: 2px solid var(--teal);
    padding: 0.5rem 1.5rem;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.btn-cookie:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

/* --- 12.5 Honeypot --- */
.honeypot {
    display: none !important;
}

/* --- 12.6 Link admin (nascosto nel copyright) --- */
.admin-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.admin-link:hover {
    color: var(--teal);
}

/* ============================================================
   SEZIONE 13: RESPONSIVE — DESKTOP (min-width: 768px)
   ============================================================ */

@media (min-width: 768px) {

    /* Header */
    .nav-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
        position: static;
        background: none;
        border: none;
        padding: 0;
        box-shadow: none;
        gap: 2rem;
    }

    .nav-link {
        border-bottom: none;
        padding: 0;
        font-size: 0.95rem;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--teal);
        transition: width var(--transition);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .header-cta {
        display: inline-flex;
    }

    /* Hero */
    .hero {
        padding: 6rem 0 7rem;
    }

    .hero-monogramma-img {
        height: 120px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-claim {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-cta-group {
        flex-direction: row;
        justify-content: center;
    }

    /* Chi c'è dietro */
    .chi-c-e-dietro-grid {
        grid-template-columns: 200px 1fr;
        text-align: left;
    }

    .chi-c-e-dietro-img {
        margin: 0;
    }

    .chi-c-e-dietro-content {
        text-align: left;
    }

    /* Servizi homepage */
    .servizi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Servizi pagina */
    .servizi-full-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contatti — layout a due colonne */
    .contatti-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .contatti-col-destra {
        height: 100%;
    }

    .card-mappa {
        height: 100%;
    }

    .card-mappa iframe {
        min-height: 480px;
    }

    /* Privacy — due colonne */
    .privacy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Calcolatore */
    .calc-tabs {
        justify-content: center;
    }

    .calc-tab {
        min-width: 160px;
    }

    .calc-btn {
        width: auto;
        padding-left: 3rem;
        padding-right: 3rem;
    }

    /* Cookie banner */
    .cookie-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }
}

@media (min-width: 1024px) {

    .servizi-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .servizi-full-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .privacy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section {
        padding: 5rem 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ============================================
   SEZIONE 14 — PORTFOLIO
   ============================================ */

/* 14.1 Hero */
.portfolio-hero {
    background-color: var(--deep-blue);
    color: var(--soft-white);
    padding: 6rem 0 4rem;
    text-align: center;
}

.portfolio-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--soft-white);
}

.portfolio-hero .claim {
    font-size: 1.25rem;
    color: var(--digital-teal);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.portfolio-hero .subtitle {
    font-size: 1rem;
    color: var(--mist-blue);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 14.2 Contenuto */
.portfolio-content {
    padding: 3rem 0 6rem;
    background-color: var(--soft-white);
}

/* 14.3 Filtri */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--deep-blue);
    background: transparent;
    color: var(--deep-blue);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--deep-blue);
    color: var(--soft-white);
}

/* 14.4 Griglia */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 14.5 Card progetto */
.project-card {
    background: var(--soft-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 37, 43, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(30, 37, 43, 0.15);
}

.project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--mist-blue);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-badge-evidenza {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--digital-teal);
    color: var(--deep-blue);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-badge-categoria {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(18, 48, 74, 0.85);
    color: var(--soft-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--graphite);
    margin-bottom: 0.25rem;
}

.project-meta {
    font-size: 0.85rem;
    color: var(--digital-teal);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--deep-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--digital-teal);
}

.project-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(4px);
}

/* 14.6 Fallback immagine */
.img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mist-blue);
}

.img-fallback img {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

/* 14.7 Stato vuoto */
.portfolio-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--graphite);
    font-size: 1.1rem;
}

/* ============================================
   SEZIONE DEMO — demo.php
   ============================================ */

.demo-hero {
    background: linear-gradient(135deg, #12304A 0%, #1a4a6e 100%);
    color: #F7F9FA;
    padding: 80px 20px;
    text-align: center;
}

.demo-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
    color: #F7F9FA;
}

.demo-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.demo-grid-section {
    padding: 60px 20px;
    background: #F7F9FA;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.demo-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #DCE8EC;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(18, 48, 74, 0.12);
    border-color: #00A6A6;
}

.demo-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #DCE8EC;
    overflow: hidden;
}

.demo-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background-color: #F7F9FA;
}

.demo-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.demo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.demo-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #00A6A6;
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-card-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.demo-card-body h2 {
    font-size: 1.3rem;
    color: #12304A;
    margin: 0 0 12px;
}

.demo-card-body p {
    color: #1E252B;
    opacity: 0.8;
    line-height: 1.6;
    margin: 0 0 24px;
    flex: 1;
}

.demo-soon {
    opacity: 0.7;
}

.demo-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: #DCE8EC;
}

.demo-soon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 48, 74, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-disabled {
    display: inline-block;
    padding: 14px 28px;
    background: #DCE8EC;
    color: #1E252B;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .demo-hero h1 { font-size: 1.8rem; }
    .demo-hero p { font-size: 1rem; }
    .demo-grid { grid-template-columns: 1fr; gap: 24px; }
}