/*
 * Hero e gerarchia tipografica istituzionale condivisa.
 * Palette: blu rgb(10, 42, 77), accento rgb(93, 202, 220).
 */
:root {
    --rcd-hero-background: rgb(10, 42, 77);
    --rcd-hero-accent: rgb(93, 202, 220);
    --rcd-hero-text: #ffffff;
    --rcd-hero-muted: #dce8f2;
    --rcd-heading: #17324d;
    --rcd-body-muted: #52606d;
    --rcd-content-measure: 72ch;
}

/* Fascia istituzionale unica. */
.acn-page-hero,
.faq-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
    background: var(--rcd-hero-background) !important;
    color: var(--rcd-hero-text) !important;
    border-bottom: 6px solid var(--rcd-hero-accent);
}

.acn-page-hero::after,
.faq-hero::after {
    content: "";
    position: absolute;
    right: clamp(-5rem, -4vw, -1rem);
    bottom: clamp(-8rem, -10vw, -4rem);
    width: clamp(12rem, 26vw, 24rem);
    aspect-ratio: 1;
    border: clamp(1rem, 2.2vw, 2rem) solid rgba(93, 202, 220, .12);
    border-radius: 50%;
    pointer-events: none;
}

.acn-page-hero > .container,
.faq-hero > .container {
    position: relative;
    z-index: 1;
}

.acn-page-hero h1,
.acn-page-hero h2,
.acn-page-hero h3,
.acn-page-hero p,
.acn-page-hero .lead,
.faq-hero h1,
.faq-hero p {
    color: var(--rcd-hero-text) !important;
}

.acn-page-hero h1,
.faq-hero h1 {
    max-width: 22ch;
    margin: 0 0 .9rem;
    font-size: clamp(2.35rem, 5.2vw, 4.25rem);
    font-weight: 700;
    line-height: 1.03;
    letter-spacing: -.025em;
}

.acn-page-hero .lead,
.acn-page-hero > .container > p,
.faq-hero > .container > p {
    max-width: 68ch;
    margin-bottom: 0;
    color: var(--rcd-hero-muted) !important;
    font-size: clamp(1.12rem, 1.6vw, 1.32rem);
    font-weight: 400;
    line-height: 1.55;
    opacity: 1 !important;
}

.acn-page-hero .rcd-kicker,
.acn-page-hero .registry-service-kicker,
.acn-page-hero .rcd-association-eyebrow,
.faq-hero .rcd-kicker {
    display: block;
    margin-bottom: .7rem;
    color: var(--rcd-hero-accent) !important;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.acn-page-hero .acn-breadcrumb {
    margin: 0 0 1rem;
    color: var(--rcd-hero-muted) !important;
    font-size: .92rem;
    line-height: 1.35;
}

.acn-page-hero .acn-breadcrumb,
.acn-page-hero .acn-breadcrumb li,
.acn-page-hero .acn-breadcrumb [aria-current="page"] {
    color: var(--rcd-hero-muted) !important;
}

.acn-page-hero .acn-breadcrumb a {
    color: var(--rcd-hero-accent) !important;
    font-weight: 700;
    text-decoration-thickness: .1em;
    text-underline-offset: .18em;
}

.acn-page-hero .acn-breadcrumb a:hover,
.acn-page-hero .acn-breadcrumb a:focus-visible {
    color: #ffffff !important;
}

.acn-page-hero .acn-breadcrumb li + li::before {
    color: rgba(255, 255, 255, .62) !important;
}

.acn-page-hero a:focus-visible,
.faq-hero a:focus-visible,
.faq-hero input:focus-visible {
    outline: 3px solid var(--rcd-hero-accent) !important;
    outline-offset: 3px;
    box-shadow: none !important;
}

/* FAQ: stessa hero, campo di ricerca leggibile e senza gradiente. */
.faq-hero {
    text-align: left;
}

.faq-hero .faq-search-wrapper {
    max-width: 680px;
    margin: 1.5rem 0 0;
}

.faq-hero .faq-search-wrapper input {
    min-height: 52px;
    border: 2px solid transparent;
    border-radius: .35rem;
    background: #ffffff;
    color: #17324d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.faq-hero .faq-search-wrapper input:focus {
    border-color: var(--rcd-hero-accent);
    background: #ffffff;
    color: #17324d;
}

.faq-hero .faq-search-wrapper .search-icon {
    color: var(--rcd-hero-background);
}

/* Ricerca nel Registro: hero separata dal form. */
.rcd-registry-hero .registry-service-kicker {
    margin-bottom: .7rem;
}

.rcd-registry-hero .lead {
    max-width: 64ch;
}

/* Gerarchia tipografica uniforme nelle pagine pubbliche. */
.acn-page-content,
.unified-registry-page,
.faq-page-body,
.rcd-public-profiles {
    font-size: 1rem;
    line-height: 1.65;
}

.acn-page-content h2,
.rcd-public-profiles h2,
.faq-section h2,
.unified-registry-page h2 {
    margin-bottom: .8rem;
    color: var(--rcd-heading);
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.015em;
}

.acn-page-content h3,
.rcd-public-profiles h3,
.faq-section h3,
.unified-registry-page h3 {
    color: var(--rcd-heading);
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
}

.acn-page-content .lead,
.rcd-public-lead,
.rcd-public-section-intro,
.faq-section .lead,
.unified-registry-page .lead {
    max-width: var(--rcd-content-measure);
    color: var(--rcd-body-muted);
    font-size: clamp(1.1rem, 1.45vw, 1.25rem);
    font-weight: 400;
    line-height: 1.58;
}

.rcd-kicker,
.registry-service-kicker {
    color: var(--rcd-hero-background);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.acn-page-content p,
.rcd-public-profiles p,
.faq-section p,
.unified-registry-page p {
    max-width: var(--rcd-content-measure);
}

/* Solo desktop: header +2 px, logo aumentato nella stessa proporzione. */
@media (min-width: 992px) {
    .acn-logo-title {
        font-size: calc(1.5rem + 2px) !important;
    }

    .acn-logo-subtitle {
        font-size: calc(1rem + 2px) !important;
    }

    .acn-logo > img {
        width: 60px !important;
        height: 60px !important;
    }

    .acn-header-inner {
        min-height: 84px;
    }

    .acn-nav-list > li > a {
        font-size: calc(1rem + 2px);
    }
}

/* Tema scuro: la hero resta istituzionale e invariata. */
:root[data-theme="dark"] .acn-page-hero,
:root[data-theme="dark"] .faq-hero {
    background: var(--rcd-hero-background) !important;
}

:root[data-theme="dark"] .acn-page-content h2,
:root[data-theme="dark"] .acn-page-content h3,
:root[data-theme="dark"] .rcd-public-profiles h2,
:root[data-theme="dark"] .rcd-public-profiles h3,
:root[data-theme="dark"] .faq-section h2,
:root[data-theme="dark"] .faq-section h3,
:root[data-theme="dark"] .unified-registry-page h2,
:root[data-theme="dark"] .unified-registry-page h3,
:root[data-theme="dark"] .rcd-kicker,
:root[data-theme="dark"] .registry-service-kicker {
    color: #f0f6fc;
}

@media (max-width: 575.98px) {
    .acn-page-hero,
    .faq-hero {
        padding: 2.15rem 0 2.4rem;
    }

    .acn-page-hero h1,
    .faq-hero h1 {
        font-size: 2.35rem;
    }
}
