/* =========================================================
   ZIDREX TOOL PAGE
   CSS unico per header, footer e interfaccia del tool
   ========================================================= */


/* =========================================================
   BASE MINIMA
   Regole necessarie al markup di header.php e footer.php
   ========================================================= */

:root {
    --header-h: 72px;
    --footer-bg: #203e5e;
    --footer-text: #ffffff;
    --footer-text-light: rgba(255, 255, 255, .8);
    --footer-link: rgba(255, 255, 255, .9);
    --footer-link-hover: #ffd700;
    --bs-gradient:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, .15),
            rgba(255, 255, 255, 0)
        );
}

body {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

strong {
    font-weight: bolder;
}

img,
svg {
    vertical-align: middle;
}

button {
    margin: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-transform: none;
}

.container,
.container-fluid {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: .75rem;
    padding-left: .75rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -.75rem;
    margin-left: -.75rem;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: .75rem;
    padding-left: .75rem;
}

.col-6 {
    flex: 0 0 auto;
    width: 50%;
}

.col-12 {
    flex: 0 0 auto;
    width: 100%;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.text-center {
    text-align: center !important;
}

.text-white {
    color: #ffffff !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.ms-auto {
    margin-left: auto !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: .5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.pt-5 {
    padding-top: 3rem !important;
}

.pb-4 {
    padding-bottom: 1.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.gap-2 {
    gap: .5rem !important;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.shadow {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.bg-dark {
    background-color: rgb(0 0 0) !important;
}

.bg-gradient {
    background-image: var(--bs-gradient) !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

@media (min-width: 576px) {

    .container {
        max-width: 540px;
    }

}

@media (min-width: 768px) {

    .container {
        max-width: 720px;
    }

}

@media (min-width: 992px) {

    .container {
        max-width: 960px;
    }

}

@media (min-width: 1200px) {

    .container {
        max-width: 1140px;
    }

}

@media (min-width: 1400px) {

    .container {
        max-width: 1320px;
    }

}

@media (min-width: 1600px) {

    .container {
        max-width: 1520px;
    }

}

@media (min-width: 1800px) {

    .container {
        max-width: 1620px;
    }

}


/* =========================================================
   HEADER / NAVBAR
   ========================================================= */

.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.navbar-nav {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.nav-link {
    display: block;
    padding: .5rem 0;
    background: none;
    border: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    transition:
        color .15s ease-in-out,
        background-color .15s ease-in-out,
        border-color .15s ease-in-out;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

.navbar-toggler {
    padding: .25rem .75rem;
    color: rgba(255, 255, 255, .55);
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .375rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: box-shadow .15s ease-in-out;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
}

.navbar .nav-link {
    padding-inline: .75rem;
    color: rgb(255 255 255 / 92%);
    border-radius: 10px;
    text-decoration: none;
    transition:
        background-color .15s ease,
        color .15s ease,
        box-shadow .15s ease,
        transform .12s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link:active {
    color: #0180ef;
    background-color: rgba(255, 255, 255, .10);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    outline: none;
}

.navbar .nav-link[aria-expanded="true"] {
    color: #0180ef;
    background-color: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.navbar .nav-link:focus-visible {
    background-color: rgba(255, 255, 255, .10);
    outline: 2px solid #ffd24d;
    outline-offset: 2px;
}

.navbar .nav-link::after {
    display: none !important;
}

header[role="banner"] .row.align-items-center {
    min-height: var(--header-h);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

header[role="banner"] .logo img {
    display: block;
    width: auto;
    height: auto;
}

html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: calc(var(--header-h) + 8px);
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    margin-top: 3rem;
    color: var(--footer-text);
    background-color: var(--footer-bg);
    font-family:
        "Open Sans",
        Arial,
        "Helvetica Neue",
        system-ui,
        sans-serif;
}

footer h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    text-transform: uppercase;
}

footer p {
    color: var(--footer-text-light);
    font-size: .9rem;
    line-height: 1.5;
}

footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

footer li + li {
    margin-top: .5rem;
}

footer a {
    position: relative;
    color: var(--footer-link);
    font-size: .9rem;
    text-decoration: none;
    transition: color .3s ease;
}

footer a::after {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    content: "";
    transition: width .3s ease;
}

footer a:hover,
footer a:focus {
    color: var(--footer-link-hover);
}

footer a:hover::after,
footer a:focus::after {
    width: 100%;
}

footer hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .2);
}


/* =========================================================
   RESPONSIVE HEADER / FOOTER
   ========================================================= */

@media (min-width: 768px) {

    .col-md-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .text-md-start {
        text-align: left !important;
    }

    .text-md-end {
        text-align: right !important;
    }

    .mb-md-0 {
        margin-bottom: 0 !important;
    }

}

@media (min-width: 992px) {

    .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-lg-9 {
        flex: 0 0 auto;
        width: 75%;
    }

    .navbar-expand-lg {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }

    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-lg .navbar-toggler {
        display: none;
    }

    .d-lg-none {
        display: none !important;
    }

    .text-lg-start {
        text-align: left !important;
    }

    .gap-lg-2 {
        gap: .5rem !important;
    }

    header[role="banner"] .row.align-items-center {
        height: var(--header-h);
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

}

@media (max-width: 991.98px) {

    .navbar .navbar-toggler {
        margin-left: auto !important;
    }

    #navbarMain.navbar-collapse {
        position: fixed;
        inset: 0;
        z-index: 1040;
        width: 100vw;
        height: 100vh;
        padding: calc(var(--header-h) + 12px) 24px 32px;
        overflow-y: auto;
        background: #011932;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
        transition:
            opacity .2s ease,
            transform .2s ease;
    }

    #navbarMain.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    #navbarMain .nav-link {
        padding: 12px 4px;
        color: #ffffff;
        font-size: 1.15rem;
    }

    #navbarMain .navbar-nav > .nav-item + .nav-item {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, .15);
    }

    .navbar-close {
        position: absolute;
        top: 14px;
        right: 14px;
        padding: 4px 8px;
        color: #ffffff;
        background: transparent;
        border: 0;
        font-size: 36px;
        line-height: 1;
        cursor: pointer;
    }

    .navbar-dark .navbar-toggler {
        border-color: #0b2e59;
    }

    .navbar-dark .navbar-toggler-icon {
        background-image:
            url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(11,46,89,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 .25rem rgba(11, 46, 89, .25);
    }

    body.nav-open {
        overflow: hidden;
    }

}

@supports not (scroll-margin-top: 1px) {

    [id]::before {
        display: block;
        height: var(--header-h);
        margin-top: calc(-1 * var(--header-h));
        visibility: hidden;
        content: "";
    }

}

@media (prefers-reduced-motion: reduce) {

    #navbarMain.navbar-collapse {
        transition: none !important;
    }

}


/* =========================================================
   TOOL
   CSS originale presente nella pagina PHP
   ========================================================= */

/* =========================================================
   ZIDREX TOOL UI
   Dark technical interface
   ========================================================= */


/* =========================================================
   RESET LOCALE / BASE
   ========================================================= */

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

html {
    color-scheme: dark;
}

body.tool-dark-page {
    margin: 0;
    min-height: 100vh;
    color: #edf3fa;
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(74, 116, 190, .10),
            transparent 34rem
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(56, 92, 150, .07),
            transparent 30rem
        ),
        #090e14;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.tool-dark-page ::selection {
    color: #ffffff;
    background: #416fc4;
}

button,
input {
    font: inherit;
}

button,
a,
input,
summary {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: #8ab4ff;
}

a:hover {
    color: #aecbff;
}


/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.tool-page {
    position: relative;
    padding-top: 64px;
    padding-bottom: 80px;
}


/* =========================================================
   HERO
   ========================================================= */

.tool-header {
    width: min(880px, 100%);
    margin: 0 auto 34px;
}

.tool-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #8da9d8;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tool-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: #638bd1;
}

.tool-header h1 {
    max-width: 800px;
    margin: 0;
    color: #f7f9fc;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.tool-intro {
    max-width: 720px;
    margin: 20px 0 0;
    color: #c0cad6;
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.7;
}

.tool-intro-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 720px;
    margin: 14px 0 0;
    color: #8290a0;
    font-size: .9rem;
    line-height: 1.6;
}

.tool-intro-note::before {
    content: "✓";
    flex: 0 0 auto;
    margin-top: 1px;
    color: #52c995;
    font-weight: 800;
}


/* =========================================================
   SEARCH CARD
   ========================================================= */

.tool-card {
    width: min(880px, 100%);
    margin: 0 auto;
}

.tool-search-card {
    position: relative;
    padding: 30px;
    overflow: visible;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, .018),
            transparent
        ),
        #111821;
    border: 1px solid #263140;
    border-radius: 16px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .24),
        inset 0 1px rgba(255, 255, 255, .025);
}

