﻿/* =========================================================
   IL BELLO DI CERIGNOLA - SITE.CSS DEFINITIVO
   ---------------------------------------------------------
   CSS unico per frontend pubblico:
   - layout header / main / AI / footer
   - header mockup responsive stabile
   - home stile mockup
   - chat AI persistente desktop/mobile
   - card dinamiche per percorsi, aziende, eventi, news
   - auth page unica login/register
   - tema chiaro/scuro
   - compatibilità con Bootstrap e classi già esistenti
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* =========================================================
   DESIGN TOKENS
========================================================= */
:root {
    --ibdc-blue: #0077A8;
    --ibdc-blue-dark: #005F86;
    --ibdc-orange: #F59E33;
    --ibdc-orange-dark: #D4820A;
    --ibdc-olive: #ACA243;
    --ibdc-olive-dark: #887F2F;
    --ibdc-magenta: #A5304D;
    --ibdc-magenta-dark: #7C2139;
    --ibdc-bg: #F7FAFC;
    --ibdc-surface: #FFFFFF;
    --ibdc-surface-soft: #FAFAFA;
    --ibdc-text: #0F172A;
    --ibdc-muted: rgba(15, 23, 42, .62);
    --ibdc-border: rgba(15, 23, 42, .10);
    --ibdc-divider: rgba(15, 23, 42, .075);
    --ibdc-radius: 20px;
    --ibdc-radius-sm: 12px;
    --ibdc-radius-xs: 8px;
    --ibdc-shadow: 0 8px 28px rgba(15, 23, 42, .10);
    --ibdc-shadow-md: 0 14px 42px rgba(15, 23, 42, .14);
    --ibdc-shadow-lg: 0 24px 70px rgba(15, 23, 42, .22);
    --ibdc-transition: .2s ease;
    --public-max-width: 1180px;
    --public-header-height: 72px;
    --public-ai-width: 330px;
    --surface: var(--ibdc-bg);
    --card: var(--ibdc-surface);
    --text: var(--ibdc-text);
    --muted: var(--ibdc-muted);
    --border: var(--ibdc-border);
    --brand-blue: var(--ibdc-blue);
    --brand-magenta: var(--ibdc-magenta);
    --shadow-sm: var(--ibdc-shadow);
}

/* =========================================================
   PUBLIC EXPERIENCES
========================================================= */
.experiences-page,
.experience-detail-page {
    background: var(--surface);
    color: var(--text);
}

.experiences-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    background:
        linear-gradient(90deg, rgba(7, 34, 48, .82), rgba(7, 34, 48, .34)),
        url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg") center/cover;
    color: #fff;
    padding: 86px 0 48px;
}

.experiences-hero-copy {
    max-width: 760px;
}

.experiences-hero h1,
.experience-detail-title h1 {
    font-size: clamp(2.25rem, 6vw, 4.9rem);
    line-height: .98;
    margin: 10px 0 16px;
    letter-spacing: 0;
}

.experiences-hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, .88);
    font-size: 1.1rem;
}

.experiences-layout {
    display: grid;
    grid-template-columns: minmax(250px, 320px) 1fr;
    gap: 28px;
    padding: 38px 0 72px;
}

.experiences-filter-panel,
.experience-card,
.experience-side-card {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.experiences-filter-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    border-radius: 8px;
    padding: 22px;
}

.experiences-filter-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.experiences-filter-head i {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0, 119, 168, .12);
    color: var(--brand-blue);
}

.experiences-filter-head h2,
.experience-side-card h2 {
    font-size: 1rem;
    margin: 0;
}

.experiences-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.experiences-field span {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--muted);
}

.experiences-field input,
.experiences-field select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    background: var(--input-bg, #fff);
    color: var(--text);
}

.experiences-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.experiences-filter-actions .ibdc-btn {
    flex: 1;
}

.experiences-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.experiences-results-head h2 {
    margin: 4px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.experiences-count {
    color: var(--muted);
    font-weight: 700;
}

.experiences-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.experience-card {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.experience-card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    color: #fff;
}

.experience-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.experience-card:hover .experience-card-media img {
    transform: scale(1.04);
}

.experience-card-media span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(7, 34, 48, .78);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.experience-card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.experience-card-operator {
    margin: 0;
    color: var(--brand-blue);
    font-size: .86rem;
    font-weight: 800;
}

.experience-card h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.18;
}

.experience-card h3 a {
    color: inherit;
    text-decoration: none;
}

.experience-card-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.experience-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.experience-card-footer strong {
    color: var(--brand-magenta);
}

.experience-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: var(--brand-blue);
    text-decoration: none;
}

.experiences-empty-state {
    grid-column: 1 / -1;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 28px;
    background: var(--card);
    color: var(--muted);
    text-align: center;
}

.experience-card-skeleton {
    padding: 0;
}

.experience-card-skeleton div {
    margin: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(148, 163, 184, .16), rgba(148, 163, 184, .28), rgba(148, 163, 184, .16));
    min-height: 18px;
}

.experience-card-skeleton div:first-child {
    margin: 0;
    border-radius: 0;
    aspect-ratio: 4 / 3;
}

.experience-detail-hero {
    min-height: 430px;
    display: flex;
    align-items: end;
    padding: 96px 0 52px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(7, 34, 48, .86), rgba(7, 34, 48, .28)),
        var(--experience-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.experiences-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.84);
    margin-bottom: 22px;
    font-size: .92rem;
}

.experiences-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.experience-detail-title {
    max-width: 820px;
}

.experience-detail-title p {
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: 1.05rem;
}

.experience-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 32px;
    padding: 42px 0 76px;
}

.experience-detail-main,
.experience-detail-sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
}

.experience-content-section {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.experience-content-section h2 {
    margin: 4px 0 14px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.experience-rich-text {
    color: var(--text);
    line-height: 1.75;
    font-size: 1.02rem;
}

.experience-rich-text p {
    margin: 0 0 16px;
}

.experiences-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.experience-operator-text {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.65;
}

.experience-side-card {
    border-radius: 8px;
    padding: 20px;
}

.experience-quick-info {
    display: grid;
    gap: 12px;
}

.experience-quick-info div {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.experience-quick-info div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.experience-quick-info span,
.experience-contact-item span {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.experience-contact-list {
    display: grid;
    gap: 10px;
}

.experience-contact-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 2px 10px;
    padding: 11px 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.experience-contact-item i {
    grid-row: span 2;
    color: var(--brand-blue);
}

.experience-contact-item strong {
    overflow-wrap: anywhere;
}

.experience-map {
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.experience-map-address {
    color: var(--muted);
    margin: 10px 0 0;
}

.experiences-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.experience-mini-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: var(--card);
}

.experience-mini-card span {
    color: var(--brand-blue);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.experience-mini-card small {
    color: var(--brand-magenta);
    font-weight: 800;
}

:root[data-theme="dark"] .experiences-filter-panel,
:root[data-theme="dark"] .experience-card,
:root[data-theme="dark"] .experience-side-card,
:root[data-theme="dark"] .experience-mini-card,
:root[data-theme="dark"] .experiences-empty-state {
    background: rgba(15, 23, 42, .72);
}

@media (max-width: 1100px) {
    .experiences-layout,
    .experience-detail-layout {
        grid-template-columns: 1fr;
    }

    .experiences-filter-panel {
        position: static;
    }

    .experiences-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .experiences-grid,
    .experiences-mini-grid {
        grid-template-columns: 1fr;
    }

    .experiences-results-head,
    .experiences-filter-actions,
    .experiences-section-row {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   BASE
========================================================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Poppins, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ibdc-bg);
    color: var(--ibdc-text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        color: inherit;
    }

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

button,
input,
textarea,
select {
    font-family: inherit;
}

:focus-visible {
    outline: 2px solid var(--ibdc-blue);
    outline-offset: 2px;
    border-radius: 6px;
}

.public-fetch-loader {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1800;
    min-width: 158px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .85rem;
    border: 1px solid rgba(0, 119, 168, .18);
    border-radius: 999px;
    color: var(--ibdc-blue-dark);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--ibdc-shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.public-fetch-loader.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.public-fetch-loader-track {
    position: relative;
    width: 44px;
    height: 28px;
    flex: 0 0 44px;
    overflow: hidden;
}

.public-fetch-loader-track i {
    position: absolute;
    left: 4px;
    top: 2px;
    font-size: 1.4rem;
    animation: ibdc-bike-ride .75s ease-in-out infinite;
}

.public-fetch-loader-track span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 119, 168, .35) 0 8px,
        transparent 8px 14px
    );
    animation: ibdc-bike-road .55s linear infinite;
}

.public-fetch-loader strong {
    font-size: .78rem;
    line-height: 1;
    font-weight: 850;
}

@keyframes ibdc-bike-ride {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-3px) rotate(2deg);
    }
}

@keyframes ibdc-bike-road {
    from {
        background-position-x: 0;
    }

    to {
        background-position-x: -28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-fetch-loader-track i,
    .public-fetch-loader-track span {
        animation: none;
    }
}

.layout-public {
    background: var(--ibdc-bg);
}

.wrap {
    width: min(var(--public-max-width), calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   HEADER PUBBLICO - VERSIONE STABILE MOCKUP
   Struttura: logo | menu | azioni
========================================================= */

.site-header,
.public-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: var(--public-header-height);
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--ibdc-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.public-topbar {
    min-height: var(--public-header-height);
    display: grid;
    grid-template-columns: 175px minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 14px;
    padding: 9px 0;
}

/* Logo */
.public-brand {
    width: 175px;
    max-width: 175px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--ibdc-text);
    text-decoration: none;
    overflow: hidden;
}

    .public-brand img {
        width: 165px;
        height: auto;
        max-height: 54px;
        object-fit: contain;
        filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .14));
    }

.public-brand-payoff {
    display: none !important;
}

/* Menu centrale */
.public-main-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    overflow: hidden;
}

    .public-main-nav a {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 7px 7px;
        border-radius: 10px;
        font-size: .76rem;
        font-weight: 700;
        color: var(--ibdc-muted);
        text-decoration: none;
        white-space: nowrap;
        flex: 0 0 auto;
        transition: var(--ibdc-transition);
    }

        /* Icona menu */
        .public-main-nav a .nav-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: .85rem;
            line-height: 1;
            flex: 0 0 auto;
        }

        /* Testo menu */
        .public-main-nav a .nav-label {
            display: inline;
            font-size: inherit;
            font-weight: inherit;
            line-height: inherit;
            color: inherit;
        }

        .public-main-nav a:hover,
        .public-main-nav a.active {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .08);
        }

/* Azioni a destra */
.public-header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
    min-width: max-content;
}

.public-action-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(15, 23, 42, .04);
    color: var(--ibdc-text);
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ibdc-transition);
    white-space: nowrap;
}

    .public-action-btn:hover {
        transform: translateY(-1px);
        background: rgba(15, 23, 42, .08);
        color: var(--ibdc-text);
    }

.public-theme-btn:hover {
    background: rgba(0, 119, 168, .08);
}

/* AI compatta nell'header: la chat resta protagonista nella sidebar */
.public-ai-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    color: #fff;
    border-color: rgba(0, 119, 168, .25);
    background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    box-shadow: 0 8px 22px rgba(0, 119, 168, .22);
}

    .public-ai-btn span {
        display: none;
    }

    .public-ai-btn:hover {
        color: #fff;
        background: linear-gradient(135deg, var(--ibdc-blue-dark), #004a6b);
    }

/* Tema */
.public-theme-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1rem;
}

/* Login */
#loginMenu .public-action-btn {
    min-width: 78px;
}

#loginMenu .dropdown-toggle::after {
    margin-left: .35rem;
}

/* Stati utente */
.public-user-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
}

.public-operator-btn {
    color: #1f2937;
    background: linear-gradient(135deg, #FCD34D, #F59E0B);
}

.public-admin-btn {
    color: #fff;
    background: linear-gradient(135deg, #DC2626, #991B1B);
}

.public-logout-btn {
    color: #7f1d1d;
    border-color: rgba(220, 38, 38, .18);
    background: rgba(220, 38, 38, .06);
}

/* Dropdown login */
.public-auth-dropdown,
.dropdown-menu.public-auth-dropdown {
    border: 1px solid var(--ibdc-border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--ibdc-shadow-md);
}

    .public-auth-dropdown .dropdown-item {
        border-radius: 10px;
        font-size: .86rem;
        padding: 8px 10px;
    }

        .public-auth-dropdown .dropdown-item:hover {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .08);
        }

/* Hamburger */
.public-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(15, 23, 42, .04);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: var(--ibdc-transition);
}

    .public-hamburger:hover {
        background: rgba(15, 23, 42, .08);
    }

    .public-hamburger span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: var(--ibdc-text);
    }

/* Drawer mobile */
.public-drawer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    pointer-events: none;
}

.public-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .25s ease;
}

.public-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: #fff;
    border-left: 1px solid var(--ibdc-border);
    box-shadow: var(--ibdc-shadow-lg);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.22, .68, 0, 1);
    display: flex;
    flex-direction: column;
    padding: 18px;
    overflow-y: auto;
}

.public-drawer.open {
    pointer-events: auto;
}

    .public-drawer.open .public-drawer-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .public-drawer.open .public-drawer-panel {
        transform: translateX(0);
        pointer-events: auto;
    }

.public-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--ibdc-divider);
}

    .public-drawer-head img {
        width: 160px;
        height: auto;
    }

.public-drawer-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ibdc-border);
    background: rgba(15, 23, 42, .04);
    border-radius: 10px;
    color: var(--ibdc-text);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.public-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .public-drawer-nav a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 12px;
        border-radius: 13px;
        color: var(--ibdc-muted);
        font-size: .92rem;
        font-weight: 650;
        text-decoration: none;
        transition: var(--ibdc-transition);
    }

        .public-drawer-nav a span {
            width: 24px;
            text-align: center;
        }

        .public-drawer-nav a:hover,
        .public-drawer-nav a.active {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .07);
        }

.public-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--ibdc-divider);
}

/* =========================================================
   BOTTONI CUSTOM DEL PORTALE
   Non sovrascrivono globalmente .btn Bootstrap
========================================================= */
.custom-btn,
.ibdc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .95);
    color: var(--ibdc-text);
    font-weight: 700;
    font-size: .86rem;
    line-height: 1.2;
    transition: var(--ibdc-transition);
    cursor: pointer;
    white-space: nowrap;
}

    .custom-btn:hover,
    .ibdc-btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--ibdc-shadow);
        color: var(--ibdc-text);
    }

.ibdc-btn-sm {
    padding: 7px 12px;
    font-size: .78rem;
    border-radius: 10px;
}

.btn-brand,
.ibdc-btn-primary {
    background: linear-gradient(150deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    color: #fff;
    border-color: rgba(0, 119, 168, .35);
    box-shadow: 0 8px 24px rgba(0, 119, 168, .25);
}

    .btn-brand:hover,
    .ibdc-btn-primary:hover {
        color: #fff;
        background: linear-gradient(150deg, var(--ibdc-blue-dark), #004a6b);
        border-color: rgba(0, 119, 168, .45);
    }

.ibdc-btn-orange {
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-orange), var(--ibdc-orange-dark));
    border-color: rgba(245, 158, 51, .35);
    box-shadow: 0 8px 24px rgba(245, 158, 51, .22);
}

    .ibdc-btn-orange:hover {
        color: #fff;
    }

.ibdc-btn-magenta {
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-magenta), var(--ibdc-magenta-dark));
    border-color: rgba(165, 48, 77, .35);
}

    .ibdc-btn-magenta:hover {
        color: #fff;
    }

.ibdc-btn-olive {
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-olive), var(--ibdc-olive-dark));
    border-color: rgba(172, 162, 67, .35);
}

    .ibdc-btn-olive:hover {
        color: #fff;
    }

.ibdc-btn-outline {
    background: #fff;
    color: var(--ibdc-text);
}

/* =========================================================
   SHELL PUBBLICO + CHAT AI PERSISTENTE
========================================================= */
.public-shell {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--public-header-height));
}

.public-main {
    flex: 1 1 auto;
    min-width: 0;
}

.public-ai {
    flex: 0 0 var(--public-ai-width);
    width: var(--public-ai-width);
    position: sticky;
    top: var(--public-header-height);
    height: calc(100vh - var(--public-header-height));
    border-left: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface);
    z-index: 900;
}

.ai-chat-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ibdc-surface);
}

.ai-chat-header {
    flex: 0 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    border-bottom: 1px solid var(--ibdc-border);
    background: linear-gradient(135deg, rgba(0, 119, 168, .10), rgba(165, 48, 77, .07));
}

.ai-chat-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--ibdc-blue);
    color: #fff;
    font-size: 1.15rem;
}

.ai-chat-title {
    font-weight: 700;
    font-size: .95rem;
}

.ai-chat-subtitle {
    font-size: .75rem;
    color: var(--ibdc-muted);
}

.ai-chat-status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .68rem;
    font-weight: 600;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    border: 1px solid rgba(0, 119, 168, .18);
    padding: .2rem .45rem;
    border-radius: 999px;
}

    .ai-chat-status span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #22c55e;
        box-shadow: 0 0 0 2px rgba(34, 197, 94, .22);
    }

.ai-chat-suggestions {
    flex: 0 0 auto;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    border-bottom: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface-soft);
}

    .ai-chat-suggestions button {
        border: 1px solid var(--ibdc-border);
        background: #fff;
        border-radius: 10px;
        padding: .45rem .6rem;
        font-size: .75rem;
        color: var(--ibdc-muted);
        text-align: left;
        transition: var(--ibdc-transition);
    }

        .ai-chat-suggestions button:hover {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .06);
            border-color: rgba(0, 119, 168, .22);
        }

.ai-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .8rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    .ai-chat-messages::-webkit-scrollbar {
        width: 4px;
    }

    .ai-chat-messages::-webkit-scrollbar-thumb {
        background: rgba(15, 23, 42, .18);
        border-radius: 999px;
    }

.ai-message {
    padding: .65rem .75rem;
    border-radius: 14px;
    font-size: .82rem;
    line-height: 1.5;
}

.ai-message-bot {
    background: rgba(0, 119, 168, .07);
    border: 1px solid rgba(0, 119, 168, .13);
}

.ai-message-user {
    align-self: flex-end;
    max-width: 88%;
    background: rgba(165, 48, 77, .07);
    border: 1px solid rgba(165, 48, 77, .14);
}

.ai-chat-form {
    flex: 0 0 auto;
    display: flex;
    gap: .45rem;
    padding: .75rem;
    border-top: 1px solid var(--ibdc-border);
    background: #fff;
}

    .ai-chat-form input {
        flex: 1;
        min-width: 0;
        border: 1px solid var(--ibdc-border);
        border-radius: 12px;
        padding: .55rem .7rem;
        font-size: .82rem;
        outline: none;
    }

        .ai-chat-form input:focus {
            border-color: rgba(0, 119, 168, .45);
            box-shadow: 0 0 0 3px rgba(0, 119, 168, .10);
        }

    .ai-chat-form button {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 12px;
        color: #fff;
        background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    }

/* Fonti AI: niente elenco puntato */
.chat-sources {
    margin-top: .55rem;
    padding-top: .45rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    text-align: center;
}

.chat-sources-title {
    font-size: .72rem;
    font-weight: 600;
    color: var(--ibdc-muted);
    margin-bottom: .25rem;
}

.chat-sources-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

.chat-source-item {
    display: inline-flex;
    justify-content: center;
    max-width: 100%;
    font-size: .76rem;
    line-height: 1.25;
}

a.chat-source-item {
    color: var(--ibdc-blue);
    text-decoration: none;
}

    a.chat-source-item:hover {
        text-decoration: underline;
    }

.chat-source-disabled {
    color: #6c757d;
    cursor: default;
}

.ai-mobile-toggle,
.ai-mobile-panel {
    display: none;
}

/* =========================================================
   PAGINE PUBBLICHE E SEZIONI
========================================================= */
.public-page,
.ibdc-page {
    padding: 0;
}

.page-section {
    padding: 56px 0;
}

.page-section-tight,
.feature-strip-section {
    padding: 36px 0;
}

.section-soft,
.section-muted,
.stripe {
    background: rgba(255, 255, 255, .72);
    border-top: 1px solid var(--ibdc-divider);
    border-bottom: 1px solid var(--ibdc-divider);
}

.section-heading,
.section-head {
    margin-bottom: 1.4rem;
}

    .section-heading h2,
    .section-head h2 {
        font-size: clamp(1.35rem, 2.6vw, 2rem);
        font-weight: 800;
        letter-spacing: -.02em;
        margin-bottom: .35rem;
    }

    .section-heading p,
    .section-head p {
        max-width: 72ch;
        color: var(--ibdc-muted);
        font-size: .95rem;
        line-height: 1.7;
        margin-bottom: 0;
    }

.section-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    color: var(--ibdc-blue);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 800;
}

.home-map-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================================================
   HERO HOME - LANDING ESPERIENZIALE
========================================================= */

.hero-bleed,
.ibdc-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 620px;
    background: linear-gradient(145deg, #061522 0%, #0a2030 45%, #0d1f1a 100%);
}

    .hero-bleed::before,
    .ibdc-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(1100px 600px at 15% 50%, rgba(0, 119, 168, .50), transparent 60%), radial-gradient(900px 500px at 88% 25%, rgba(245, 158, 51, .30), transparent 60%), radial-gradient(700px 450px at 72% 82%, rgba(172, 162, 67, .25), transparent 60%), radial-gradient(700px 400px at 8% 85%, rgba(165, 48, 77, .22), transparent 60%);
    }

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 72px 0 84px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
    gap: 28px;
    align-items: stretch;
}

    .hero-grid > .fade-up {
        display: flex;
    }

.hero-copy,
.glass {
    border-radius: var(--ibdc-radius);
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.hero-copy {
    min-height: 560px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title,
h1.hh,
.hh {
    font-size: clamp(2.45rem, 4vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -.04em;
    color: #fff;
    text-shadow: 0 6px 22px rgba(0, 0, 0, .38);
    margin: 0 0 22px;
    font-weight: 800;
}

    .hero-title em,
    h1.hh em,
    .hh em {
        color: var(--ibdc-orange);
        font-style: italic;
    }

.hero-lead {
    max-width: 64ch;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, .82);
    font-size: 1.02rem;
    line-height: 1.75;
}

    .hero-lead strong {
        color: #fff;
    }

..hero-actions {
    display: flex;
    gap: 9px;
    flex-wrap: nowrap;
    align-items: center;
}

.hero-actions .ibdc-btn {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    gap: .35rem;
}

    .hero-actions .ibdc-btn i {
        font-size: .86rem;
    }

.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-stat,
.hstat {
    min-width: 72px;
}

    .hero-stat-value,
    .hero-stat .value,
    .hstat .val {
        font-size: 1.4rem;
        font-weight: 800;
        color: #fff;
        line-height: 1;
    }

    .hero-stat-label,
    .hero-stat .label,
    .hstat .lbl {
        font-size: .72rem;
        color: rgba(255, 255, 255, .62);
        margin-top: 3px;
    }

/* =========================================================
   APP MOCKUP BOX - MAPPA ESPERIENZIALE
========================================================= */

.app-mock-box {
    width: 100%;
    max-width: none;
    min-height: 560px;
    height: 100%;
    margin-left: 0;
    margin-top: 0;
    border-radius: var(--ibdc-radius);
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
    display: flex;
    flex-direction: column;
}

.app-mock-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient( 90deg, rgba(0, 119, 168, .18), rgba(245, 158, 51, .14), rgba(165, 48, 77, .13) );
}

    .app-mock-head span {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        color: rgba(255, 255, 255, .86);
        font-size: .88rem;
        font-weight: 800;
    }

.mock-chip {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .78);
    font-size: .72rem;
    font-weight: 700;
}

.app-mock-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    /* Filtri sopra la mappa */
    .app-mock-body .map-filter-bar {
        flex: 0 0 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .55rem;
        margin: 0;
        padding: 0;
    }

    .app-mock-body .map-filter-btn {
        appearance: none;
        border: 1px solid rgba(25, 135, 84, .25);
        background: #ffffff;
        color: #14532d;
        border-radius: 999px;
        padding: .46rem .9rem;
        font-size: .82rem;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
        transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    }

        .app-mock-body .map-filter-btn:hover {
            background: rgba(25, 135, 84, .08);
            color: #0f3d24;
            border-color: rgba(25, 135, 84, .45);
            transform: translateY(-1px);
        }

        .app-mock-body .map-filter-btn.active {
            background: #198754;
            color: #ffffff;
            border-color: #198754;
            box-shadow: 0 10px 22px rgba(25, 135, 84, .24);
        }

        .app-mock-body .map-filter-btn:focus {
            outline: none;
            box-shadow: 0 0 0 .18rem rgba(25, 135, 84, .22);
        }

/* Mappa */
.mock-map,
.map-preview {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(26, 80, 50, .70), rgba(14, 45, 32, .92));
    border: 1px solid rgba(255, 255, 255, .10);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mock-map.mock-map-leaflet {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        height: 100%;
        border-radius: 22px;
    }
        .mock-map.mock-map-leaflet .portal-preview-map,
        .mock-map.mock-map-leaflet .leaflet-container {
            width: 100%;
            height: 100%;
            min-height: 0;
            z-index: 1;
        }

.mock-map-label,
.map-preview-label,
.leaflet-map-label {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 500;
    background: rgba(255, 255, 255, .92);
    color: #1f2937;
    border-radius: 999px;
    padding: .45rem .75rem;
    font-size: .85rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

/* Preview dinamica sotto la mappa */
.mock-preview-grid,
.preview-grid {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.preview-card {
    border-radius: 13px;
    padding: 10px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .10);
}

.preview-icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.preview-card span {
    display: block;
    font-size: .66rem;
    color: rgba(255, 255, 255, .60);
    font-weight: 700;
}

.preview-card strong {
    display: block;
    font-size: .76rem;
    color: rgba(255, 255, 255, .92);
    margin-top: 1px;
}

/* Pin mockup legacy */
.mock-pin,
.map-preview-pin {
    position: absolute;
    font-size: 18px;
    animation: pinBounce 2s ease-in-out infinite;
}

.mock-pin-1,
.pin-1 {
    top: 22%;
    left: 30%;
}

.mock-pin-2,
.pin-2 {
    top: 63%;
    left: 24%;
    animation-delay: .3s;
}

.mock-pin-3,
.pin-3 {
    top: 47%;
    left: 64%;
    animation-delay: .6s;
}

@keyframes pinBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Box AI opzionale nel mockup */
.mock-ai,
.ai-preview {
    flex: 0 0 auto;
    border-radius: 13px;
    padding: 10px 12px;
    background: rgba(0, 119, 168, .15);
    border: 1px solid rgba(0, 119, 168, .22);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    color: rgba(255, 255, 255, .78);
}

/* =========================================================
   RESPONSIVE HERO / MOCKUP
========================================================= */

@media (max-width: 1180px) {
    .hero-grid {
        grid-template-columns: 1fr;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-copy {
        min-height: 560px;
        padding: 38px 42px;
    }

    .hero-grid > .fade-up {
    display: flex;
}

    .app-mock-box {
        width: 100%;
    }

    .mock-map.mock-map-leaflet {
        min-height: 360px;
    }

        .mock-map.mock-map-leaflet .portal-preview-map {
            min-height: 360px;
        }

    .hero-inner {
        padding: 52px 0 64px;
    }
}

@media (max-width: 800px) {
    .hero-copy {
        padding: 28px;
    }

    .hero-title,
    h1.hh,
    .hh {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .hero-lead {
        font-size: .94rem;
    }

    @media (max-width: 800px) {
        .hero-actions {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 0;
            margin-top: 18px;
        }

            .hero-actions .ibdc-btn {
                width: 100%;
                min-height: 46px;
                margin-bottom: 12px;
            }

                .hero-actions .ibdc-btn:last-child {
                    margin-bottom: 0;
                }
    }

  

    .mock-preview-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .hero-inner {
        padding: 38px 0 48px;
    }
    .hero-actions .ibdc-btn {
        margin-bottom: 14px;
    }

    .hero-copy {
        padding: 22px;
    }

    .app-mock-body {
        padding: 12px;
    }

        .app-mock-body .map-filter-btn {
            font-size: .72rem;
            padding: .38rem .7rem;
        }

    .mock-map.mock-map-leaflet {
        min-height: 260px;
        border-radius: 18px;
    }

        .mock-map.mock-map-leaflet .portal-preview-map {
            min-height: 260px;
        }
}

/* =========================================================
   GRIGLIE
========================================================= */
.g2,
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.g3,
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.g4,
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.g21,
.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.g12,
.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

/* =========================================================
   CHIP
========================================================= */
.chip,
.ibdc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid var(--ibdc-border);
    background: rgba(15, 23, 42, .05);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--ibdc-muted);
}

    .chip.blue,
    .chip-blue,
    .ibdc-chip-blue {
        border-color: rgba(0, 119, 168, .22);
        background: rgba(0, 119, 168, .07);
        color: var(--ibdc-blue);
    }

    .chip.orange,
    .chip-orange,
    .ibdc-chip-orange {
        border-color: rgba(245, 158, 51, .28);
        background: rgba(245, 158, 51, .08);
        color: var(--ibdc-orange-dark);
    }

    .chip.olive,
    .chip-olive,
    .ibdc-chip-olive {
        border-color: rgba(172, 162, 67, .28);
        background: rgba(172, 162, 67, .08);
        color: var(--ibdc-olive-dark);
    }

    .chip.magenta,
    .chip-magenta,
    .ibdc-chip-magenta {
        border-color: rgba(165, 48, 77, .25);
        background: rgba(165, 48, 77, .07);
        color: var(--ibdc-magenta);
    }

.card-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

/* =========================================================
   FEATURE STRIP
========================================================= */
.feature-strip,
.fstrip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scroll-snap-type: x mandatory;
}

    .feature-strip::-webkit-scrollbar,
    .fstrip::-webkit-scrollbar {
        height: 4px;
    }

    .feature-strip::-webkit-scrollbar-thumb,
    .fstrip::-webkit-scrollbar-thumb {
        background: rgba(0, 119, 168, .35);
        border-radius: 4px;
    }

.feature-card,
.fcard {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface);
    border-radius: var(--ibdc-radius);
    padding: 16px;
    box-shadow: var(--ibdc-shadow);
    transition: var(--ibdc-transition);
}

    .feature-card:hover,
    .fcard:hover {
        transform: translateY(-2px);
        box-shadow: var(--ibdc-shadow-md);
    }

    .feature-icon,
    .feature-card .icon,
    .fcard .fco {
        font-size: 1.55rem;
        margin-bottom: 9px;
    }

    .feature-card h3,
    .feature-card h4,
    .fcard h4 {
        font-size: .92rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .feature-card p,
    .fcard p {
        font-size: .8rem;
        color: var(--ibdc-muted);
        line-height: 1.55;
        margin-bottom: 0;
    }

/* =========================================================
   CARD DINAMICHE
========================================================= */
.route-card,
.ibdc-route-card,
.operator-card,
.az-card,
.event-card,
.ev-card,
.news-card,
.blog-card {
    border: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface);
    border-radius: var(--ibdc-radius);
    overflow: hidden;
    box-shadow: var(--ibdc-shadow);
    transition: var(--ibdc-transition);
}

    .route-card:hover,
    .ibdc-route-card:hover,
    .operator-card:hover,
    .az-card:hover,
    .event-card:hover,
    .ev-card:hover,
    .news-card:hover,
    .blog-card:hover {
        box-shadow: var(--ibdc-shadow-md);
        transform: translateY(-2px);
    }

.card-media,
.route-cover,
.rbanner,
.operator-cover,
.azh,
.news-cover,
.news-thumb,
.bthumb {
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a3d1a, #1a6030);
}

    .card-media img,
    .route-cover img,
    .operator-cover img,
    .news-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-media-icon {
    font-size: 3rem;
}

.route-cover,
.rbanner {
    height: 130px;
}