.tool-search-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(110, 154, 231, .7),
        transparent
    );
}

.tool-section-header {
    margin-bottom: 28px;
}

.tool-section-header h2 {
    margin: 0;
    color: #f2f6fb;
    font-size: 1.35rem;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.tool-section-header p {
    margin: 7px 0 0;
    color: #8895a5;
    font-size: .94rem;
}


/* =========================================================
   SEARCH STEPS
   ========================================================= */

.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.tool-field {
    min-width: 0;
}

.tool-field-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 11px;
}

.tool-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-top: 1px;
    color: #cfe0ff;
    background: #172a48;
    border: 1px solid #31568e;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 800;
}

.tool-field-heading > div {
    min-width: 0;
}

.tool-field-heading label {
    display: block;
    margin: 0;
    color: #edf3fa;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.tool-field-help {
    margin: 4px 0 0;
    color: #778597;
    font-size: .84rem;
    line-height: 1.5;
}


/* =========================================================
   AUTOCOMPLETE INPUT
   ========================================================= */

.tool-autocomplete {
    position: relative;
}

.tool-search-input {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 0 88px 0 16px;
    color: #f0f5fb;
    background: #0c121a;
    border: 1px solid #303c4b;
    border-radius: 10px;
    outline: none;
    caret-color: #7da8f4;
    transition:
        border-color .16s ease,
        background-color .16s ease,
        box-shadow .16s ease;
}