.route-cover-ofanto {
    background: linear-gradient(135deg, #0a3d1a, #1a6030);
}

.route-cover-vini {
    background: linear-gradient(135deg, #3d2a0a, #6a4c12);
}

.route-cover-storia {
    background: linear-gradient(135deg, #1a2a3d, #2a4060);
}

.route-body,
.rinfo,
.operator-body,
.azb,
.news-body,
.bbody {
    padding: 16px;
}

    .route-body h3,
    .rinfo h3,
    .operator-body h3,
    .operator-body h4,
    .azb h4,
    .news-body h3,
    .news-body h4,
    .bbody h4,
    .event-body h3,
    .event-body h4,
    .evbody h4 {
        font-size: .98rem;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .route-body p,
    .operator-body p,
    .azb p,
    .news-body p,
    .bbody p,
    .event-body p,
    .evbody p {
        font-size: .82rem;
        color: var(--ibdc-muted);
        line-height: 1.55;
        margin-bottom: .75rem;
    }

.route-meta,
.rmeta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
    font-size: .8rem;
    color: var(--ibdc-muted);
}

.operator-cover,
.azh {
    height: 92px;
    background: linear-gradient(135deg, #4a1a2a, #7c2139);
}

.operator-logo,
.azlog {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--ibdc-surface);
    border: 2px solid var(--ibdc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--ibdc-shadow);
    position: absolute;
    bottom: -16px;
    left: 14px;
}

.operator-body,
.azb {
    padding-top: 24px;
}

.event-card,
.ev-card {
    padding: 16px;
    display: flex;
    gap: 14px;
}

.event-date,
.evdate {
    flex: 0 0 52px;
    text-align: center;
    border-radius: var(--ibdc-radius-sm);
    border: 1px solid var(--ibdc-border);
    padding: 8px 4px;
    background: rgba(15, 23, 42, .04);
    align-self: flex-start;
}

    .event-day,
    .event-date .day,
    .evdate .day {
        font-size: 1.3rem;
        font-weight: 800;
        line-height: 1;
        color: var(--ibdc-blue);
    }

    .event-month,
    .event-date .month,
    .evdate .mon {
        font-size: .65rem;
        color: var(--ibdc-muted);
        text-transform: uppercase;
        font-weight: 700;
        margin-top: 2px;
    }

.event-location,
.news-meta,
.bmeta {
    font-size: .75rem;
    color: var(--ibdc-muted);
    margin-bottom: 6px;
}

.news-thumb,
.bthumb,
.news-cover {
    background: linear-gradient(135deg, rgba(0, 119, 168, .16), rgba(245, 158, 51, .16));
}

/* =========================================================
   MAPPE, INFO BOX, TIMELINE, FORM, FILTRI
========================================================= */
.map-box,
.map-ph {
    border-radius: var(--ibdc-radius);
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    background: linear-gradient(145deg, #142a1e, #1e3d28);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    gap: 10px;
    min-height: 300px;
}

    .map-box-label,
    .map-ph .ml {
        color: rgba(255, 255, 255, .66);
        font-size: .9rem;
        font-weight: 500;
        z-index: 2;
        text-align: center;
    }

    .map-box-subtitle,
    .map-ph .ml2 {
        font-size: .76rem;
        color: rgba(255, 255, 255, .44);
        z-index: 2;
    }

.info-box {
    border-radius: var(--ibdc-radius-sm);
    border: 1px solid rgba(0, 119, 168, .16);
    background: rgba(0, 119, 168, .05);
    padding: 16px;
}

    .info-box h4 {
        font-size: .95rem;
        font-weight: 700;
        color: var(--ibdc-blue);
        margin-bottom: 7px;
    }

    .info-box p {
        font-size: .86rem;
        color: var(--ibdc-muted);
        line-height: 1.65;
        margin-bottom: 0;
    }

.timeline,
.tl {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item,
.tl-item {
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
}

    .timeline-item:last-child,
    .tl-item:last-child {
        padding-bottom: 0;
    }

.timeline-side,
.tl-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 36px;
}

.timeline-number,
.tl-num {
    width: 36px;
    height: 36px;
    border-radius: var(--ibdc-radius-sm);
    background: rgba(0, 119, 168, .10);
    border: 1px solid rgba(0, 119, 168, .20);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .82rem;
    color: var(--ibdc-blue);
}

.timeline-line,
.tl-line {
    width: 2px;
    flex: 1;
    background: var(--ibdc-divider);
    margin-top: 5px;
}

.timeline-body,
.tl-body {
    padding-top: 7px;
}

    .timeline-body h4,
    .tl-body h4 {
        font-size: .95rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .timeline-body p,
    .tl-body p {
        font-size: .82rem;
        color: var(--ibdc-muted);
        line-height: 1.55;
        margin-bottom: 0;
    }

.public-form .form-label,
.fg label {
    display: block;
    font-size: .82rem;
    font-weight: 500;
    color: var(--ibdc-muted);
    margin-bottom: 5px;
}

.public-input,
.fi {
    width: 100%;
    border: 1px solid var(--ibdc-border);
    background: rgba(15, 23, 42, .035);
    color: var(--ibdc-text);
    padding: 10px 13px;
    border-radius: var(--ibdc-radius-sm);
    font-size: .9rem;
    outline: none;
    transition: var(--ibdc-transition);
}

    .public-input:focus,
    .fi:focus {
        border-color: rgba(0, 119, 168, .40);
        box-shadow: 0 0 0 3px rgba(0, 119, 168, .10);
        background: #fff;
    }

textarea.public-input,
textarea.fi {
    resize: vertical;
    min-height: 100px;
}

.form-row,
.frow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.filters {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-btn,
.fb {
    border: 1px solid var(--ibdc-border);
    background: rgba(15, 23, 42, .035);
    color: var(--ibdc-muted);
    padding: 6px 13px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ibdc-transition);
}

    .filter-btn.active,
    .filter-btn:hover,
    .fb.active,
    .fb:hover {
        border-color: rgba(0, 119, 168, .35);
        background: rgba(0, 119, 168, .07);
        color: var(--ibdc-blue);
    }

.breadcrumb-public,
.bc {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    color: var(--ibdc-muted);
    padding: 8px 0 20px;
}

    .breadcrumb-public a,
    .bc a {
        color: var(--ibdc-blue);
    }

/* =========================================================
   CTA, STATI E ANIMAZIONI
========================================================= */
.cta-panel {
    border-radius: 26px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #fff;
    background: radial-gradient(700px 300px at 12% 40%, rgba(245, 158, 51, .28), transparent 60%), linear-gradient(135deg, #06334a, #0a2030 55%, #381626);
    box-shadow: var(--ibdc-shadow-lg);
}

    .cta-panel h2 {
        font-size: clamp(1.4rem, 2.6vw, 2rem);
        font-weight: 800;
        margin-bottom: 8px;
    }

    .cta-panel p {
        color: rgba(255, 255, 255, .76);
        max-width: 70ch;
        margin-bottom: 0;
    }

.cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.skeleton-card {
    min-height: 220px;
    border-radius: var(--ibdc-radius);
    border: 1px solid var(--ibdc-border);
    background: linear-gradient(90deg, rgba(15, 23, 42, .04), rgba(15, 23, 42, .08), rgba(15, 23, 42, .04));
    background-size: 220% 100%;
    animation: skeletonMove 1.2s ease-in-out infinite;
}

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

    100% {
        background-position: -100% 0;
    }
}

.empty-state,
.error-state {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: var(--ibdc-radius-sm);
    border: 1px solid var(--ibdc-border);
    background: #fff;
    color: var(--ibdc-muted);
    text-align: center;
}

.error-state {
    color: #b42318;
    background: #fff7f7;
}

.fade-up {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeUp .55s ease forwards;
}

    .fade-up.d1 {
        animation-delay: .08s;
    }

    .fade-up.d2 {
        animation-delay: .16s;
    }

    .fade-up.d3 {
        animation-delay: .24s;
    }

    .fade-up.d4 {
        animation-delay: .32s;
    }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   FOOTER
   Supporta sia footer vecchio sia footer nuovo a colonne
========================================================= */
.site-footer {
    margin-top: 0;
    padding: 34px 0 24px;
    border-top: 1px solid var(--ibdc-border);
    background: #fafafa;
    color: rgba(0, 0, 0, .72);
}

.footer-grid,
.footer-main {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.4fr .8fr .8fr .8fr;
    align-items: start;
}

.footer-brand p {
    font-size: .82rem;
    color: var(--ibdc-muted);
    line-height: 1.65;
    max-width: 38ch;
}

.footer-logo {
    width: 170px;
    margin-bottom: 10px;
}

.footer-col h5 {
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ibdc-muted);
    margin-bottom: 10px;
}

.footer-col a,
.footer-links a {
    display: block;
    font-size: .82rem;
    color: rgba(0, 0, 0, .72);
    padding: 3px 0;
    transition: var(--ibdc-transition);
}

    .footer-col a:hover,
    .footer-links a:hover {
        color: var(--ibdc-blue);
    }

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-association {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ibdc-divider);
    font-size: .82rem;
    color: var(--ibdc-muted);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--ibdc-divider);
}

    .footer-bottom p,
    .footer-copy {
        font-size: .78rem;
        color: var(--ibdc-muted);
        margin-bottom: 0;
    }

.footer-copy {
    text-align: right;
}

.footer-socials {
    display: flex;
    gap: 8px;
}

    .footer-socials a {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        border: 1px solid var(--ibdc-border);
        border-radius: 10px;
        background: rgba(15, 23, 42, .04);
        color: var(--ibdc-muted);
    }

        .footer-socials a:hover {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .07);
        }

/* =========================================================
   AUTH PAGE UNICA LOGIN / REGISTER
========================================================= */
.auth-page {
    padding: 56px 0;
}

.auth-card {
    width: min(760px, 100%);
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .10);
}

.auth-header h1 {
    font-weight: 800;
    margin-bottom: .35rem;
}

.auth-header p {
    color: rgba(15, 23, 42, .62);
    margin-bottom: 1.25rem;
}

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .35rem;
    margin-bottom: 1.4rem;
    background: rgba(15, 23, 42, .05);
    border-radius: 16px;
}

.auth-switch-btn {
    border: 0;
    border-radius: 13px;
    padding: .75rem 1rem;
    background: transparent;
    color: rgba(15, 23, 42, .65);
    font-weight: 700;
    transition: .2s ease;
}

    .auth-switch-btn.active {
        background: #fff;
        color: var(--ibdc-blue);
        box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    }

.auth-pane {
    animation: authFade .18s ease;
}

@keyframes authFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

    .account-card:hover {
        transform: translateY(-4px);
    }

    .account-card.selected {
        border: 2px solid var(--ibdc-blue);
        background-color: #f0f7ff;
    }







/* =========================================
   ACCOUNT DROPDOWN SEMPLICE
========================================= */

.public-account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.public-account-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 118px;
    display: none;
    padding: 6px;
    border-radius: 14px;
    background: var(--ibdc-surface);
    border: 1px solid var(--ibdc-border);
    box-shadow: var(--ibdc-shadow-md);
    z-index: 4000;
}

.public-account-menu:hover .public-account-dropdown {
    display: block;
}

.public-logout-dropdown {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: 7px 9px;
    border-radius: 10px;
    color: #7f1d1d;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--ibdc-transition);
}

    .public-logout-dropdown:hover {
        background: rgba(220, 38, 38, .08);
        color: #991b1b;
    }


/* =========================================================
   CHAT LEGACY / PAGINA ASSISTENTE
========================================================= */
.chat-container {
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}

.chat-user {
    text-align: right;
    margin-bottom: 10px;
}

    .chat-user .bubble {
        display: inline-block;
        background: #0d6efd;
        color: white;
        padding: 8px 12px;
        border-radius: 16px 16px 0 16px;
        max-width: 75%;
    }

.chat-ai {
    text-align: left;
    margin-bottom: 10px;
}

    .chat-ai .bubble {
        display: inline-block;
        background: #e9ecef;
        padding: 8px 12px;
        border-radius: 16px 16px 16px 0;
        max-width: 75%;
    }

/* =========================================================
   ELEMENTI TECNICI ESISTENTI
========================================================= */
.drag-handle {
    cursor: grab;
    font-size: 18px;
    color: #888;
    width: 30px;
}

    .drag-handle:hover {
        color: #000;
    }

.sortable-ghost {
    opacity: 0.4;
}

/* =========================================================
   TEMA SCURO FRONTEND PUBBLICO
========================================================= */
:root[data-theme="dark"] {
    --ibdc-bg: #07111C;
    --ibdc-surface: #101B28;
    --ibdc-surface-soft: #0C1622;
    --ibdc-text: #E5EEF8;
    --ibdc-muted: rgba(229, 238, 248, .64);
    --ibdc-border: rgba(229, 238, 248, .12);
    --ibdc-divider: rgba(229, 238, 248, .09);
    --ibdc-shadow: 0 8px 28px rgba(0, 0, 0, .30);
    --ibdc-shadow-md: 0 14px 42px rgba(0, 0, 0, .36);
    --ibdc-shadow-lg: 0 24px 70px rgba(0, 0, 0, .48);
}

    :root[data-theme="dark"] body,
    :root[data-theme="dark"] .layout-public {
        background: var(--ibdc-bg);
        color: var(--ibdc-text);
    }

    :root[data-theme="dark"] .public-header,
    :root[data-theme="dark"] .site-header {
        background: rgba(7, 17, 28, .88);
        border-bottom-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .public-main-nav a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .public-main-nav a:hover,
        :root[data-theme="dark"] .public-main-nav a.active {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .public-action-btn,
    :root[data-theme="dark"] .public-hamburger,
    :root[data-theme="dark"] .public-drawer-close {
        color: var(--ibdc-text);
        background: rgba(229, 238, 248, .07);
        border-color: rgba(229, 238, 248, .12);
    }

        :root[data-theme="dark"] .public-action-btn:hover,
        :root[data-theme="dark"] .public-hamburger:hover {
            background: rgba(229, 238, 248, .12);
        }

    :root[data-theme="dark"] .public-ai-btn {
        color: #fff;
        background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    }

    :root[data-theme="dark"] .public-hamburger span {
        background: var(--ibdc-text);
    }

    :root[data-theme="dark"] .public-auth-dropdown,
    :root[data-theme="dark"] .dropdown-menu {
        background: #101B28;
        border-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .dropdown-item {
        color: var(--ibdc-text);
    }

        :root[data-theme="dark"] .dropdown-item:hover {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .public-drawer-panel {
        background: #101B28;
        border-left-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .public-drawer-nav a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .public-drawer-nav a:hover,
        :root[data-theme="dark"] .public-drawer-nav a.active {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .section-soft,
    :root[data-theme="dark"] .section-muted,
    :root[data-theme="dark"] .stripe {
        background: rgba(16, 27, 40, .72);
        border-top-color: var(--ibdc-divider);
        border-bottom-color: var(--ibdc-divider);
    }

    :root[data-theme="dark"] .route-card,
    :root[data-theme="dark"] .operator-card,
    :root[data-theme="dark"] .event-card,
    :root[data-theme="dark"] .news-card,
    :root[data-theme="dark"] .feature-card,
    :root[data-theme="dark"] .auth-card,
    :root[data-theme="dark"] .empty-state,
    :root[data-theme="dark"] .info-box {
        background: var(--ibdc-surface);
        border-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .ibdc-btn {
        background: rgba(229, 238, 248, .08);
        border-color: var(--ibdc-border);
        color: var(--ibdc-text);
    }

        :root[data-theme="dark"] .ibdc-btn:hover {
            color: var(--ibdc-text);
            background: rgba(229, 238, 248, .13);
        }

    :root[data-theme="dark"] .ibdc-btn-primary,
    :root[data-theme="dark"] .ibdc-btn-orange,
    :root[data-theme="dark"] .ibdc-btn-magenta,
    :root[data-theme="dark"] .ibdc-btn-olive {
        color: #fff;
    }

    :root[data-theme="dark"] .ai-chat-box,
    :root[data-theme="dark"] .public-ai {
        background: var(--ibdc-surface);
    }

    :root[data-theme="dark"] .ai-chat-header {
        border-bottom-color: var(--ibdc-border);
        background: linear-gradient(135deg, rgba(0, 119, 168, .18), rgba(165, 48, 77, .13));
    }

    :root[data-theme="dark"] .ai-chat-suggestions {
        background: var(--ibdc-surface-soft);
        border-bottom-color: var(--ibdc-border);
    }

        :root[data-theme="dark"] .ai-chat-suggestions button {
            background: rgba(229, 238, 248, .06);
            border-color: var(--ibdc-border);
            color: var(--ibdc-muted);
        }

    :root[data-theme="dark"] .ai-chat-form {
        background: var(--ibdc-surface);
        border-top-color: var(--ibdc-border);
    }

        :root[data-theme="dark"] .ai-chat-form input,
        :root[data-theme="dark"] .public-input,
        :root[data-theme="dark"] .fi {
            background: rgba(229, 238, 248, .07);
            border-color: var(--ibdc-border);
            color: var(--ibdc-text);
        }

    :root[data-theme="dark"] .ai-message-bot {
        background: rgba(0, 119, 168, .15);
        border-color: rgba(0, 119, 168, .25);
    }

    :root[data-theme="dark"] .ai-message-user {
        background: rgba(165, 48, 77, .18);
        border-color: rgba(165, 48, 77, .26);
    }

    :root[data-theme="dark"] .site-footer {
        background: #08131F;
        border-top-color: var(--ibdc-border);
        color: var(--ibdc-muted);
    }

    :root[data-theme="dark"] .footer-col a,
    :root[data-theme="dark"] .footer-links a {
        color: var(--ibdc-muted);
    }

    :root[data-theme="dark"] .footer-col a:hover,
        :root[data-theme="dark"] .footer-links a:hover {
            color: #7DD3FC;
    }

    :root[data-theme="dark"] .home-section-heading h2,
    :root[data-theme="dark"] .home-content-card-title,
    :root[data-theme="dark"] .home-list-title,
    :root[data-theme="dark"] .home-newsletter-box h2,
    :root[data-theme="dark"] .home-discover-card h3 {
        color: var(--ibdc-text);
    }

    :root[data-theme="dark"] .home-section-heading p,
    :root[data-theme="dark"] .home-content-card-text,
    :root[data-theme="dark"] .home-list-text,
    :root[data-theme="dark"] .home-newsletter-box p,
    :root[data-theme="dark"] .home-discover-card p,
    :root[data-theme="dark"] .home-newsletter-privacy {
        color: var(--ibdc-muted);
    }

    :root[data-theme="dark"] .home-soft-section {
        background: linear-gradient(180deg, #0C1622 0%, #07111C 100%);
    }

    :root[data-theme="dark"] .home-content-card,
    :root[data-theme="dark"] .home-discover-card,
    :root[data-theme="dark"] .home-list-item,
    :root[data-theme="dark"] .home-newsletter-box,
    :root[data-theme="dark"] .home-empty-state {
        background: var(--ibdc-surface);
        border-color: var(--ibdc-border);
    }

/* =========================================================
   RESPONSIVE GENERALE
========================================================= */
@media (max-width: 1320px) {
    .public-topbar {
        grid-template-columns: auto 1fr max-content;
    }

    .public-main-nav {
        display: none;
    }

    .public-hamburger {
        display: flex;
    }

    .public-brand {
        width: auto;
        max-width: none;
    }

        .public-brand img {
            width: 168px;
            max-height: 54px;
        }
}

@media (max-width: 1220px) {
    .public-topbar {
        grid-template-columns: auto 1fr max-content;
    }

    .public-main-nav {
        display: none;
    }

    .public-hamburger {
        display: flex;
    }

    .public-brand {
        width: auto;
        max-width: none;
    }

        .public-brand img {
            width: 168px;
            max-height: 54px;
        }
}

@media (max-width: 1200px) {
    :root {
        --public-ai-width: 300px;
    }

    .g4,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .app-mock-box {
        max-width: 100%;
        margin-left: 0;
    }

    .hero-inner {
        padding: 44px 0 58px;
    }
}

@media (max-width: 991px) {
    .public-shell {
        display: block;
    }

        /*
       La vecchia sidebar AI persistente non deve essere mostrata in responsive.
       Il pannello ufficiale resta #site-ai, gestito dal pulsante nel drawer mobile.
    */
        .public-shell > .public-ai:not(#site-ai) {
            display: none;
        }

    .ai-mobile-toggle,
    .ai-mobile-panel {
        display: none;
    }
}

@media (max-width: 900px) {
    .footer-grid,
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .footer-copy {
        text-align: left;
    }
}

@media (max-width: 800px) {
    .hero-grid,
    .g3,
    .grid-3,
    .g2,
    .grid-2,
    .g21,
    .grid-2-1,
    .g12,
    .grid-1-2 {
        grid-template-columns: 1fr;
    }

    .hero-bleed,
    .ibdc-hero {
        min-height: auto;
    }

    .hero-copy {
        padding: 22px;
    }

    .hero-title,
    h1.hh,
    .hh {
        font-size: clamp(1.8rem, 9vw, 2.65rem);
    }

    .hero-lead {
        font-size: .88rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .hero-actions .ibdc-btn {
            width: 100%;
        }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .mock-preview-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .section-row {
        align-items: flex-start;
    }

        .section-row > .ibdc-btn {
            width: 100%;
        }

    .form-row,
    .frow {
        grid-template-columns: 1fr;
    }

    .cta-panel {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .cta-actions,
    .cta-actions .ibdc-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .wrap {
        width: calc(100% - 28px);
    }

    .g4,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 42px 0;
    }

    .event-card,
    .ev-card {
        flex-direction: column;
    }

    .event-date,
    .evdate {
        width: 64px;
    }

    .footer-grid,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .auth-switch {
        grid-template-columns: 1fr;
    }

    .home-map-actions .ibdc-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .public-topbar {
        column-gap: 8px;
        min-height: 64px;
    }

    .public-brand img {
        width: 145px;
    }

    .public-header-actions {
        gap: 5px;
    }

    .public-action-btn,
    .public-hamburger,
    .public-theme-btn,
    .public-ai-btn {
        width: 36px;
        height: 36px;
    }

    #loginMenu .public-action-btn {
        min-width: 36px;
        width: 36px;
        padding: 0;
    }

        #loginMenu .public-action-btn span {
            display: none;
        }

    #loginMenu .dropdown-toggle::after {
        display: none;
    }
}

@media (max-width: 390px) {
    .public-brand img {
        width: 128px;
    }

    .public-ai-btn {
        display: none;
    }
}


/* =========================================================
   TEMA SCURO
========================================================= */

:root[data-theme="dark"] {
    --ibdc-bg: #07111C;
    --ibdc-surface: #101B28;
    --ibdc-surface-soft: #0C1622;
    --ibdc-text: #E5EEF8;
    --ibdc-muted: rgba(229, 238, 248, .64);
    --ibdc-border: rgba(229, 238, 248, .12);
    --ibdc-divider: rgba(229, 238, 248, .09);
    --ibdc-shadow: 0 8px 28px rgba(0, 0, 0, .30);
    --ibdc-shadow-md: 0 14px 42px rgba(0, 0, 0, .36);
    --ibdc-shadow-lg: 0 24px 70px rgba(0, 0, 0, .48);
}

    :root[data-theme="dark"] body,
    :root[data-theme="dark"] .layout-public {
        background: var(--ibdc-bg);
        color: var(--ibdc-text);
    }

    :root[data-theme="dark"] .public-header {
        background: rgba(7, 17, 28, .88);
        border-bottom-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .public-main-nav a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .public-main-nav a:hover,
        :root[data-theme="dark"] .public-main-nav a.active {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .public-action-btn {
        color: var(--ibdc-text);
        background: rgba(229, 238, 248, .07);
        border-color: rgba(229, 238, 248, .12);
    }

        :root[data-theme="dark"] .public-action-btn:hover {
            background: rgba(229, 238, 248, .12);
        }

    :root[data-theme="dark"] .public-ai-btn {
        color: #fff;
        background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    }

    :root[data-theme="dark"] .public-auth-dropdown,
    :root[data-theme="dark"] .dropdown-menu {
        background: #101B28;
        border-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .dropdown-item {
        color: var(--ibdc-text);
    }

        :root[data-theme="dark"] .dropdown-item:hover {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .public-drawer-panel {
        background: #101B28;
        border-left-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .public-drawer-close,
    :root[data-theme="dark"] .public-hamburger {
        background: rgba(229, 238, 248, .07);
        border-color: var(--ibdc-border);
        color: var(--ibdc-text);
    }

        :root[data-theme="dark"] .public-hamburger span {
            background: var(--ibdc-text);
        }

    :root[data-theme="dark"] .public-drawer-nav a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .public-drawer-nav a:hover,
        :root[data-theme="dark"] .public-drawer-nav a.active {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

    :root[data-theme="dark"] .section-soft,
    :root[data-theme="dark"] .section-muted,
    :root[data-theme="dark"] .stripe {
        background: rgba(16, 27, 40, .72);
        border-top-color: var(--ibdc-divider);
        border-bottom-color: var(--ibdc-divider);
    }

    :root[data-theme="dark"] .route-card,
    :root[data-theme="dark"] .operator-card,
    :root[data-theme="dark"] .event-card,
    :root[data-theme="dark"] .news-card,
    :root[data-theme="dark"] .feature-card,
    :root[data-theme="dark"] .auth-card,
    :root[data-theme="dark"] .empty-state {
        background: var(--ibdc-surface);
        border-color: var(--ibdc-border);
    }

    :root[data-theme="dark"] .ibdc-btn {
        background: rgba(229, 238, 248, .08);
        border-color: var(--ibdc-border);
        color: var(--ibdc-text);
    }

        :root[data-theme="dark"] .ibdc-btn:hover {
            color: var(--ibdc-text);
            background: rgba(229, 238, 248, .13);
        }

    :root[data-theme="dark"] .ibdc-btn-primary,
    :root[data-theme="dark"] .ibdc-btn-orange {
        color: #fff;
    }

    :root[data-theme="dark"] .ai-chat-box,
    :root[data-theme="dark"] .public-ai {
        background: var(--ibdc-surface);
    }

    :root[data-theme="dark"] .ai-chat-header {
        border-bottom-color: var(--ibdc-border);
        background: linear-gradient(135deg, rgba(0, 119, 168, .18), rgba(165, 48, 77, .13));
    }

    :root[data-theme="dark"] .ai-chat-suggestions {
        background: var(--ibdc-surface-soft);
        border-bottom-color: var(--ibdc-border);
    }

        :root[data-theme="dark"] .ai-chat-suggestions button {
            background: rgba(229, 238, 248, .06);
            border-color: var(--ibdc-border);
            color: var(--ibdc-muted);
        }

    :root[data-theme="dark"] .ai-chat-form {
        background: var(--ibdc-surface);
        border-top-color: var(--ibdc-border);
    }

        :root[data-theme="dark"] .ai-chat-form input,
        :root[data-theme="dark"] .public-input,
        :root[data-theme="dark"] .fi {
            background: rgba(229, 238, 248, .07);
            border-color: var(--ibdc-border);
            color: var(--ibdc-text);
        }

    :root[data-theme="dark"] .ai-message-bot {
        background: rgba(0, 119, 168, .15);
        border-color: rgba(0, 119, 168, .25);
    }

    :root[data-theme="dark"] .ai-message-user {
        background: rgba(165, 48, 77, .18);
        border-color: rgba(165, 48, 77, .26);
    }

    :root[data-theme="dark"] .site-footer {
        background: #08131F;
        border-top-color: var(--ibdc-border);
        color: var(--ibdc-muted);
    }

    :root[data-theme="dark"] .footer-col a,
    :root[data-theme="dark"] .footer-links a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .footer-col a:hover,
        :root[data-theme="dark"] .footer-links a:hover {
            color: #7DD3FC;
        }

/* ================================
   PUBLIC ACCOUNT MENU
================================ */

.public-account-btn {
    gap: .4rem;
    font-weight: 600;
    border-radius: 999px;
    transition: all .2s ease;
}

    .public-account-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
    }

    /* Admin: rosso */
    .public-account-btn.public-account-admin {
        background: #dc3545;
        color: #fff;
    }

        .public-account-btn.public-account-admin:hover {
            background: #bb2d3b;
            color: #fff;
        }

    /* Operatore: giallo */
    .public-account-btn.public-account-operator {
        background: #ffc107;
        color: #212529;
    }

        .public-account-btn.public-account-operator:hover {
            background: #e0a800;
            color: #212529;
        }

    /* User: blu */
    .public-account-btn.public-account-user {
        background: #0d6efd;
        color: #fff;
    }

        .public-account-btn.public-account-user:hover {
            background: #0b5ed7;
            color: #fff;
        }

.public-account-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .12rem .45rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    background: rgba(255, 255, 255, .25);
}

.public-account-operator .public-account-role-badge {
    background: rgba(0, 0, 0, .14);
    color: #212529;
}

.public-logout-btn {
    border-radius: 999px;
}

/* =========================================================
   AUTH / USER PROFILE PUBLIC PAGES
========================================================= */

.public-auth-section,
.public-profile-section {
    padding: 4.5rem 0;
    background: radial-gradient(circle at top left, rgba(0, 119, 168, .10), transparent 32%), radial-gradient(circle at bottom right, rgba(255, 193, 7, .14), transparent 34%), #f6f8f7;
}

.public-auth-card,
.public-profile-card {
    border: 0;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
    overflow: hidden;
}

.public-auth-card-header,
.public-profile-header {
    padding: 2rem 2rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.public-auth-kicker,
.public-profile-kicker {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    background: rgba(0, 119, 168, .10);
    color: #0077a8;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.public-auth-title,
.public-profile-title {
    margin: 0;
    color: #17212b;
    font-weight: 800;
    letter-spacing: -.03em;
}

.public-auth-subtitle,
.public-profile-subtitle {
    color: #667085;
    margin: .5rem 0 0;
    line-height: 1.55;
}

.public-auth-card-body,
.public-profile-body {
    padding: 2rem;
}

.public-auth-side {
    min-height: 100%;
    padding: 2rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 119, 168, .95), rgba(5, 64, 92, .95)), url("/assets/img/public/auth-bg.jpg");
    background-size: cover;
    background-position: center;
}

    .public-auth-side h2 {
        font-weight: 800;
        letter-spacing: -.03em;
    }

    .public-auth-side p {
        color: rgba(255, 255, 255, .86);
    }

.public-auth-feature {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-top: 1rem;
}

    .public-auth-feature i {
        flex: 0 0 auto;
        width: 2rem;
        height: 2rem;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .16);
    }

.public-form-label {
    font-weight: 700;
    color: #344054;
    margin-bottom: .45rem;
}

.public-form-control {
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .13);
    padding: .75rem 1rem;
}

    .public-form-control:focus {
        border-color: #0077a8;
        box-shadow: 0 0 0 .2rem rgba(0, 119, 168, .14);
    }

.public-main-btn {
    border: 0;
    border-radius: 999px;
    padding: .75rem 1rem;
    font-weight: 800;
    background: #0077a8;
    color: #fff;
    transition: all .2s ease;
}

    .public-main-btn:hover {
        background: #005f86;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(0, 119, 168, .22);
    }

.public-secondary-link {
    color: #0077a8;
    font-weight: 700;
    text-decoration: none;
}

    .public-secondary-link:hover {
        color: #005f86;
        text-decoration: underline;
    }

.public-auth-message {
    min-height: 1.5rem;
    font-weight: 700;
}

/* Register cards */

.public-account-card {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 1.25rem;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    height: 100%;
}

    .public-account-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
    }

    .public-account-card.selected {
        border-color: #0077a8;
        box-shadow: 0 0 0 .22rem rgba(0, 119, 168, .12);
    }

.public-account-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto .85rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 119, 168, .10);
    color: #0077a8;
    font-size: 1.35rem;
}

.public-account-card.operator .public-account-icon {
    background: rgba(255, 193, 7, .22);
    color: #8a6200;
}

/* Profile */

.public-profile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.public-profile-info-box {
    border-radius: 1.25rem;
    background: #f8fafc;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
}

.public-profile-info-label {
    display: block;
    color: #667085;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.public-profile-info-value {
    color: #17212b;
    font-weight: 800;
    word-break: break-word;
}

.public-profile-push-active {
    background: #ecfdf3;
    border-color: rgba(22, 163, 74, .25);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .08);
}

.public-profile-tabs {
    border-bottom: 0;
    gap: .5rem;
    margin-bottom: 1rem;
}

    .public-profile-tabs .nav-link {
        border: 0;
        border-radius: 999px;
        background: #f1f5f9;
        color: #475467;
        font-weight: 700;
        padding: .6rem .95rem;
    }

        .public-profile-tabs .nav-link.active {
            background: #0077a8;
            color: #fff;
        }

.public-profile-tab-content {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1.25rem;
    background: #fff;
    padding: 1.5rem;
}

.public-soft-alert {
    border-radius: 1rem;
    border: 0;
}

/* Standalone confirmation/reset pages */

.public-standalone-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top left, rgba(0, 119, 168, .12), transparent 35%), #f6f8f7;
}

.public-result-box {
    border-radius: 1rem;
    padding: 1rem;
    font-weight: 700;
}

    .public-result-box.success {
        background: #d1e7dd;
        color: #0f5132;
    }

    .public-result-box.info {
        background: #cff4fc;
        color: #055160;
    }

    .public-result-box.error {
        background: #f8d7da;
        color: #842029;
    }

@media (max-width: 991.98px) {
    .public-auth-section,
    .public-profile-section {
        padding: 2.5rem 0;
    }

    .public-auth-side {
        display: none;
    }

    .public-profile-summary {
        grid-template-columns: 1fr;
    }

    .public-auth-card-header,
    .public-profile-header,
    .public-auth-card-body,
    .public-profile-body {
        padding: 1.35rem;
    }
}








    .mock-map.mock-map-leaflet .portal-preview-map {
        width: 100%;
        height: 100%;
        min-height: 260px;
        z-index: 1;
    }



/* =========================================================
   HOME - Filtri mappa anteprima portale
   ========================================================= */




/* =========================================================
   HOME - Marker Leaflet operatori compatti
   ========================================================= */

.ibc-map-pin {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pin-color, #198754) !important;
    border: 2px solid #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .25);
}

    /* Punta inferiore del marker */
    .ibc-map-pin::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -5px;
        width: 10px;
        height: 10px;
        background: var(--pin-color, #198754);
        border-right: 2px solid #ffffff;
        border-bottom: 2px solid #ffffff;
        transform: translateX(-50%) rotate(45deg);
        border-radius: 2px;
        z-index: 1;
    }

    .ibc-map-pin i,
    .ibc-map-pin .bi {
        position: relative;
        z-index: 2;
        color: #ffffff !important;
        fill: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: inline-block !important;
        font-size: .88rem;
        line-height: 1;
        transform: none !important;
    }

/* Tema scuro */
[data-theme="dark"] .ibc-map-pin i,
[data-theme="dark"] .ibc-map-pin .bi,
[data-bs-theme="dark"] .ibc-map-pin i,
[data-bs-theme="dark"] .ibc-map-pin .bi,
body.dark .ibc-map-pin i,
body.dark .ibc-map-pin .bi,
.dark-theme .ibc-map-pin i,
.dark-theme .ibc-map-pin .bi {
    color: #ffffff !important;
    fill: #ffffff !important;
    opacity: 1 !important;
    transform: none !important;
}

[data-theme="dark"] .leaflet-marker-icon,
[data-bs-theme="dark"] .leaflet-marker-icon,
body.dark .leaflet-marker-icon,
.dark-theme .leaflet-marker-icon {
    filter: none !important;
    opacity: 1 !important;
}

/* =========================================================
   AI CHAT - HEADER BUTTON + DRAWER PANEL
   ---------------------------------------------------------
   Versione unica e pulita:
   - pulsante AI desktop nell'header
   - pannello #site-ai come drawer laterale desktop/mobile
   - backdrop unico
   - vecchia ai-mobile-panel disattivata
========================================================= */

/* Pulsante AI nell'header desktop */
.public-header #btnFocusAi.public-ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 38px;
    width: auto;
    height: 38px;
    padding: .45rem .8rem;
    border: 1px solid rgba(0, 119, 168, .20);
    border-radius: 999px;
    background: rgba(0, 119, 168, .08);
    color: var(--ibdc-blue);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: var(--ibdc-transition);
}

    .public-header #btnFocusAi.public-ai-btn:hover {
        background: rgba(0, 119, 168, .13);
        color: var(--ibdc-blue-dark);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(0, 119, 168, .14);
    }