.tool-search-input::placeholder {
    color: #596575;
    opacity: 1;
}

.tool-search-input:hover {
    border-color: #3e4d5f;
}

.tool-search-input:focus {
    background: #0e151e;
    border-color: #5b86cf;
    box-shadow:
        0 0 0 3px rgba(79, 126, 207, .14);
}


/* =========================================================
   SELECTED AUTOCOMPLETE STATE
   ========================================================= */

.tool-autocomplete.has-selection .tool-search-input {
    padding-right: 88px;
    background: #0d1623;
    border-color: #3f669e;
}

.tool-autocomplete.has-selection .tool-search-input:focus {
    border-color: #5b86cf;
    box-shadow:
        0 0 0 3px rgba(79, 126, 207, .14);
}

.tool-autocomplete.has-selection::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 54px;
    z-index: 3;
    width: 8px;
    height: 8px;
    transform: translateY(-50%);
    background: #6795e5;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px rgba(103, 149, 229, .12);
    pointer-events: none;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.tool-clear-button {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0 0 2px;
    transform: translateY(-50%);
    color: #8190a1;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition:
        color .15s ease,
        background-color .15s ease;
}

.tool-clear-button:hover {
    color: #edf3fa;
    background: #1d2733;
}

.tool-clear-button:focus-visible {
    outline: 2px solid #6d9aea;
    outline-offset: 2px;
}

.tool-clear-button[hidden] {
    display: none;
}


/* =========================================================
   AUTOCOMPLETE DROPDOWN
   ========================================================= */

.tool-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 340px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #101821;
    border: 1px solid #344152;
    border-radius: 11px;
    box-shadow:
        0 22px 55px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(255, 255, 255, .015);
    scrollbar-width: thin;
    scrollbar-color: #39485b #101821;
}

.tool-suggestions[hidden] {
    display: none;
}