.public-header #btnFocusAi .public-ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1.08rem;
    line-height: 1;
}

.public-header #btnFocusAi .public-ai-text {
    display: inline-block;
    color: inherit;
    line-height: 1;
}

/* Quando compare l'hamburger, il pulsante AI desktop scompare.
   L'apertura mobile avviene dal pulsante #btnFocusAiMobile nel drawer. */
@media (max-width: 1320px) {
    .public-header #btnFocusAi.public-ai-btn {
        display: none;
    }
}


/* =========================================================
   AI CHAT - DRAWER PANEL
========================================================= */

#site-ai {
    position: fixed;
    top: 0;
    right: 0;
    width: min(430px, 100%);
    height: 100dvh;
    z-index: 3000;
    display: block;
    background: var(--ibdc-surface);
    box-shadow: -20px 0 50px rgba(15, 23, 42, .25);
    transform: translateX(105%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    overflow: hidden;
}

body.public-ai-open #site-ai {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#site-ai[aria-hidden="true"] {
    pointer-events: none;
}

.public-ai-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2990;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

    .public-ai-backdrop[hidden] {
        display: none;
    }

body.public-ai-open .public-ai-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Disattiva definitivamente la vecchia chat mobile flottante. */
.ai-mobile-toggle,
.ai-mobile-panel {
    display: none;
}

@media (max-width: 991px) {
    #site-ai.public-ai,
    #site-ai {
        display: block;
    }
}


/* =========================================================
   AI CHAT - HEADER INTERNO PANEL
========================================================= */

#site-ai .ai-chat-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ibdc-surface);
}

#site-ai .ai-chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    position: relative;
    padding: 1rem 1rem .85rem;
    background: linear-gradient(135deg, #f8fafc, #eef6f4);
    color: #0f172a;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

#site-ai .ai-chat-header-content {
    flex: 1 1 auto;
    min-width: 0;
}

#site-ai .ai-chat-title-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

#site-ai .ai-chat-title {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

    #site-ai .ai-chat-title i {
        color: var(--ibdc-blue);
    }

#site-ai .ai-chat-subtitle {
    margin: .28rem 0 0;
    color: #475569;
    font-size: .82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#site-ai .ai-chat-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
    margin: 0;
    padding: .2rem .45rem;
    border: 1px solid rgba(34, 197, 94, .22);
    border-radius: 999px;
    background: rgba(34, 197, 94, .08);
    color: #15803d;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

    #site-ai .ai-chat-status > span {
        width: .5rem;
        height: .5rem;
        border-radius: 999px;
        background: #22c55e;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
    }

#site-ai .public-ai-close {
    position: static;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: var(--ibdc-transition);
}

    #site-ai .public-ai-close:hover {
        background: rgba(15, 23, 42, .14);
        color: #0f172a;
        transform: rotate(90deg);
    }


/* =========================================================
   AI CHAT - CONTENUTO PANEL
========================================================= */

#site-ai .ai-chat-suggestions {
    flex: 0 0 auto;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    border-bottom: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface-soft);
}

    #site-ai .ai-chat-suggestions button {
        border: 1px solid var(--ibdc-border);
        background: #fff;
        border-radius: 10px;
        padding: .45rem .6rem;
        font-size: .75rem;
        color: var(--ibdc-muted);
        text-align: left;
        transition: var(--ibdc-transition);
    }

        #site-ai .ai-chat-suggestions button:hover {
            color: var(--ibdc-blue);
            background: rgba(0, 119, 168, .06);
            border-color: rgba(0, 119, 168, .22);
        }

#site-ai .ai-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .8rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    #site-ai .ai-chat-messages::-webkit-scrollbar {
        width: 4px;
    }

    #site-ai .ai-chat-messages::-webkit-scrollbar-thumb {
        background: rgba(15, 23, 42, .18);
        border-radius: 999px;
    }

#site-ai .ai-message {
    padding: .65rem .75rem;
    border-radius: 14px;
    font-size: .82rem;
    line-height: 1.5;
}

#site-ai .ai-message-bot {
    background: rgba(0, 119, 168, .07);
    border: 1px solid rgba(0, 119, 168, .13);
}

#site-ai .ai-message-user {
    align-self: flex-end;
    max-width: 88%;
    background: rgba(165, 48, 77, .07);
    border: 1px solid rgba(165, 48, 77, .14);
}

#site-ai .ai-chat-form {
    flex: 0 0 auto;
    display: flex;
    gap: .45rem;
    padding: .75rem;
    border-top: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface);
}

    #site-ai .ai-chat-form input {
        flex: 1;
        min-width: 0;
        border: 1px solid var(--ibdc-border);
        border-radius: 12px;
        padding: .55rem .7rem;
        font-size: .82rem;
        color: var(--ibdc-text);
        background: #fff;
        outline: none;
    }

        #site-ai .ai-chat-form input:focus {
            border-color: rgba(0, 119, 168, .45);
            box-shadow: 0 0 0 3px rgba(0, 119, 168, .10);
        }

    #site-ai .ai-chat-form button {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 12px;
        color: #fff;
        background: linear-gradient(135deg, var(--ibdc-blue), var(--ibdc-blue-dark));
    }


/* =========================================================
   AI CHAT - TEMA SCURO
========================================================= */

:root[data-theme="dark"] .public-header #btnFocusAi.public-ai-btn {
    border-color: rgba(125, 211, 252, .22);
    background: rgba(125, 211, 252, .10);
    color: #7dd3fc;
}

    :root[data-theme="dark"] .public-header #btnFocusAi.public-ai-btn:hover {
        background: rgba(125, 211, 252, .16);
        color: #bae6fd;
    }

:root[data-theme="dark"] #site-ai {
    background: var(--ibdc-surface);
}

    :root[data-theme="dark"] #site-ai .ai-chat-box,
    :root[data-theme="dark"] #site-ai .ai-chat-form {
        background: var(--ibdc-surface);
    }

    :root[data-theme="dark"] #site-ai .ai-chat-header {
        background: linear-gradient(135deg, #0f172a, #164e63);
        color: #f8fafc;
        border-bottom-color: rgba(255, 255, 255, .12);
    }

    :root[data-theme="dark"] #site-ai .ai-chat-title {
        color: #f8fafc;
    }

        :root[data-theme="dark"] #site-ai .ai-chat-title i {
            color: #67e8f9;
        }

    :root[data-theme="dark"] #site-ai .ai-chat-status {
        color: #bbf7d0;
        background: rgba(34, 197, 94, .12);
        border-color: rgba(34, 197, 94, .26);
    }

    :root[data-theme="dark"] #site-ai .ai-chat-subtitle {
        color: #cbd5e1;
    }

    :root[data-theme="dark"] #site-ai .ai-chat-suggestions {
        background: var(--ibdc-surface-soft);
        border-bottom-color: var(--ibdc-border);
    }

        :root[data-theme="dark"] #site-ai .ai-chat-suggestions button,
        :root[data-theme="dark"] #site-ai .ai-chat-form input {
            background: rgba(229, 238, 248, .07);
            border-color: var(--ibdc-border);
            color: var(--ibdc-text);
        }

    :root[data-theme="dark"] #site-ai .ai-message-bot {
        background: rgba(0, 119, 168, .15);
        border-color: rgba(0, 119, 168, .25);
    }

    :root[data-theme="dark"] #site-ai .ai-message-user {
        background: rgba(165, 48, 77, .18);
        border-color: rgba(165, 48, 77, .26);
    }

    :root[data-theme="dark"] #site-ai .public-ai-close {
        background: rgba(255, 255, 255, .14);
        color: #ffffff;
    }

        :root[data-theme="dark"] #site-ai .public-ai-close:hover {
            background: rgba(255, 255, 255, .22);
            color: #ffffff;
        }


/* =========================================================
   AI CHAT - RESPONSIVE
========================================================= */

@media (max-width: 575.98px) {
    #site-ai {
        width: 100%;
    }

        #site-ai .ai-chat-header {
            padding: .9rem .9rem .75rem;
            gap: .65rem;
        }

        #site-ai .ai-chat-title-row {
            gap: .5rem;
        }

        #site-ai .ai-chat-title {
            font-size: .95rem;
        }

        #site-ai .ai-chat-status {
            font-size: .7rem;
        }

        #site-ai .ai-chat-subtitle {
            font-size: .78rem;
        }

        #site-ai .public-ai-close {
            width: 2rem;
            height: 2rem;
            font-size: 1.35rem;
        }
}

/* =========================================================
   HOME PAGE - NUOVE SEZIONI
   Classi isolate: home-*
========================================================= */

.home-section {
    padding: 4.5rem 0;
    position: relative;
}

.home-soft-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.home-section-heading {
    max-width: 720px;
    margin-bottom: 2rem;
}

    .home-section-heading.compact {
        margin-bottom: 1.4rem;
    }

    .home-section-heading h2 {
        margin: 0 0 .65rem;
        font-size: clamp(1.7rem, 2.5vw, 2.35rem);
        font-weight: 850;
        color: #0f172a;
        letter-spacing: -.03em;
    }

    .home-section-heading p {
        margin: 0;
        color: #64748b;
        font-size: 1rem;
        line-height: 1.7;
    }

.home-section-heading-row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: .55rem;
    color: #0f766e;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-section-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

    .home-section-link:hover {
        color: #0ea5e9;
        text-decoration: none;
    }

    .home-section-link::after {
        content: "→";
        font-weight: 900;
        transition: transform .18s ease;
    }

    .home-section-link:hover::after {
        transform: translateX(3px);
    }


/* =========================================================
   ESPLORA IL PORTALE
========================================================= */

.home-discover-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
}

.home-discover-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 1.35rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .home-discover-card:hover {
        transform: translateY(-4px);
        border-color: rgba(15, 118, 110, .28);
        box-shadow: 0 22px 55px rgba(15, 23, 42, .13);
        text-decoration: none;
    }

    .home-discover-card i {
        width: 48px;
        height: 48px;
        margin-bottom: 1.1rem;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(15, 118, 110, .1);
        color: #0f766e;
        font-size: 1.35rem;
    }

    .home-discover-card h3 {
        margin: 0 0 .55rem;
        font-size: 1.15rem;
        font-weight: 850;
        color: #0f172a;
    }

    .home-discover-card p {
        margin: 0;
        color: #64748b;
        font-size: .95rem;
        line-height: 1.55;
    }


/* =========================================================
   CARD GRID GENERICO
========================================================= */

.home-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-content-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .home-content-card:hover {
        transform: translateY(-4px);
        border-color: rgba(15, 118, 110, .24);
        box-shadow: 0 22px 55px rgba(15, 23, 42, .13);
    }

.home-content-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
    overflow: hidden;
}

    .home-content-card-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .25s ease;
    }

.home-content-card:hover .home-content-card-media img {
    transform: scale(1.045);
}

.home-content-card-body {
    padding: 1.2rem;
}

.home-content-card-title {
    margin: 0 0 .55rem;
    font-size: 1.08rem;
    font-weight: 850;
    color: #0f172a;
    line-height: 1.3;
}

.home-content-card-text {
    margin: 0;
    color: #64748b;
    font-size: .94rem;
    line-height: 1.55;
}

.home-content-card-link {
    display: inline-flex;
    margin-top: 1rem;
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
}

    .home-content-card-link:hover {
        color: #0ea5e9;
        text-decoration: none;
    }

.home-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .75rem;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .32rem .58rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, .1);
    color: #0f766e;
    font-size: .76rem;
    font-weight: 800;
}


/* =========================================================
   NEWS / EVENTI
========================================================= */

.home-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
}

.home-list-block {
    display: grid;
    gap: .9rem;
    margin-bottom: 1rem;
}

.home-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .home-list-item:hover {
        transform: translateY(-2px);
        border-color: rgba(15, 118, 110, .24);
        box-shadow: 0 18px 42px rgba(15, 23, 42, .1);
        text-decoration: none;
    }

.home-list-thumb {
    flex: 0 0 92px;
    width: 92px;
    height: 76px;
    border-radius: 16px;
    overflow: hidden;
    background: #e2e8f0;
}

    .home-list-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.home-list-content {
    min-width: 0;
}

.home-list-meta {
    margin-bottom: .3rem;
    color: #0f766e;
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.home-list-title {
    margin: 0 0 .35rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.3;
}

.home-list-text {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.45;
}

.home-empty-state {
    padding: 1.2rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, .16);
    color: #64748b;
}


/* =========================================================
   COMMUNITY
========================================================= */

.home-community-section {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, .12), transparent 32%), linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
    color: #ffffff;
}

    .home-community-section .home-eyebrow,
    .home-community-section .home-section-heading h2,
    .home-community-section .home-section-heading p {
        color: #ffffff;
    }

    .home-community-section .home-section-heading p {
        opacity: .82;
    }

.home-community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-community-card {
    padding: 1.5rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(14px);
}

    .home-community-card i {
        width: 52px;
        height: 52px;
        margin-bottom: 1rem;
        border-radius: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .16);
        color: #ffffff;
        font-size: 1.35rem;
    }

    .home-community-card h3 {
        margin: 0 0 .5rem;
        font-size: 1.25rem;
        font-weight: 850;
    }

    .home-community-card p {
        margin: 0 0 1.1rem;
        opacity: .84;
        line-height: 1.6;
    }


/* =========================================================
   NEWSLETTER
========================================================= */

.home-newsletter-section {
    padding-bottom: 5rem;
}

.home-newsletter-box {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .1);
}

    .home-newsletter-box h2 {
        margin: 0 0 .65rem;
        color: #0f172a;
        font-size: clamp(1.6rem, 2.3vw, 2.2rem);
        font-weight: 850;
        letter-spacing: -.03em;
    }

    .home-newsletter-box p {
        margin: 0;
        color: #64748b;
        line-height: 1.7;
    }

.home-newsletter-form {
    display: grid;
    gap: .8rem;
}

    .home-newsletter-form input[type="email"] {
        width: 100%;
        min-height: 48px;
        padding: .75rem 1rem;
        border-radius: 999px;
        border: 1px solid rgba(15, 23, 42, .16);
        outline: none;
        font-weight: 600;
    }

        .home-newsletter-form input[type="email"]:focus {
            border-color: rgba(15, 118, 110, .55);
            box-shadow: 0 0 0 .25rem rgba(15, 118, 110, .12);
        }

.home-newsletter-privacy {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.4;
}

    .home-newsletter-privacy input {
        margin-top: .15rem;
    }


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

@media (max-width: 1199.98px) {
    .home-discover-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .home-section {
        padding: 3.5rem 0;
    }

    .home-section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-two-columns,
    .home-newsletter-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .home-discover-grid,
    .home-card-grid,
    .home-community-grid {
        grid-template-columns: 1fr;
    }

    .home-discover-card {
        min-height: auto;
    }

    .home-list-item {
        align-items: flex-start;
    }

    .home-list-thumb {
        flex-basis: 76px;
        width: 76px;
        height: 66px;
    }

    .home-newsletter-box {
        padding: 1.35rem;
        border-radius: 24px;
    }
}

@media (max-width: 575.98px) {
    .home-section {
        padding: 3rem 0;
    }

    .home-section-heading h2 {
        font-size: 1.55rem;
    }

    .home-list-item {
        flex-direction: column;
    }

    .home-list-thumb {
        width: 100%;
        height: 150px;
        flex-basis: auto;
    }
}

/* =========================================================
   FIX HEADER - AI CHAT NON DEVE SOVRAPPORSI AL MENU
========================================================= */

.public-topbar {
    grid-template-columns: 175px minmax(0, 1fr) max-content;
}

.public-main-nav {
    min-width: 0;
    overflow: hidden;
    padding-right: .5rem;
}

.public-header-actions {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Su desktop medio il pulsante AI diventa compatto */
@media (max-width: 1500px) {
    .public-header #btnFocusAi.public-ai-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 999px;
    }

    .public-header #btnFocusAi .public-ai-text {
        display: none;
    }
}

/* =========================================================
   HEADER - DROPDOWN "CHI SIAMO" COERENTE CON IL MENU
========================================================= */

.public-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.public-nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 7px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ibdc-muted);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--ibdc-transition);
}

    /* Icona del bottone dropdown */
    .public-nav-dropdown-btn .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .85rem;
        line-height: 1;
        flex: 0 0 auto;
    }

    /* Testo del bottone dropdown */
    .public-nav-dropdown-btn .nav-label {
        display: inline;
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
        color: inherit;
    }

    .public-nav-dropdown-btn i {
        font-size: .65rem;
        line-height: 1;
        opacity: .8;
    }

.public-nav-dropdown:hover .public-nav-dropdown-btn,
.public-nav-dropdown:focus-within .public-nav-dropdown-btn {
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .08);
}

.public-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border-radius: 14px;
    background: var(--ibdc-surface);
    border: 1px solid var(--ibdc-border);
    box-shadow: var(--ibdc-shadow-md);
    z-index: 1200;
}

.public-nav-dropdown:hover .public-nav-dropdown-menu {
    display: flex;
}

.public-nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ibdc-muted);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--ibdc-transition);
}

    /* Icone delle voci interne al dropdown */
    .public-nav-dropdown-menu a .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .9rem;
        line-height: 1;
        flex: 0 0 auto;
    }

    /* Testo delle voci interne al dropdown */
    .public-nav-dropdown-menu a .nav-label {
        display: inline;
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
        color: inherit;
    }

    .public-nav-dropdown-menu a:hover,
    .public-nav-dropdown-menu a.active {
        color: var(--ibdc-blue);
        background: rgba(0, 119, 168, .08);
    }



/* Tema scuro */
:root[data-theme="dark"] .public-nav-dropdown-menu {
    background: #101B28;
    border-color: var(--ibdc-border);
}

    :root[data-theme="dark"] .public-nav-dropdown-menu a {
        color: var(--ibdc-muted);
    }

        :root[data-theme="dark"] .public-nav-dropdown-menu a:hover,
        :root[data-theme="dark"] .public-nav-dropdown-menu a.active {
            color: #7DD3FC;
            background: rgba(0, 119, 168, .16);
        }

/* =========================================================
   FIX VISIBILITÀ DROPDOWN CHI SIAMO
========================================================= */

.public-header,
.public-topbar,
.public-main-nav {
    overflow: visible;
}

.public-main-nav {
    min-width: 0;
    max-width: 100%;
}

.public-nav-dropdown-menu {
    z-index: 4000;
}



/*css per filtri mappa per categoria*/
.home-map-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0;
}

.map-filter-btn {
    border: 1px solid rgba(15, 23, 42, .12);
    background: #fff;
    color: #1f2937;
    border-radius: 999px;
    padding: .45rem .85rem;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

    .map-filter-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    }

    .map-filter-btn.active {
        background: #0f766e;
        color: #fff;
        border-color: #0f766e;
    }

.header-language {
    display: flex;
    align-items: center;
    margin-left: 0.75rem;
}



/*SELETTORE LINGUE*/
.language-selector {
    border: 1px solid var(--border-color, #ddd);
    background: var(--surface-color, #fff);
    color: var(--text-color, #222);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    cursor: pointer;
}

    .language-selector:focus {
        outline: none;
        border-color: var(--primary-color, #2f7d46);
        box-shadow: 0 0 0 2px rgba(47, 125, 70, 0.15);
    }

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

/* =========================================================
   PERCORSI PUBBLICI
========================================================= */

.routes-page,
.route-detail-page {
    background: var(--ibdc-bg);
}

.routes-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 21, 34, .88), rgba(6, 21, 34, .48), rgba(6, 21, 34, .18)),
        url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg") center/cover;
}

.routes-hero-inner {
    padding: 4.5rem 0 3rem;
}

.routes-hero-copy {
    max-width: 720px;
}

.routes-hero h1,
.route-detail-title h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.routes-hero p,
.route-detail-title p {
    max-width: 680px;
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.75;
    opacity: .9;
}

.routes-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 3rem 0 4.5rem;
}

.routes-filter-panel,
.route-card,
.route-stat,
.route-plan-card,
.route-info-card,
.route-poi-card {
    background: #fff;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    box-shadow: var(--ibdc-shadow);
}

.routes-filter-panel {
    align-self: start;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    padding: 1.25rem;
}

.routes-filter-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.1rem;
}

.routes-filter-head i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.routes-filter-head h2,
.route-plan-card h2,
.route-info-card h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 850;
}

.routes-field {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.routes-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.routes-field span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.routes-field input,
.routes-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    padding: .65rem .8rem;
    color: var(--ibdc-text);
    background: #fff;
}

.routes-filter-actions {
    display: flex;
    gap: .55rem;
    padding-top: .3rem;
}

.routes-filter-actions .ibdc-btn {
    flex: 1;
}

.routes-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.routes-results-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.routes-results-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 850;
}

.routes-count {
    padding: .42rem .7rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .82rem;
    font-weight: 800;
}

.routes-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem;
    border: 1px solid var(--ibdc-border);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--ibdc-shadow);
}

.routes-view-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ibdc-muted);
    transition: var(--ibdc-transition);
}

    .routes-view-btn:hover {
        color: var(--ibdc-blue-dark);
        background: rgba(0, 119, 168, .08);
    }

    .routes-view-btn.is-active {
        color: #fff;
        background: var(--ibdc-blue);
    }

.routes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.routes-grid.is-list {
    grid-template-columns: 1fr;
}

.route-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.route-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 119, 168, .28);
    box-shadow: var(--ibdc-shadow-md);
}

.route-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbe6ef;
}

.route-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.route-card:hover .route-card-media img {
    transform: scale(1.045);
}

.route-card-media span {
    position: absolute;
    top: .9rem;
    left: .9rem;
    padding: .34rem .68rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 95, 134, .92);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.route-card-body {
    padding: 1.15rem;
}

.route-card-body > p:first-child {
    margin: 0 0 .35rem;
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.route-card h3 {
    margin: 0 0 .8rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 850;
}

.route-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
    padding: .8rem 0;
    margin-bottom: .85rem;
    border-top: 1px solid var(--ibdc-divider);
    border-bottom: 1px solid var(--ibdc-divider);
}

.route-card-meta span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--ibdc-text);
    font-size: .78rem;
    font-weight: 800;
}

.route-card-meta i {
    color: var(--ibdc-blue);
}

.route-card-text {
    min-height: 3.1em;
    margin: 0 0 1rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.routes-grid.is-list .route-card {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    min-height: 240px;
}

.routes-grid.is-list .route-card-media {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
}

.routes-grid.is-list .route-card-body {
    display: flex;
    flex-direction: column;
}

.routes-grid.is-list .route-card-text {
    flex: 1 1 auto;
    min-height: 0;
}

.routes-grid.is-list .route-card .ibdc-btn {
    align-self: flex-start;
}

.routes-empty-state {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: var(--ibdc-radius);
    color: var(--ibdc-muted);
    background: #fff;
}

.route-card-skeleton {
    min-height: 360px;
    padding: 1rem;
}

.route-card-skeleton div {
    border-radius: 14px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.route-card-skeleton div:first-child {
    height: 170px;
    margin-bottom: 1rem;
}

.route-card-skeleton div:nth-child(2) {
    height: 24px;
    margin-bottom: .75rem;
}

.route-card-skeleton div:nth-child(3) {
    height: 70px;
}

.route-detail-hero {
    min-height: 520px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(0deg, rgba(6, 21, 34, .9), rgba(6, 21, 34, .28)),
        var(--route-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.route-detail-hero-inner {
    padding: 4rem 0 5.5rem;
}

.route-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    font-weight: 700;
}

.route-detail-title {
    max-width: 880px;
}

.route-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}

.route-stat {
    padding: 1.1rem;
    text-align: center;
    backdrop-filter: blur(18px);
}

.route-stat i {
    color: var(--ibdc-blue);
    font-size: 1.5rem;
}

.route-stat span {
    display: block;
    margin-top: .35rem;
    color: var(--ibdc-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.route-stat strong {
    display: block;
    margin-top: .15rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.1rem;
    line-height: 1.2;
}

.route-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    padding: 3.5rem 0 4.5rem;
}

.route-detail-main {
    display: grid;
    gap: 2.25rem;
}

.route-content-section h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 850;
}

.route-rich-text {
    color: var(--ibdc-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.route-rich-text p {
    margin: 0 0 1rem;
}

.route-pois-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.route-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}

.route-gallery-item {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    background: #fff;
}

.route-gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.route-gallery-item figcaption {
    padding: .65rem .75rem;
    color: var(--ibdc-muted);
    font-size: .86rem;
}

.route-poi-card {
    display: flex;
    gap: .9rem;
    padding: 1rem;
    box-shadow: none;
}

.route-poi-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.route-poi-card span {
    color: var(--ibdc-muted);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.route-poi-card h3 {
    margin: .1rem 0 .25rem;
    font-size: .98rem;
    font-weight: 850;
}

.route-poi-card p {
    margin: 0;
    color: var(--ibdc-muted);
    font-size: .86rem;
    line-height: 1.5;
}

.route-map-shell {
    display: grid;
    gap: .9rem;
}

.route-map {
    height: 390px;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: #dbe6ef;
    box-shadow: var(--ibdc-shadow);
}

.route-elevation-profile {
    flex: 1 1 auto;
    min-height: 300px;
    padding: 0;
    background: #fff;
}

.route-elevation-panel {
    width: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--ibdc-shadow-md);
}

.route-elevation-panel.is-hidden {
    display: none;
}

.route-elevation-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid var(--ibdc-divider);
    background: linear-gradient(180deg, rgba(0, 119, 168, .12), rgba(0, 119, 168, .04));
    color: var(--ibdc-blue-dark);
    font-size: .82rem;
    font-weight: 850;
}

.route-elevation-panel-head button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: var(--ibdc-text);
}

.route-map-status {
    margin-top: .65rem;
    color: var(--ibdc-muted);
    font-size: .86rem;
}

.route-assistant-section {
    display: grid;
    gap: 1rem;
}

.route-assistant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.route-assistant-card,
.route-progress-card {
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.route-assistant-card h3 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .75rem;
    font-size: 1rem;
}

.route-assistant-value {
    margin: 0 0 .35rem;
    font-weight: 700;
    color: var(--ibdc-ink);
}

.route-assistant-card small,
.route-progress-card p {
    color: var(--ibdc-muted);
}

.route-assistant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .9rem;
}

.route-tracking-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

.route-tracking-metrics span {
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    padding: .65rem;
    min-width: 0;
}

.route-tracking-metrics small {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
}

.route-tracking-metrics strong {
    display: block;
    margin-top: .15rem;
    font-size: .98rem;
}

.route-tracking-status {
    margin: .75rem 0 0;
    color: var(--ibdc-muted);
}

.route-progress-card {
    display: grid;
    gap: .7rem;
}

.route-progress-card > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.route-progress-card progress {
    width: 100%;
    height: .75rem;
    accent-color: var(--ibdc-primary);
}

.route-offtrack-status:not(:empty) {
    font-weight: 700;
    color: #9f2d20;
}

.route-next-poi-status:not(:empty) {
    color: var(--ibdc-ink);
}

.route-poi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.route-poi-filter {
    border: 1px solid var(--ibdc-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ibdc-ink);
    padding: .45rem .8rem;
    font-size: .86rem;
    cursor: pointer;
}

.route-poi-filter.is-active {
    border-color: var(--ibdc-primary);
    background: var(--ibdc-primary);
    color: #fff;
}

.route-roadbook-timeline {
    display: grid;
    gap: .6rem;
}

.route-roadbook-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: .25rem 1rem;
    width: 100%;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    background: #fff;
    padding: .85rem;
    text-align: left;
    cursor: pointer;
}

.route-roadbook-item span {
    grid-row: span 2;
    font-weight: 800;
    color: var(--ibdc-primary);
}

.route-roadbook-item strong,
.route-roadbook-item small {
    min-width: 0;
}

.route-roadbook-item small {
    color: var(--ibdc-muted);
}

.route-roadbook-item.is-current {
    border-color: var(--ibdc-primary);
    box-shadow: 0 0 0 2px rgba(0, 119, 168, .12);
}

.route-report-form {
    display: grid;
    gap: .75rem;
}

.route-report-form select,
.route-report-form textarea {
    width: 100%;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    padding: .75rem .85rem;
    color: var(--ibdc-ink);
    background: #fff;
}

.leaflet-marker-icon.is-hidden {
    display: none;
}

.pois-page,
.poi-detail-page {
    background: var(--ibdc-bg);
    color: var(--ibdc-text);
}

.pois-hero,
.poi-detail-hero {
    min-height: 390px;
    display: flex;
    align-items: end;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(7, 34, 48, .86), rgba(7, 34, 48, .34)),
        var(--poi-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.pois-hero-inner,
.poi-detail-hero-inner {
    padding: 5rem 0 3.5rem;
}

.pois-hero-copy,
.poi-detail-title {
    max-width: 820px;
}

.pois-hero h1,
.poi-detail-title h1 {
    margin: .6rem 0 .9rem;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.pois-hero p,
.poi-detail-title p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1.05rem;
}

.pois-layout,
.poi-detail-layout {
    display: grid;
    grid-template-columns: minmax(250px, 320px) 1fr;
    gap: 28px;
    padding: 38px 0 72px;
}

.poi-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.pois-filter-panel,
.poi-side-card,
.poi-card {
    background: var(--ibdc-surface);
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    box-shadow: var(--ibdc-shadow);
}

.pois-filter-panel,
.poi-detail-sidebar {
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    align-self: start;
}

.pois-filter-panel,
.poi-side-card {
    padding: 1.25rem;
}

.pois-filter-head,
.pois-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pois-filter-head {
    align-items: center;
    justify-content: flex-start;
}

.pois-filter-head i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .12);
}

.pois-filter-head h2,
.poi-side-card h2 {
    margin: 0;
    font-size: 1rem;
}

.pois-field {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.pois-field span {
    color: var(--ibdc-muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pois-field input,
.pois-field select {
    width: 100%;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    padding: .7rem .8rem;
    color: var(--ibdc-text);
    background: var(--ibdc-surface);
}

.pois-check-field {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.pois-filter-actions {
    display: flex;
    gap: .65rem;
}

.pois-filter-actions .ibdc-btn {
    flex: 1;
}

.pois-results-head h2 {
    margin: .25rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.pois-count {
    color: var(--ibdc-muted);
    font-weight: 800;
}

.pois-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.poi-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.poi-card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.poi-card-media img,
.poi-route-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poi-card-media span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(7, 34, 48, .78);
    font-size: .78rem;
    font-weight: 800;
}

.poi-card-body {
    display: grid;
    gap: .65rem;
    padding: 1rem;
    flex: 1;
}

.poi-card-place {
    margin: 0;
    color: var(--ibdc-blue);
    font-size: .86rem;
    font-weight: 800;
}

.poi-card h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.poi-card h3 a,
.poi-card-footer a,
.poi-route-card {
    color: inherit;
    text-decoration: none;
}

.poi-card-text {
    margin: 0;
    color: var(--ibdc-muted);
    line-height: 1.55;
}

.poi-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: auto;
}

.poi-card-footer strong {
    color: var(--ibdc-magenta);
}

.poi-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--ibdc-blue);
    font-weight: 800;
}

.pois-empty-state {
    grid-column: 1 / -1;
    border: 1px dashed var(--ibdc-border);
    border-radius: 8px;
    padding: 1.5rem;
    color: var(--ibdc-muted);
    background: var(--ibdc-surface);
    text-align: center;
}

.poi-card-skeleton div {
    margin: 1rem;
    min-height: 18px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(148, 163, 184, .16), rgba(148, 163, 184, .28), rgba(148, 163, 184, .16));
}