.tool-suggestion {
    position: relative;
    padding: 12px 14px;
    border-bottom: 1px solid #222d39;
    cursor: pointer;
    transition:
        background-color .12s ease,
        color .12s ease;
}

.tool-suggestion:first-child {
    border-radius: 10px 10px 0 0;
}

.tool-suggestion:last-child {
    border-bottom: 0;
    border-radius: 0 0 10px 10px;
}

.tool-suggestion:hover,
.tool-suggestion.is-active {
    background: #19283c;
}

.tool-suggestion.is-active::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 2px;
    background: #6795e5;
    border-radius: 0 2px 2px 0;
}

.tool-suggestion-name {
    display: block;
    overflow-wrap: anywhere;
    color: #e9eff6;
    font-size: .94rem;
    font-weight: 680;
    line-height: 1.45;
}

.tool-suggestion-meta {
    display: block;
    margin-top: 3px;
    color: #748295;
    font-size: .79rem;
    line-height: 1.4;
}

.tool-no-results {
    padding: 14px;
    color: #7e8b9b;
    font-size: .9rem;
}


/* =========================================================
   FIELD ERROR
   ========================================================= */

.tool-field-error {
    margin: 8px 0 0 42px;
    color: #ff8b96;
    font-size: .84rem;
}


/* =========================================================
   FORM ACTIONS
   ========================================================= */

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-size: .92rem;
    font-weight: 720;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.tool-button:focus-visible {
    outline: 2px solid #78a5f3;
    outline-offset: 3px;
}

.tool-button-primary {
    flex: 1 1 350px;
    color: #f7faff;
    background: #315fa9;
    border-color: #416fbb;
    box-shadow:
        0 8px 25px rgba(31, 76, 145, .20);
}

.tool-button-primary:not(:disabled):hover {
    background: #3869b8;
    border-color: #5480c8;
    box-shadow:
        0 10px 30px rgba(31, 76, 145, .28);
    transform: translateY(-1px);
}

.tool-button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.tool-button-primary:disabled {
    color: #697586;
    background: #18212b;
    border-color: #283340;
    box-shadow: none;
    cursor: not-allowed;
}

.tool-button-secondary {
    color: #c4cfdb;
    background: #121a24;
    border-color: #313d4c;
}

.tool-button-secondary:hover {
    color: #f3f6fa;
    background: #18222e;
    border-color: #465568;
}


/* =========================================================
   FORM ERROR
   ========================================================= */

.tool-error {
    margin-top: 18px;
    padding: 13px 15px;
    color: #ffc0c5;
    background: rgba(126, 36, 47, .16);
    border: 1px solid rgba(255, 100, 115, .35);
    border-radius: 9px;
    font-size: .9rem;
}


/* =========================================================
   RESULT BASE
   ========================================================= */

.tool-result {
    --result-accent: #6d9aea;
    --result-accent-rgb: 109, 154, 234;

    position: relative;
    width: min(960px, 100%);
    margin: 30px auto 0;
    padding: 30px;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            rgba(var(--result-accent-rgb), .045),
            transparent 220px
        ),
        #101720;
    border: 1px solid #2a3543;
    border-radius: 16px;
    box-shadow:
        0 25px 75px rgba(0, 0, 0, .25);
}

.tool-result::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--result-accent);
}

.tool-result-success {
    --result-accent: #43ca91;
    --result-accent-rgb: 67, 202, 145;
}

.tool-result-danger {
    --result-accent: #f16f7a;
    --result-accent-rgb: 241, 111, 122;
}

.tool-result-warning {
    --result-accent: #e9b758;
    --result-accent-rgb: 233, 183, 88;
}

.tool-result-info {
    --result-accent: #6d9aea;
    --result-accent-rgb: 109, 154, 234;
}


/* =========================================================
   RESULT HEADER
   ========================================================= */

.tool-result-header {
    max-width: 780px;
}

.tool-result-kicker {
    margin: 0 0 9px;
    color: #758396;
    font-size: .74rem;
    font-weight: 760;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.tool-result-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 10px;
    margin-bottom: 15px;
    color: var(--result-accent);
    background: rgba(var(--result-accent-rgb), .10);
    border: 1px solid rgba(var(--result-accent-rgb), .30);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.tool-result-status::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    font-size: .78rem;
    line-height: 1;
}

.tool-result-success .tool-result-status::before {
    content: "✓";
}

.tool-result-danger .tool-result-status::before {
    content: "×";
}

.tool-result-warning .tool-result-status::before {
    content: "!";
}

.tool-result-info .tool-result-status::before {
    content: "i";
}

.tool-result h2 {
    max-width: 760px;
    margin: 0;
    color: #f3f7fb;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.22;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.tool-result-summary {
    max-width: 760px;
    margin: 13px 0 0;
    color: #aeb9c6;
    line-height: 1.7;
}


/* =========================================================
   PRODUCT CARDS
   ========================================================= */

.tool-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.tool-product {
    min-width: 0;
    padding: 18px;
    background: #0c1219;
    border: 1px solid #27323f;
    border-radius: 11px;
}

.tool-product-type {
    margin: 0 0 7px;
    color: #78879a;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tool-product h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #edf3f9;
    font-size: 1rem;
    line-height: 1.45;
}

.tool-product-specs {
    display: grid;
    gap: 0;
    margin: 14px 0 0;
}

.tool-product-specs > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    border-top: 1px solid #202a35;
}

.tool-product-specs dt,
.tool-product-specs dd {
    margin: 0;
}

.tool-product-specs dt {
    color: #758294;
    font-size: .82rem;
}

.tool-product-specs dd {
    color: #cdd6e0;
    font-size: .84rem;
    font-weight: 650;
    text-align: right;
}


/* =========================================================
   RESULT CHECKS
   ========================================================= */

.tool-result-checks {
    margin-top: 22px;
    padding: 18px;
    background: #0c1219;
    border: 1px solid #27323f;
    border-radius: 11px;
}

.tool-result-checks h3,
.tool-details h3 {
    margin: 0 0 9px;
    color: #dfe6ed;
    font-size: .92rem;
}

.tool-checks {
    padding: 0;
    margin: 0;
    list-style: none;
}

.tool-checks li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #202a35;
}

.tool-checks li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.tool-check-label {
    color: #aeb8c5;
    font-size: .86rem;
    font-weight: 650;
}

.tool-check-label::before {
    display: inline-block;
    width: 20px;
    margin-right: 4px;
    font-weight: 900;
}

.tool-check-success::before {
    content: "✓";
    color: #48cf98;
}

.tool-check-danger::before {
    content: "×";
    color: #f1747e;
}

.tool-check-warning::before {
    content: "!";
    color: #e9b758;
}

.tool-check-info::before {
    content: "•";
    color: #78a5f3;
}

.tool-check-value {
    color: #edf2f7;
    font-size: .86rem;
    font-weight: 680;
    text-align: right;
}


/* =========================================================
   RESULT DETAILS
   ========================================================= */

.tool-details {
    margin-top: 14px;
    padding: 18px;
    background: #0c1219;
    border: 1px solid #27323f;
    border-radius: 11px;
}

.tool-detail-item {
    padding: 11px 0;
}

.tool-detail-item + .tool-detail-item {
    border-top: 1px solid #202a35;
}

.tool-detail-item:first-of-type {
    padding-top: 3px;
}

.tool-detail-item:last-child {
    padding-bottom: 2px;
}

.tool-detail-item strong {
    display: block;
    margin-bottom: 3px;
    color: #778698;
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.tool-detail-item p {
    margin: 0;
    color: #c7d0da;
    font-size: .88rem;
}

.tool-detail-item a {
    text-decoration: none;
}

.tool-detail-item a::after {
    content: " ↗";
    font-size: .8em;
}

.tool-detail-item a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* =========================================================
   RESULT ACTIONS
   ========================================================= */

.tool-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}


/* =========================================================
   INFO SECTIONS
   ========================================================= */

.tool-info,
.tool-faq,
.tool-guide-link {
    width: min(880px, 100%);
    margin-inline: auto;
}