.poi-card-skeleton div:first-child {
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: 0;
}

.pois-breadcrumb {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
    color: rgba(255, 255, 255, .84);
}

.pois-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.poi-detail-main,
.poi-detail-sidebar {
    display: grid;
    gap: 1.4rem;
    align-content: start;
}

.poi-content-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ibdc-border);
}

.poi-content-section h2 {
    margin: .25rem 0 .9rem;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.poi-rich-text {
    color: var(--ibdc-text);
    line-height: 1.75;
}

.poi-rich-text p {
    margin: 0 0 1rem;
}

.poi-quick-info,
.poi-contact-list {
    display: grid;
    gap: .75rem;
}

.poi-quick-info div {
    display: grid;
    gap: .2rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--ibdc-border);
}

.poi-quick-info div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.poi-quick-info span,
.poi-contact-item span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.poi-contact-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: .15rem .65rem;
    color: inherit;
    text-decoration: none;
}

.poi-contact-item i {
    grid-row: span 2;
    color: var(--ibdc-blue);
}

.poi-contact-item strong {
    overflow-wrap: anywhere;
}

.poi-map {
    height: 280px;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    background: #dbe6ef;
}

.poi-map-address {
    margin: .7rem 0 0;
    color: var(--ibdc-muted);
}

.poi-routes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.poi-route-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: .85rem;
    align-items: center;
    border: 1px solid var(--ibdc-border);
    border-radius: 8px;
    background: var(--ibdc-surface);
    overflow: hidden;
}

.poi-route-card img {
    aspect-ratio: 4 / 3;
}

.poi-route-card span {
    display: grid;
    gap: .2rem;
    padding-right: .8rem;
}

.poi-route-card small,
.poi-route-card em {
    color: var(--ibdc-muted);
    font-style: normal;
    font-size: .82rem;
}

.poi-route-card strong {
    color: var(--ibdc-text);
}

.route-elevation-profile .elevation-control,
.route-elevation-profile .elevation {
    width: 100% !important;
    height: 100% !important;
}

.route-elevation-profile .elevation-summary {
    padding-top: .65rem;
    border-top: 1px solid var(--ibdc-divider);
    margin-top: .45rem;
}

.route-elevation-profile svg {
    max-width: none;
    width: 100%;
}

.route-elevation-bars {
    height: 78px;
    display: flex;
    align-items: end;
    gap: 3px;
}

.route-elevation-bars span {
    flex: 1;
    min-width: 2px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--ibdc-blue), var(--ibdc-blue-dark));
}

.route-elevation-labels {
    display: flex;
    justify-content: space-between;
    margin-top: .45rem;
    color: var(--ibdc-muted);
    font-size: .75rem;
    font-weight: 700;
}

.route-elevation-empty {
    color: var(--ibdc-muted);
}

.route-detail-sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
}

.route-plan-card,
.route-info-card {
    padding: 1.25rem;
}

.route-plan-card {
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-blue), var(--ibdc-blue-dark));
}

.route-plan-card p {
    margin: .65rem 0 1rem;
    color: rgba(255, 255, 255, .82);
    line-height: 1.6;
}

.route-plan-actions {
    display: grid;
    gap: .65rem;
}

.route-plan-note {
    margin-top: .75rem;
    padding: .65rem .75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    line-height: 1.45;
}

.route-plan-card .ibdc-btn-primary,
.route-plan-card .ibdc-btn-light {
    width: 100%;
    color: var(--ibdc-blue);
    background: #fff;
    border-color: rgba(255, 255, 255, .3);
    box-shadow: none;
}

.route-tips-list {
    display: grid;
    gap: .7rem;
}

.route-tip {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    line-height: 1.5;
}

.route-tip i {
    margin-top: .12rem;
    color: var(--ibdc-blue);
}

.route-info-card h2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
}

.route-info-card h2 i {
    color: var(--ibdc-orange-dark);
}

.route-related-band {
    padding: 4rem 0;
    border-top: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface-soft);
}

.route-related-band .section-row,
.route-similar-section > h2 {
    margin-bottom: 1.25rem;
}

.route-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.route-related-card {
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: #fff;
    box-shadow: var(--ibdc-shadow);
}

.route-related-media {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.route-related-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.route-related-media span {
    position: absolute;
    top: .85rem;
    left: .85rem;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--ibdc-blue-dark);
    font-size: .68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.route-related-body {
    padding: 1rem;
}

.route-related-body p {
    margin: 0 0 .25rem;
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.route-related-body h3 {
    margin: 0 0 .45rem;
    font-size: 1.05rem;
    font-weight: 850;
}

.route-related-text {
    min-height: 3.9em;
    color: var(--ibdc-muted);
    font-size: .88rem;
    line-height: 1.45;
}

.route-related-body strong {
    display: block;
    margin-top: .85rem;
    color: var(--ibdc-blue);
}

.route-similar-section {
    padding: 4rem 0;
}

.route-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.route-similar-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    background: #fff;
    color: var(--ibdc-text);
    box-shadow: var(--ibdc-shadow);
}

.route-similar-card:hover {
    border-color: rgba(0, 119, 168, .45);
    color: var(--ibdc-blue);
}

.route-similar-card img {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 10px;
    object-fit: cover;
}

.route-similar-card strong {
    display: block;
    margin-bottom: .4rem;
    line-height: 1.25;
}

.route-similar-card small {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 800;
}

.route-info-card p {
    color: var(--ibdc-muted);
    line-height: 1.6;
}

:root[data-theme="dark"] .routes-page,
:root[data-theme="dark"] .route-detail-page {
    background: var(--ibdc-bg);
}

:root[data-theme="dark"] .routes-filter-panel,
:root[data-theme="dark"] .route-card,
:root[data-theme="dark"] .route-stat,
:root[data-theme="dark"] .route-plan-card,
:root[data-theme="dark"] .route-info-card,
:root[data-theme="dark"] .route-poi-card,
:root[data-theme="dark"] .route-related-card,
:root[data-theme="dark"] .route-similar-card,
:root[data-theme="dark"] .route-elevation-profile,
:root[data-theme="dark"] .route-elevation-panel,
:root[data-theme="dark"] .routes-empty-state {
    background: var(--ibdc-surface);
    border-color: var(--ibdc-border);
}

@media (max-width: 1199.98px) {
    .routes-layout,
    .route-detail-layout {
        grid-template-columns: 1fr;
    }

    .routes-filter-panel,
    .route-detail-sidebar {
        position: static;
    }

    .route-related-grid,
    .route-similar-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .route-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-stat:last-child {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .routes-grid,
    .route-pois-grid {
        grid-template-columns: 1fr;
    }

    .route-gallery-grid {
        grid-template-columns: 1fr;
    }

    .route-assistant-grid,
    .route-tracking-metrics {
        grid-template-columns: 1fr;
    }

    .route-progress-card > div {
        display: grid;
    }

    .route-roadbook-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .pois-layout,
    .poi-detail-layout {
        grid-template-columns: 1fr;
    }

    .pois-filter-panel,
    .poi-detail-sidebar {
        position: static;
    }

    .pois-grid,
    .poi-routes-grid {
        grid-template-columns: 1fr;
    }

    .pois-results-head,
    .pois-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .poi-route-card {
        grid-template-columns: 96px 1fr;
    }

    .routes-results-head,
    .routes-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .routes-results-actions,
    .routes-view-toggle {
        width: 100%;
    }

    .routes-results-actions {
        justify-content: space-between;
    }

    .routes-view-toggle {
        justify-content: center;
    }

    .routes-view-btn {
        flex: 1 1 0;
    }

    .routes-grid.is-list .route-card {
        grid-template-columns: 1fr;
    }

    .route-detail-hero {
        min-height: 460px;
    }

    .route-stats {
        margin-top: -2rem;
    }
}

/* =========================================================
   EVENTI PUBBLICI
========================================================= */

.events-page,
.event-detail-page {
    background: var(--ibdc-bg);
}

.events-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 21, 34, .88), rgba(6, 21, 34, .52), rgba(6, 21, 34, .18)),
        url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg") center/cover;
}

.events-hero-inner {
    padding: 4.5rem 0 3rem;
}

.events-hero-copy {
    max-width: 760px;
}

.events-hero h1,
.event-detail-title h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.events-hero p,
.event-detail-title p {
    max-width: 700px;
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.75;
    opacity: .9;
}

.events-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 3rem 0 4.5rem;
}

.events-filter-panel,
.event-list-card,
.event-stat,
.event-action-card,
.event-info-card {
    background: #fff;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    box-shadow: var(--ibdc-shadow);
}

.events-filter-panel {
    align-self: start;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    padding: 1.25rem;
}

.events-filter-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.1rem;
}

.events-filter-head i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.events-filter-head h2,
.event-action-card h2,
.event-info-card h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 850;
}

.events-field {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.events-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.events-filter-grid .events-field {
    min-width: 0;
}

.events-field span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.events-field input,
.events-field select {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    padding: .65rem .8rem;
    color: var(--ibdc-text);
    background: #fff;
}

.events-filter-actions {
    display: flex;
    gap: .55rem;
    padding-top: .3rem;
}

.events-filter-actions .ibdc-btn {
    flex: 1;
}

.events-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.events-results-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 850;
}

.events-count {
    padding: .42rem .7rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .82rem;
    font-weight: 800;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.event-list-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.event-list-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 119, 168, .28);
    box-shadow: var(--ibdc-shadow-md);
}

.event-list-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbe6ef;
}

.event-list-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.event-list-card:hover .event-list-media img {
    transform: scale(1.045);
}

.event-list-media span {
    position: absolute;
    top: .9rem;
    left: .9rem;
    padding: .34rem .68rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 118, 110, .94);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.event-list-body {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.15rem;
}

.event-date-badge {
    width: 68px;
    height: 76px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-blue), var(--ibdc-blue-dark));
}

.event-date-badge strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 850;
}

.event-date-badge span {
    display: block;
    margin-top: .22rem;
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.event-list-copy > p:first-child {
    margin: 0 0 .35rem;
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.event-list-card h3 {
    margin: 0 0 .7rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 850;
}

.event-list-card h3 a {
    color: inherit;
}

.event-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    margin-bottom: .75rem;
    color: var(--ibdc-muted);
    font-size: .82rem;
    font-weight: 800;
}

.event-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.event-list-meta i {
    color: var(--ibdc-blue);
}

.event-list-text {
    min-height: 3.1em;
    margin: 0 0 1rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.events-empty-state,
.events-error-state {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: var(--ibdc-radius);
    color: var(--ibdc-muted);
    background: #fff;
}

.events-error-state {
    margin: 4rem auto;
}

.events-error-state h1 {
    margin: 0 0 1rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.6rem;
    font-weight: 850;
}

.event-card-skeleton {
    min-height: 360px;
    padding: 1rem;
}

.event-card-skeleton div {
    border-radius: 14px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.event-card-skeleton div:first-child {
    height: 170px;
    margin-bottom: 1rem;
}

.event-card-skeleton div:nth-child(2) {
    height: 24px;
    margin-bottom: .75rem;
}

.event-card-skeleton div:nth-child(3) {
    height: 70px;
}

.event-detail-hero {
    min-height: 560px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(0deg, rgba(6, 21, 34, .9), rgba(6, 21, 34, .28)),
        var(--event-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.event-detail-hero-inner {
    padding: 4rem 0 5.5rem;
}

.event-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    font-weight: 700;
}

.event-breadcrumb a {
    color: inherit;
}

.event-detail-title {
    max-width: 900px;
}

.event-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}

.event-stat {
    padding: 1.1rem;
    text-align: center;
    backdrop-filter: blur(18px);
}

.event-stat i {
    color: var(--ibdc-blue);
    font-size: 1.5rem;
}

.event-stat span {
    display: block;
    margin-top: .35rem;
    color: var(--ibdc-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.event-stat strong {
    display: block;
    margin-top: .15rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.05rem;
    line-height: 1.25;
}

.event-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    padding: 3.5rem 0 4.5rem;
}

.event-detail-main {
    display: grid;
    gap: 2.25rem;
}

.event-content-section h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 850;
}

.event-rich-text {
    color: var(--ibdc-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.event-rich-text p {
    margin: 0 0 1rem;
}

.event-map {
    height: 390px;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: #dbe6ef;
    box-shadow: var(--ibdc-shadow);
}

.event-detail-sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
}

.event-action-card,
.event-info-card {
    padding: 1.25rem;
}

.event-action-card {
    color: #fff;
    background: linear-gradient(150deg, var(--ibdc-blue), var(--ibdc-blue-dark));
}

.event-action-card .section-kicker,
.event-action-card h2 {
    color: #fff;
}

.event-action-card p {
    margin: .65rem 0 1rem;
    color: rgba(255, 255, 255, .82);
    line-height: 1.6;
}

.event-action-list {
    display: grid;
    gap: .65rem;
}

.event-action-card .ibdc-btn-primary,
.event-action-card .ibdc-btn-light {
    width: 100%;
    color: var(--ibdc-blue);
    background: #fff;
    border-color: rgba(255, 255, 255, .3);
    box-shadow: none;
}

.event-info-card h2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
}

.event-info-card h2 i {
    color: var(--ibdc-orange-dark);
}

.event-info-list {
    display: grid;
    gap: .85rem;
    margin: 0;
}

.event-info-list div {
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--ibdc-divider);
}

.event-info-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.event-info-list dt {
    color: var(--ibdc-muted);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.event-info-list dd {
    margin: .2rem 0 0;
    color: var(--ibdc-text);
    font-weight: 750;
}

.event-tag {
    display: inline-flex;
    margin: .25rem .25rem 0 0;
    padding: .25rem .55rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .78rem;
    font-weight: 800;
}

:root[data-theme="dark"] .events-page,
:root[data-theme="dark"] .event-detail-page {
    background: var(--ibdc-bg);
}

:root[data-theme="dark"] .events-filter-panel,
:root[data-theme="dark"] .event-list-card,
:root[data-theme="dark"] .event-stat,
:root[data-theme="dark"] .event-info-card,
:root[data-theme="dark"] .events-empty-state,
:root[data-theme="dark"] .events-error-state,
:root[data-theme="dark"] .event-map {
    background: var(--ibdc-surface);
    border-color: var(--ibdc-border);
}

@media (max-width: 1199.98px) {
    .events-layout,
    .event-detail-layout {
        grid-template-columns: 1fr;
    }

    .events-filter-panel,
    .event-detail-sidebar {
        position: static;
    }
}

@media (max-width: 991.98px) {
    .event-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .events-grid {
        grid-template-columns: 1fr;
    }

    .events-results-head,
    .events-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .event-list-body {
        grid-template-columns: 1fr;
    }

    .event-date-badge {
        width: 76px;
    }

    .event-detail-hero {
        min-height: 460px;
    }

    .event-stats {
        margin-top: -2rem;
    }
}

/* =========================================================
   MAGAZINE / NEWS PUBBLICHE
========================================================= */

.magazine-page,
.magazine-detail-page {
    background: var(--ibdc-bg);
}

.magazine-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 21, 34, .88), rgba(6, 21, 34, .50), rgba(6, 21, 34, .18)),
        url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg") center/cover;
}

.magazine-hero-inner {
    padding: 4.5rem 0 3rem;
}

.magazine-hero-copy {
    max-width: 760px;
}

.magazine-hero h1,
.magazine-detail-title h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.magazine-hero p {
    max-width: 700px;
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.75;
    opacity: .9;
}

.magazine-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 3rem 0 4.5rem;
}

.magazine-filter-panel,
.magazine-card,
.magazine-side-card {
    background: #fff;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    box-shadow: var(--ibdc-shadow);
}

.magazine-filter-panel {
    align-self: start;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    padding: 1.25rem;
}

.magazine-filter-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
}

.magazine-filter-head-spaced {
    margin-top: 1.4rem;
}

.magazine-filter-head i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.magazine-filter-head h2,
.magazine-side-card h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 850;
}

.magazine-field {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.magazine-field span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.magazine-field input,
.magazine-field select {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    padding: .65rem .8rem;
    color: var(--ibdc-text);
    background: #fff;
}

.magazine-filter-actions {
    padding-top: 1rem;
}

.magazine-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.magazine-results-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 850;
}

.magazine-count {
    padding: .42rem .7rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .82rem;
    font-weight: 800;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.magazine-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.magazine-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 119, 168, .28);
    box-shadow: var(--ibdc-shadow-md);
}

.magazine-card.is-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr);
}

.magazine-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbe6ef;
}

.magazine-card.is-featured .magazine-card-media {
    aspect-ratio: auto;
    min-height: 330px;
}

.magazine-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.magazine-card:hover .magazine-card-media img {
    transform: scale(1.045);
}