.tool-info {
    margin-top: 44px;
    padding: 0 2px;
}

.tool-info + .tool-info {
    margin-top: 34px;
    padding-top: 34px;
    border-top: 1px solid #1f2934;
}

.tool-info h2,
.tool-faq h2,
.tool-guide-link h2 {
    margin: 0;
    color: #edf3f8;
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    line-height: 1.3;
    letter-spacing: -.015em;
}

.tool-info > p {
    max-width: 760px;
    margin: 13px 0 0;
    color: #95a2b1;
}

.tool-info ul {
    display: grid;
    gap: 9px;
    max-width: 760px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.tool-info li {
    position: relative;
    padding-left: 25px;
    color: #aeb9c5;
}

.tool-info li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: #5f8fdc;
    font-weight: 800;
}


/* =========================================================
   FAQ
   ========================================================= */

.tool-faq {
    margin-top: 46px;
    padding-top: 38px;
    border-top: 1px solid #1f2934;
}

.tool-faq h2 {
    margin-bottom: 18px;
}

.tool-faq details {
    background: #0f161f;
    border: 1px solid #26313e;
    border-radius: 10px;
    transition:
        background-color .15s ease,
        border-color .15s ease;
}

.tool-faq details + details {
    margin-top: 8px;
}

.tool-faq details:hover {
    border-color: #354355;
}

.tool-faq details[open] {
    background: #111a24;
    border-color: #37475b;
}

.tool-faq summary {
    position: relative;
    padding: 15px 48px 15px 16px;
    color: #dce4ec;
    font-size: .93rem;
    font-weight: 680;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
}

.tool-faq summary::-webkit-details-marker {
    display: none;
}

.tool-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    color: #7e96ba;
    font-size: 1.25rem;
    font-weight: 400;
}

.tool-faq details[open] summary::after {
    content: "−";
}

.tool-faq summary:focus-visible {
    outline: 2px solid #628fdc;
    outline-offset: -3px;
    border-radius: 9px;
}

.tool-faq details p {
    max-width: 760px;
    margin: 0;
    padding: 0 16px 16px;
    color: #929fac;
    font-size: .9rem;
}


/* =========================================================
   GUIDE CTA
   ========================================================= */

.tool-guide-link {
    position: relative;
    margin-top: 46px;
    padding: 24px 26px;
    overflow: hidden;
    background:
        linear-gradient(
            120deg,
            rgba(73, 115, 186, .10),
            transparent 60%
        ),
        #101821;
    border: 1px solid #2b3b50;
    border-radius: 13px;
}

.tool-guide-link::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #527dc4;
}

.tool-guide-link h2 {
    font-size: 1.15rem;
}

.tool-guide-link p {
    max-width: 700px;
    margin: 9px 0 0;
    color: #91a0b0;
    font-size: .9rem;
}


/* =========================================================
   GENERIC FOCUS
   ========================================================= */

.tool-page a:focus-visible {
    outline: 2px solid #78a5f3;
    outline-offset: 3px;
    border-radius: 3px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 780px) {

    .container {
        width: min(100% - 30px, 1120px);
    }

    .tool-page {
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .tool-header {
        margin-bottom: 26px;
    }

    .tool-search-card,
    .tool-result {
        padding: 23px;
        border-radius: 14px;
    }

    .tool-product-grid {
        grid-template-columns: 1fr;
    }

    .tool-info {
        margin-top: 38px;
    }

    .tool-faq,
    .tool-guide-link {
        margin-top: 38px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {

    body.tool-dark-page {
        font-size: 15px;
    }

    .container {
        width: calc(100% - 22px);
    }

    .tool-page {
        padding-top: 30px;
        padding-bottom: 48px;
    }

    .tool-header h1 {
        font-size: clamp(1.85rem, 10vw, 2.35rem);
    }

    .tool-intro {
        margin-top: 15px;
    }

    .tool-search-card,
    .tool-result {
        padding: 18px;
        border-radius: 12px;
    }

    .tool-section-header {
        margin-bottom: 23px;
    }

    .tool-grid {
        gap: 22px;
    }

    .tool-field-heading {
        gap: 10px;
    }

    .tool-step-number {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
        border-radius: 7px;
    }

    .tool-field-help {
        font-size: .8rem;
    }

    .tool-search-input {
        min-height: 52px;
        padding-left: 13px;
        font-size: 16px;
    }

    .tool-field-error {
        margin-left: 0;
    }

    .tool-actions,
    .tool-result-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tool-button {
        width: 100%;
    }

    .tool-button-primary {
        flex-basis: auto;
    }

    .tool-result {
        margin-top: 22px;
    }

    .tool-result-status {
        margin-bottom: 13px;
    }

    .tool-product-grid {
        gap: 9px;
        margin-top: 21px;
    }

    .tool-product,
    .tool-result-checks,
    .tool-details {
        padding: 15px;
    }

    .tool-product-specs > div {
        gap: 12px;
    }

    .tool-checks li {
        align-items: flex-start;
    }

    .tool-check-value {
        max-width: 50%;
        overflow-wrap: anywhere;
    }

    .tool-info {
        padding-inline: 1px;
    }

    .tool-info ul {
        gap: 11px;
    }

    .tool-guide-link {
        padding: 20px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}
/* =========================================================
   INTEGRAZIONE HEADER AVANZATO
   ========================================================= */

/* Ripristina la larghezza del contenitore del solo header.
   Restano validi i max-width responsive già presenti. */
header[role="banner"] > .container {
    width: 100%;
}

/* Classi usate dal nuovo header, assenti nel CSS del tool */
#navbarMain .d-none {
    display: none !important;
}

#navbarMain .d-flex {
    display: flex !important;
}

#navbarMain .w-100 {
    width: 100% !important;
}

#navbarMain .text-start {
    text-align: left !important;
}

#navbarMain .ms-2 {
    margin-left: .5rem !important;
}

#navbarMain .mt-2 {
    margin-top: .5rem !important;
}

#navbarMain .ps-3 {
    padding-left: 1rem !important;
}

/* Base dropdown */
#navbarMain .dropdown {
    position: relative;
}

#navbarMain .dropdown-toggle {
    white-space: nowrap;
}

#navbarMain button.nav-link {
    cursor: pointer;
}

#navbarMain .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    margin: .125rem 0 0;
    padding: .5rem 0;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    list-style: none;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(145deg, #131517, #0039a1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}

#navbarMain .dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Link dei sottomenu, desktop e mobile */
#navbarMain .dropdown-item {
    display: block;
    width: 100%;
    padding: .55rem .9rem;
    color: rgb(206 228 255 / 92%);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-weight: 400;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color .15s ease,
        color .15s ease,
        box-shadow .15s ease;
}

#navbarMain .dropdown-item:hover,
#navbarMain .dropdown-item:focus,
#navbarMain .dropdown-item:active {
    color: #fff;
    background-color: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 11px 3px rgba(255, 255, 255, .06);
    outline: none;
}

#navbarMain .dropdown-item:focus-visible {
    outline: 2px solid #ffd24d;
    outline-offset: 2px;
}

#navbarMain .dropdown-divider {
    height: 0;
    margin: .5rem 0;
    overflow: hidden;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .175);
    opacity: 1;
}

/* Desktop */
@media (min-width: 992px) {

    #navbarMain .d-lg-flex {
        display: flex !important;
    }

    #navbarMain .mx-lg-auto {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    #navbarMain .navbar-nav.d-lg-flex {
        white-space: nowrap;
    }

    /* Allinea a destra gli ultimi due sottomenu,
       per evitare che sporgano dal bordo dello schermo. */
    #navbarMain .dropdown:nth-last-child(-n + 2) > .dropdown-menu {
        right: 0;
        left: auto;
    }

}

/* Mobile */
@media (max-width: 991.98px) {

    #mobileNav .list-unstyled {
        margin-top: 0;
    }

    #mobileNav .dropdown-item {
        color: #ffffff;
        white-space: normal;
        overflow-wrap: break-word;
    }

}