.magazine-card-media span {
    position: absolute;
    top: .9rem;
    left: .9rem;
    padding: .34rem .68rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 118, 110, .94);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.magazine-card-body {
    padding: 1.15rem;
}

.magazine-card.is-featured .magazine-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.8rem;
}

.magazine-card-body > p:first-child {
    margin: 0 0 .45rem;
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.magazine-card h3 {
    margin: 0 0 .8rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 850;
}

.magazine-card.is-featured h3 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.magazine-card h3 a {
    color: inherit;
}

.magazine-card-text {
    min-height: 3.1em;
    margin: 0 0 1rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.magazine-card-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--ibdc-blue);
    font-weight: 850;
}

.magazine-empty-state,
.magazine-error-state {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: var(--ibdc-radius);
    color: var(--ibdc-muted);
    background: #fff;
}

.magazine-error-state {
    margin: 4rem auto;
}

.magazine-card-skeleton {
    min-height: 330px;
    padding: 1rem;
}

.magazine-card-skeleton div {
    border-radius: 14px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.magazine-card-skeleton div:first-child {
    height: 170px;
    margin-bottom: 1rem;
}

.magazine-card-skeleton div:nth-child(2) {
    height: 24px;
    margin-bottom: .75rem;
}

.magazine-card-skeleton div:nth-child(3) {
    height: 70px;
}

.magazine-detail-hero {
    min-height: 620px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(0deg, rgba(250, 248, 255, .98), rgba(250, 248, 255, .18) 55%, rgba(6, 21, 34, .12)),
        var(--magazine-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.magazine-detail-hero-inner {
    padding: 4rem 0 4.5rem;
}

.magazine-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    color: var(--ibdc-muted);
    font-size: .82rem;
    font-weight: 700;
}

.magazine-breadcrumb a {
    color: inherit;
}

.magazine-detail-title {
    max-width: 920px;
    color: var(--ibdc-text);
}

.magazine-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    font-weight: 800;
}

.magazine-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 330px;
    gap: 3rem;
    padding: 3.5rem 0 4.5rem;
}

.magazine-lead {
    margin: 0 0 2rem;
    padding-left: 1.2rem;
    border-left: 4px solid var(--ibdc-blue);
    color: var(--ibdc-muted);
    font-size: 1.08rem;
    line-height: 1.8;
    font-style: italic;
}

.magazine-rich-text {
    color: var(--ibdc-muted);
    font-size: 1rem;
    line-height: 1.85;
}

.magazine-rich-text h2,
.magazine-rich-text h3 {
    margin: 2rem 0 1rem;
    color: var(--ibdc-blue-dark);
    font-weight: 850;
}

.magazine-rich-text p {
    margin: 0 0 1rem;
}

.magazine-rich-text img,
.magazine-rich-text video,
.magazine-rich-text iframe {
    max-width: 100%;
    border-radius: var(--ibdc-radius);
}

.magazine-detail-sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
}

.magazine-side-card {
    padding: 1.25rem;
}

.magazine-side-card p {
    color: var(--ibdc-muted);
    line-height: 1.6;
}

.magazine-side-card h2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
}

.magazine-side-card h2 i {
    color: var(--ibdc-orange-dark);
}

.magazine-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.magazine-tag {
    display: inline-flex;
    padding: .25rem .55rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .78rem;
    font-weight: 800;
}

:root[data-theme="dark"] .magazine-page,
:root[data-theme="dark"] .magazine-detail-page {
    background: var(--ibdc-bg);
}

:root[data-theme="dark"] .magazine-filter-panel,
:root[data-theme="dark"] .magazine-card,
:root[data-theme="dark"] .magazine-side-card,
:root[data-theme="dark"] .magazine-empty-state,
:root[data-theme="dark"] .magazine-error-state {
    background: var(--ibdc-surface);
    border-color: var(--ibdc-border);
}

:root[data-theme="dark"] .magazine-detail-hero {
    background:
        linear-gradient(0deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .25) 55%, rgba(6, 21, 34, .20)),
        var(--magazine-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

@media (max-width: 1199.98px) {
    .magazine-layout,
    .magazine-detail-layout {
        grid-template-columns: 1fr;
    }

    .magazine-filter-panel,
    .magazine-detail-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .magazine-grid,
    .magazine-card.is-featured {
        grid-template-columns: 1fr;
    }

    .magazine-results-head {
        align-items: stretch;
        flex-direction: column;
    }

    .magazine-card.is-featured .magazine-card-media {
        min-height: 220px;
    }

    .magazine-detail-hero {
        min-height: 500px;
    }
}

@media (max-width: 575.98px) {
    .route-stats {
        grid-template-columns: 1fr;
    }

    .routes-filter-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .route-stat:last-child {
        grid-column: auto;
    }

    .route-map {
        height: 300px;
    }

    .route-elevation-panel {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: .9rem;
    }
}


/* =========================================================
   CONFIRM EMAIL PAGE
========================================================= */

.confirm-email-page .confirm-email-status-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 119, 168, .10);
    color: var(--ibdc-blue, #0077a8);
    font-size: 1.65rem;
    margin-bottom: 1rem;
}

.public-result-box {
    border-radius: 1.1rem;
    padding: 1rem;
    font-weight: 700;
    margin-top: 1.25rem;
    border: 1px solid transparent;
}

    .public-result-box.success {
        background: #d1e7dd;
        color: #0f5132;
        border-color: rgba(15, 81, 50, .16);
    }

    .public-result-box.info {
        background: #cff4fc;
        color: #055160;
        border-color: rgba(5, 81, 96, .16);
    }

    .public-result-box.error {
        background: #f8d7da;
        color: #842029;
        border-color: rgba(132, 32, 41, .16);
    }

/* =========================================================
   PUBLIC OPERATORS
========================================================= */
.operators-hero {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 21, 34, .9), rgba(6, 21, 34, .5), rgba(6, 21, 34, .22)),
        url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg") center/cover;
}

.operators-hero .wrap {
    padding: 4.25rem 0 3.5rem;
}

.operators-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    font-weight: 700;
}

.operators-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.operators-hero-copy {
    max-width: 820px;
}

.operators-hero h1,
.operator-detail-title h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.operators-hero p,
.operator-detail-title p {
    max-width: 700px;
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.75;
    opacity: .9;
}

.operators-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 3rem 0 4.5rem;
}

.operators-filter-panel,
.operator-card,
.operator-side-card,
.operator-service-card,
.operator-contact-band {
    background: #fff;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    box-shadow: var(--ibdc-shadow);
}

.operators-filter-panel {
    align-self: start;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    padding: 1.25rem;
}

.operators-filter-head,
.operator-side-card-head,
.operators-results-head,
.operators-section-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.operators-filter-head {
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.1rem;
}

.operators-filter-head i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.operators-filter-head h2,
.operator-side-card h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 850;
}

.operators-field {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.operators-field span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.operators-field input,
.operators-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    padding: .65rem .8rem;
    color: var(--ibdc-text);
    background: #fff;
}

.operators-chip-list,
.operator-card-tags,
.operator-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.operators-chip,
.operator-card-tags span,
.operator-tag-list span {
    border: 1px solid rgba(0, 119, 168, .18);
    border-radius: 999px;
    padding: .35rem .65rem;
    color: var(--ibdc-blue-dark);
    background: rgba(0, 119, 168, .07);
    font-size: .72rem;
    font-weight: 800;
}

.operators-chip {
    cursor: pointer;
}

.operators-chip.is-active,
.operators-chip:hover {
    color: #fff;
    background: var(--ibdc-blue);
}

.operators-filter-actions {
    display: flex;
    gap: .55rem;
    padding-top: .3rem;
}

.operators-filter-actions .ibdc-btn {
    flex: 1;
}

.operators-results-head {
    margin-bottom: 1.1rem;
}

.operators-results-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 850;
}

.operators-count {
    padding: .42rem .7rem;
    border-radius: 999px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .09);
    font-size: .82rem;
    font-weight: 800;
}

.operators-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.operator-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.operator-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 119, 168, .28);
    box-shadow: var(--ibdc-shadow-md);
}

.operator-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbe6ef;
}

.operator-card-media > img:not(.operator-card-logo) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.operator-card:hover .operator-card-media > img:not(.operator-card-logo) {
    transform: scale(1.045);
}

.operator-card-media > span {
    position: absolute;
    top: .9rem;
    left: .9rem;
    padding: .34rem .68rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 95, 134, .92);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.operator-card-logo {
    position: absolute;
    right: 1rem;
    bottom: -1.45rem;
    width: 68px;
    height: 68px;
    padding: .45rem;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    box-shadow: var(--ibdc-shadow);
}

.operator-card-body {
    padding: 1.65rem 1.15rem 1.15rem;
}

.operator-card h3 {
    margin: 0 0 .45rem;
    color: var(--ibdc-blue-dark);
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 850;
}

.operator-card-address {
    min-height: 1.3rem;
    margin: 0 0 .75rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--ibdc-muted);
    font-size: .8rem;
    font-weight: 700;
}

.operator-card-address i {
    color: var(--ibdc-orange-dark);
}

.operator-card-text {
    min-height: 4.2em;
    margin: 0 0 1rem;
    color: var(--ibdc-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.operator-card-footer {
    display: grid;
    gap: .85rem;
}

.operator-card-link {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--ibdc-blue);
    font-size: .85rem;
    font-weight: 850;
}

.operators-empty-state {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: var(--ibdc-radius);
    color: var(--ibdc-muted);
    background: #fff;
}

.operator-card-skeleton {
    min-height: 360px;
    padding: 1rem;
}

.operator-card-skeleton div {
    border-radius: 14px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.operator-card-skeleton div:first-child {
    height: 170px;
    margin-bottom: 1rem;
}

.operator-card-skeleton div:nth-child(2) {
    height: 24px;
    margin-bottom: .75rem;
}

.operator-card-skeleton div:nth-child(3) {
    height: 70px;
}

.operator-detail-hero {
    min-height: 520px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(0deg, rgba(6, 21, 34, .9), rgba(6, 21, 34, .28)),
        var(--operator-hero-image, url("/uploads/editor/images/20260508040808_9beede96acd54718a70849a46d63d2cd_intro-tratturi.jpg")) center/cover;
}

.operator-detail-hero-inner {
    padding: 4rem 0 5rem;
}

.operator-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    padding: 3.5rem 0 4.5rem;
}

.operator-detail-main {
    display: grid;
    gap: 2.25rem;
}

.operator-content-section h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 850;
}

.operator-rich-text {
    color: var(--ibdc-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.operator-rich-text p {
    margin: 0 0 1rem;
}

.operator-services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.operator-service-card {
    display: flex;
    gap: .9rem;
    padding: 1rem;
    box-shadow: none;
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

a.operator-service-card:hover,
a.operator-service-card:focus-visible {
    border-color: rgba(0, 95, 134, .45);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .12);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.operator-service-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ibdc-blue);
    background: rgba(0, 119, 168, .1);
}

.operator-service-card h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 850;
}

.operator-service-card p {
    margin: 0;
    color: var(--ibdc-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.operator-service-card strong {
    display: inline-block;
    margin-top: .55rem;
    color: var(--ibdc-blue-dark);
}

.operator-service-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .65rem;
    color: var(--ibdc-blue);
    font-size: .86rem;
    font-weight: 800;
}

.operator-service-link i {
    font-size: .9rem;
}

.operator-contact-band {
    padding: 1.25rem;
}

.operator-contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.operator-contact-item {
    display: grid;
    gap: .15rem;
    padding: .9rem;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    color: var(--ibdc-text);
    background: rgba(15, 23, 42, .02);
}

.operator-contact-item i {
    color: var(--ibdc-blue);
    font-size: 1.1rem;
}

.operator-contact-item span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.operator-contact-item strong {
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.operator-detail-sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
}

.operator-side-card {
    padding: 1.25rem;
}

.operator-side-card-head {
    align-items: center;
    margin-bottom: .85rem;
}

.operator-map {
    height: 340px;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: #dbe6ef;
}

.operator-map-address {
    margin: .8rem 0 0;
    color: var(--ibdc-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.operator-quick-info {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.operator-quick-info div {
    display: grid;
    gap: .15rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--ibdc-divider);
}

.operator-quick-info span {
    color: var(--ibdc-muted);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.operator-quick-info strong {
    color: var(--ibdc-text);
    font-size: .9rem;
    line-height: 1.45;
}

.operator-tag-list {
    margin-top: 1rem;
}

.operator-muted {
    color: var(--ibdc-muted);
}

:root[data-theme="dark"] .operators-filter-panel,
:root[data-theme="dark"] .operator-card,
:root[data-theme="dark"] .operator-side-card,
:root[data-theme="dark"] .operator-service-card,
:root[data-theme="dark"] .operator-contact-band,
:root[data-theme="dark"] .operators-empty-state {
    background: var(--ibdc-surface);
    border-color: var(--ibdc-border);
}

@media (max-width: 1199.98px) {
    .operators-layout,
    .operator-detail-layout {
        grid-template-columns: 1fr;
    }

    .operators-filter-panel,
    .operator-detail-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .operators-grid,
    .operator-services-grid,
    .operator-contacts-grid {
        grid-template-columns: 1fr;
    }

    .operators-results-head,
    .operators-filter-actions,
    .operator-side-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .operator-detail-hero {
        min-height: 460px;
    }

    .operator-map {
        height: 300px;
    }
}

/* Public CMS pages */
.public-cms-hero {
    min-height: 310px;
    display: flex;
    align-items: end;
    background:
        linear-gradient(90deg, rgba(20, 44, 34, .88), rgba(20, 44, 34, .52)),
        url("/assets/logo-bellodicerignola-senza-payoff.png") center right 10% / 360px auto no-repeat,
        var(--ibdc-brand, #1f6b4b);
    color: #fff;
}

.public-cms-hero-inner {
    width: 100%;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.public-cms-hero-copy {
    max-width: 760px;
}

.public-cms-hero h1 {
    margin: .5rem 0 .8rem;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0;
}

.public-cms-hero p {
    max-width: 680px;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .88);
}

.public-cms-body-section {
    padding: 3rem 0 4rem;
    background: var(--ibdc-bg);
}

.public-cms-layout {
    display: grid;
    grid-template-columns: minmax(0, 860px);
    justify-content: center;
}

.public-cms-article {
    min-width: 0;
}

.public-cms-cover {
    margin: 0 0 1.75rem;
    overflow: hidden;
    border-radius: var(--ibdc-radius);
    border: 1px solid var(--ibdc-border);
    background: var(--ibdc-surface-muted);
}

.public-cms-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.public-cms-excerpt {
    margin: 0 0 1.35rem;
    color: var(--ibdc-muted);
    font-size: 1.06rem;
    line-height: 1.7;
}

.public-cms-content {
    color: var(--ibdc-text);
    font-size: 1rem;
    line-height: 1.78;
}

.public-cms-content h2,
.public-cms-content h3 {
    margin: 2rem 0 .75rem;
    color: var(--ibdc-text);
    font-weight: 850;
    letter-spacing: 0;
}

.public-cms-content p,
.public-cms-content ul,
.public-cms-content ol {
    margin-bottom: 1rem;
}

.public-cms-content a {
    color: var(--ibdc-brand);
    font-weight: 750;
}

.public-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 2rem;
    align-items: start;
}

.public-contact-panel {
    position: sticky;
    top: calc(var(--public-header-height) + 1rem);
    padding: 1.25rem;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: var(--ibdc-surface);
    box-shadow: var(--ibdc-shadow-sm);
}

.public-contact-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 850;
}

.public-contact-list {
    display: grid;
    gap: .75rem;
}

.public-contact-item {
    display: grid;
    gap: .18rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--ibdc-divider);
}

.public-contact-item span {
    color: var(--ibdc-muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.public-contact-item strong,
.public-contact-item a {
    color: var(--ibdc-text);
    font-size: .93rem;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.public-contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.public-contact-social a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 38px;
    padding: .45rem .7rem;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius-sm);
    color: var(--ibdc-text);
    background: var(--ibdc-bg);
    text-decoration: none;
    font-weight: 750;
    font-size: .86rem;
}

.public-contact-map {
    height: 280px;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--ibdc-border);
    border-radius: var(--ibdc-radius);
    background: #dbe6ef;
}

@media (max-width: 991.98px) {
    .public-contact-layout {
        grid-template-columns: 1fr;
    }

    .public-contact-panel {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .public-cms-hero {
        min-height: 260px;
        background:
            linear-gradient(90deg, rgba(20, 44, 34, .9), rgba(20, 44, 34, .68)),
            var(--ibdc-brand, #1f6b4b);
    }

    .public-cms-hero-inner {
        padding-top: 3rem;
        padding-bottom: 2.4rem;
    }

    .public-cms-cover img {
        aspect-ratio: 4 / 3;
    }
}
