/* Definizione font Inter locale */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/inter/Inter-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

:root {
    --primary-color: #d53f8c;
    --primary-light: #ed64a6;
    --primary-dark: #97266d;
    --bg-light: #ffffff;
    --text-light: #1a202c;
    --bg-dark: #1a202c;
    --text-dark: #f7fafc;
    --gray-light: #e2e8f0;
    --gray-dark: #2d3748;
    --success: #218838;
    --warning: #ed8936;
    --danger: #e53e3e;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --negative-color: #e53e3e;
}

:root.dark-mode {
    /* Colori primari - più luminosi in dark mode per miglior contrasto */
    --primary-color: #f472b6;    /* Rosa più luminoso per miglior contrasto su sfondo scuro */
    --primary-light: #fb8dc9;    /* Rosa ancora più chiaro per hover/accenti */
    --primary-dark: #d53f8c;     /* Rosa medio-scuro ma ancora ben visibile */

    /* Sfondi e testo - contrasto netto */
    --bg-light: #222836;         /* Sfondo scuro ma non totalmente nero */
    --text-light: #f8fafc;       /* Testo quasi bianco per leggibilità */
    --bg-dark: #151a24;          /* Sfondo ancora più scuro per elementi in contrasto */
    --text-dark: #ffffff;        /* Testo bianco puro per massima leggibilità */

    /* Grigi - ricalibrati per la dark mode */
    --gray-light: #4a5568;       /* Grigio chiaro ma visibile su sfondo scuro */
    --gray-dark: #1e2330;        /* Grigio scuro ben differenziato dallo sfondo */

    /* Colori semantici - più luminosi per visibilità */
    --success: #48bb78;          /* Verde più luminoso per leggibilità */
    --warning: #ffad33;          /* Arancione più luminoso */
    --danger: #ff5252;           /* Rosso più luminoso */
    --negative-color: #ff5252;   /* Mantenuto coerente con danger */

    /* Effetti - intensificati per visibilità */
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);  /* Ombra più profonda */
    --border-radius: 8px;        /* Invariato */
    --transition: all 0.3s ease; /* Invariato */

    /* Aggiunta di variabili specifiche per dark mode */
    --border-color-dark: #3a4052;      /* Colore bordi visibile su sfondo scuro */
    --hover-bg-dark: #2d3748;          /* Sfondo hover più chiaro dello sfondo base */
    --primary-color-rgb: 244, 114, 182; /* RGB del colore primario per usi con opacity */
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden; /* Previene lo scroll orizzontale */
    width: 100%;
    position: relative;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

/* Stili per gli elementi del changelog cliccabili */
.clickable-change {
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 2px 5px;
    border-radius: 3px;
    position: relative;
}

.clickable-change:hover {
    background-color: rgba(0,0,0,0.05);
}

.dark-mode .clickable-change:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Piccola icona link per indicare cliccabilità */
.clickable-change::after {
    content: "\f0c1"; /* Icona link da Font Awesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.8em;
    opacity: 0;
    margin-left: 5px;
    transition: opacity 0.2s;
}

.clickable-change:hover::after {
    opacity: 0.5;
}

/* Stili per il widget del changelog */
.changelog-widget {
    max-width: 100%;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fff;
}

.dark-mode .changelog-widget {
    background-color: #2d333b;
    border-color: #444c56;
}

.changelog-widget h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.dark-mode .changelog-widget h3 {
    border-color: #444c56;
}

.widget-item {
    display: flex;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.widget-item:last-child {
    border-bottom: none;
}

.dark-mode .widget-item {
    border-color: #383d44;
}

.widget-item:hover {
    background-color: #f6f8fa;
}

.dark-mode .widget-item:hover {
    background-color: #373e47;
}

.widget-date {
    min-width: 80px;
    font-size: 12px;
    color: #586069;
}

.dark-mode .widget-date {
    color: #8b949e;
}

.widget-message {
    font-size: 14px;
    color: #24292e;
    flex: 1;
}

.dark-mode .widget-message {
    color: #c9d1d9;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #0366d6;
    text-decoration: none;
    padding: 5px;
    border-radius: 3px;
}

.view-all-link:hover {
    background-color: #f0f6fc;
    text-decoration: none;
}

.dark-mode .view-all-link {
    color: #58a6ff;
}

.dark-mode .view-all-link:hover {
    background-color: #2d3741;
}

.widget-error {
    padding: 15px;
    text-align: center;
    color: #cb2431;
    font-style: italic;
}

.dark-mode .widget-error {
    color: #f85149;
}

.moz-reader-content img {
  height: 25px;
  padding-right: 0.5em;
}

@media screen and (max-width: 768px) {
    header {
        position: sticky;
        top: 0;
        background: #fff; /* o altro colore */
        z-index: 999;
    }

    html.dark-mode header {
        background: var(--bg-dark);
    }

    header.mobile-scrolled {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 8px 12px;
    }

    html.dark-mode header.mobile-scrolled {
        box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    }

    header.mobile-scrolled .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }

    header.mobile-scrolled .logo {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    header.mobile-scrolled .logo img {
        width: 36px;
        height: auto;
    }

    header.mobile-scrolled .logo-text,
    header.mobile-scrolled .theme-toggle {
        display: none !important;
    }

    header.mobile-scrolled .search-container {
        margin: 0;
        padding: 0;
        flex-grow: 1;
    }

    header.mobile-scrolled .search-input-wrapper {
        display: flex;
        align-items: center;
        background: #f4f4f4;
        border-radius: 4px;
        padding: 6px 8px;
    }

    html.dark-mode header.mobile-scrolled .search-input-wrapper {
        background: var(--gray-dark);
    }

    header.mobile-scrolled .search-input-wrapper input {
        border: none;
        background: transparent;
        padding: 4px 6px;
        font-size: 14px;
        width: 100%;
    }

    html.dark-mode header.mobile-scrolled .search-input-wrapper input {
        color: var(--text-dark);
    }

    header.mobile-scrolled .search-icon {
        margin-right: 6px;
    }

    /* Nasconde eventuali riquadri extra */
    .search-results {
        top: 100%;
    }
}

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

html.dark-mode a {
    color: var(--primary-light);
}

a:hover {
    color: var(--primary-dark);
}

html.dark-mode a:hover {
    color: var(--primary-light);
}

.protocol-header .meta-icons {
    margin-top: 5px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.protocol-header .meta-icon {
    background-color: white;
    color: var(--primary-color);
}

html.dark-mode .protocol-header .meta-icon {
    background-color: var(--gray-dark);
    color: var(--primary-light);
}

.protocol-header .alternative-logo,
.server-card .alternative-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    vertical-align: middle;
}


#scroll-to-top {
    position: fixed;
    bottom: 4rem;
    right: 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#scroll-to-top:hover {
    transform: translateY(-4px);
}

html.dark-mode #scroll-to-top {
    background: var(--primary-dark);
}

/* Contenitore logo + testo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

/* Dimensioni del logo */
.logo img {
    width: 80px;   /* non troppo grande */
    height: auto;
    object-fit: contain;
}

/* Reset margini interni */
.logo-text h1,
.logo-text p {
    margin: 0;
}

/* Allinea il testo (facoltativo) */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive: su schermi piccoli, impila verticalmente */
@media (max-width: 600px) {
    .logo {
        flex-direction: column;
        text-align: center;
    }
    .logo img {
        width: 64px; /* leggermente più grande su mobile */
        margin-bottom: 0.5rem;
    }
    .logo h1 {
        font-size: 1.2rem !important;
    }
}


/* Sticky layout */
.sticky-header {
    background: var(--bg-light);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

html.dark-mode .sticky-header {
    background-color: var(--bg-dark);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

/* Nasconde il paragrafo e riduce titolo quando compatto */
.sticky-header.compact .logo-description {
    display: none;
}

.sticky-header.compact h1 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Aggiusta i padding per compattezza */
.sticky-header.compact {
    padding: 0.3rem 0;
}

.custom-tooltip {
    position: absolute;
    bottom: 100%;
    left: 80%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    max-width: 200px;
}

html.dark-mode .custom-tooltip {
    background: rgba(255, 255, 255, 0.85);
    color: var(--bg-dark);
}

.meta-icon {
    position: relative; /* per il tooltip */
    cursor: pointer;
}

.custom-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}


.meta-emphasis-highlight {
    background-color: var(--success) !important;
    color: #fff;
    border-radius: 6px;
    position: relative;
}

html.dark-mode .meta-emphasis-highlight {
    background-color: var(--success) !important;
	color: #000;
}

.meta-emphasis-highlight a{
    color: #fff !important; 
    text-decoration: underline;
}

.meta-emphasis-bad {
    /* colore o effetto negativo */
    border: 2px solid var(--warning);
}

html.dark-mode .meta-emphasis-bad {
    border-color: #fa9c4a;
}

.meta-emphasis-bad::after {
    content: '!';
    width: 12px;
    height: 12px;
    position: absolute;
    top: -4px;
    right: -4px;
    color: #fff;
    background-color: var(--warning);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    display: flex;
    font-size: 0.8em;
}

html.dark-mode .meta-emphasis-bad::after {
    background-color: #fa9c4a;
}

.meta-emphasis-highlight::after {
    content: '✓';
    width: 12px;
    height: 12px;
    position: absolute;
    top: -3px;
    right: -3px;
    color: #fff;
    background-color: var(--success);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    display: flex;
    font-size: 0.8em;
}

html.dark-mode .meta-emphasis-highlight::after {
    background-color: var(--success);
	color: #000;
}

.meta-icon img.os-icon {
    width: 20px;
    height: 20px;
    margin-left: 4px;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
    vertical-align: middle;
}

.meta-icon img.os-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.meta-icon img.os-icon[src$="windows.svg"] {
    width: 17px;
    height: 17px;
}

html.dark-mode .os-icon[src$="apple.svg"] {
    filter: brightness(0) invert(1);
}


.pagamenti-icons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 6px;
    z-index: 2;
    color: var(--primary-dark);
}

html.dark-mode .pagamenti-icons {
    color: var(--primary-light);
}

.icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.85;
}

/* Esempi */
.icon.gratis   { background-image: url('icons/free.svg'); }
.icon.euro     { background-image: url('icons/euro.svg'); }
.icon.bitcoin  { background-image: url('icons/bitcoin.svg'); }
.icon.monero   { background-image: url('icons/monero.svg'); }
.icon.cash     { background-image: url('icons/cash.svg'); }

html.dark-mode .icon {
    filter: brightness(0.9) invert(0.8);
}

body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.meta-icon.meta-emphasis-highlight i {
    color: white !important;
}

html.dark-mode .meta-icon.meta-emphasis-highlight i {
    color: #000 !important;
}

/* Stile per icone meta cliccabili */
.meta-icon-link {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.08);
    position: relative;
    padding-right: 1.5rem !important;
}

html.dark-mode .meta-icon-link {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Stile per container di più bandiere */
.flags-container {
    display: inline-flex;
    align-items: center;
    margin-right: 0.25rem;
}

.flags-container .country-flag {
    width: 18px; /* Leggermente più piccole */
    height: 13.5px;
    margin-right: 0; /* Rimuoviamo il margine destro standard */
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html.dark-mode .flags-container .country-flag {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sovrapposizione parziale per stile a "stack" */
.flags-container .country-flag:not(:first-child) {
    margin-left: -5px;
    box-shadow: -2px 0 3px rgba(0, 0, 0, 0.1);
}

html.dark-mode .flags-container .country-flag:not(:first-child) {
    box-shadow: -2px 0 3px rgba(0, 0, 0, 0.4);
}

/* Effetto hover su ogni bandiera */
.flags-container .country-flag:hover {
    transform: translateY(-2px);
    z-index: 2;
}

.meta-icon-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-1px);
}

html.dark-mode .meta-icon-link:hover {
    background-color: rgba(237, 100, 166, 0.2);
}

.meta-icon-link a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Piccola icona link per indicare che è cliccabile */
.meta-icon-link::after {
    content: "\f0c1"; /* Unicode per l'icona link di FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.7rem;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.meta-icon-link:hover::after {
    opacity: 1;
}

.country-flag {
    width: 20px;
    height: 15px; /* Mantieni proporzione 4:3 */
    vertical-align: middle;
    margin-right: 0.25rem;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.08);
    background-color: #f8f8f8;  /* Sfondo leggero per SVG con trasparenza */
}

html.dark-mode .country-flag {
    border-color: rgba(255,255,255,0.08);
    background-color: #2d3748;
}

/* Stile per le alternative nascoste */
.hidden-alternative {
    display: none;
}

/* Animazione per le alternative rivelate */
.revealed-alternative {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stile per i download alternativi */
.alternative-downloads {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
}

html.dark-mode .alternative-downloads {
    border-color: rgba(255, 255, 255, 0.1);
}

.downloads-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

html.dark-mode .downloads-title {
    color: var(--primary-light);
}

.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.download-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.50rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

html.dark-mode .download-link {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-dark);
}

.download-link:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-1px);
}

.download-link i {
    margin-right: 0.35rem;
    font-size: 0.8rem;
}

/* Stile base per il logo di Le Alternative */
.lealternative-logo {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 0.35rem;
}

/* Light mode normale: logo nero */
.download-link .lealternative-logo {
    content: url('../images/logos/logo-lealternative-black.svg');
}

/* Light mode hover: logo bianco */
.download-link:hover .lealternative-logo {
    content: url('../images/logos/logo-lealternative-p.svg');
}

/* Dark mode normale: logo bianco */
html.dark-mode .download-link .lealternative-logo {
    content: url('../images/logos/logo-lealternative-black.svg');
}

/* Dark mode hover: logo rosa */
html.dark-mode .download-link:hover .lealternative-logo {
    content: url('../images/logos/logo-lealternative-p.svg');
}

/* Contenitore del pulsante "Mostra altro" */
.show-more-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

/* Pulsante "Mostra altro/meno" */
.show-more-button {
    background-color: var(--primary-light);
    color: white;
    border: none;
    border-radius: 50px; /* Più arrotondato per differenziarlo */
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.show-more-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.show-more-button i {
    font-size: 0.8rem;
}

/* Stile per il pulsante in modalità "Mostra meno" */
.show-more-button.show-less {
    background-color: var(--gray-dark);
}

/* Stile dark mode */
html.dark-mode .show-more-button {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

html.dark-mode .show-more-button.show-less {
    background-color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box; /* Importante: include padding nella width */
}

.name-meta-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.name-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.official-link {
    color: var(--primary-color);
    font-size: 0.85rem;
    opacity: 0.7;
    transition: var(--transition);
}

.official-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

html.dark-mode .official-link {
    color: var(--primary-light);
}

/* Header */
header {
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

html.dark-mode header {
    background-color: var(--bg-dark);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

html.dark-mode .logo h1 {
    color: var(--primary-light);
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.theme-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1.25rem;
}

/* 1) Nasconde entrambe le icone di default */
.sun-icon,
.moon-icon {
    display: none !important;
}

/* 2) Mostra solo la 🌙 in light-mode */
html.light-mode .moon-icon {
    display: inline-block !important;
}

/* 3) Mostra solo il ☀️ in dark-mode */
html.dark-mode .sun-icon {
    display: inline-block !important;
}


.search-container {
    margin: 1.5rem auto 0;
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
    opacity: 0.6;
}

html.dark-mode .search-icon {
    color: var(--gray-light);
}

#search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
    font-size: 1rem;
    transition: var(--transition);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(213, 63, 140, 0.2);
}

html.dark-mode #search-input {
    background-color: var(--gray-dark);
    border-color: var(--gray-dark);
    color: var(--text-dark);
}

html.dark-mode #search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(237, 100, 166, 0.3);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-light);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--card-shadow);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

html.dark-mode .search-results {
    background: var(--gray-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
}

html.dark-mode .search-result-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.search-result-item:hover {
    background-color: rgba(213, 63, 140, 0.1);
}

html.dark-mode .search-result-item:hover {
    background-color: rgba(237, 100, 166, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* CATEGORIE */

/* Modifica il CSS della navbar delle categorie */
.category-nav {
    margin: 2rem auto;
    padding-top: 210px;
}

@media (max-width: 600px) {
    .category-nav {
        padding-top: 375px;
    }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* Nuovo stile nordico per i box */
.category-box {
    background-color: #ffffff; /* Sfondo bianco */
    color: var(--primary-color); /* Testo nel colore primario */
    border-radius: 8px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0; /* Bordo sottile e discreto */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); /* Ombra leggera */
}

html.dark-mode .category-box {
    background-color: var(--bg-dark);
    color: var(--primary-light);
    border-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.category-box i {
    font-size: 1.5rem;
    display: inline-block;
    color: var(--primary-color); /* Icone nel colore primario */
}

html.dark-mode .category-box i {
    color: var(--primary-light);
}

.secondary-icon {
    font-size: 0.9rem !important;
    margin-left: 0.3rem;
    margin-bottom: 0.3rem;
    opacity: 0.7; /* Leggermente più trasparente della principale */
}

.category-box span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color); /* Testo nel colore primario */
}

html.dark-mode .category-box span {
    color: var(--primary-light);
}

/* Effetto hover più sottile */
.category-box:hover {
    background-color: #f9f9f9; /* Leggermente più scuro su hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Ombra più pronunciata su hover */
    border-color: var(--primary-light); /* Bordo colorato su hover */
}

html.dark-mode .category-box:hover {
    background-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

/* Aggiungi queste proprietà alla classe header esistente */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    background: var(--bg-light);
}

html.dark-mode header {
    background: var(--bg-dark);
}

/* Focus sul box attivo */
.category-box.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1); /* Effetto glow sottile */
}

html.dark-mode .category-box.active {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(237, 100, 166, 0.3);
}

@media (max-width: 600px) {
    .category-box {
        padding: 0.8rem 0.3rem;
    }

    .category-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }  

    .category-box i {
        font-size: 1.2rem;
    }

    .secondary-icon {
        font-size: 0.7rem !important;
    }

    .category-box span {
        font-size: 0.75rem;
    }
}

/* Legenda */
.legend-section {
    background-color: rgba(213, 63, 140, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

html.dark-mode .legend-section {
    background-color: rgba(237, 100, 166, 0.05);
}

.legend-title {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

html.dark-mode .legend-title {
    color: var(--primary-light);
}

.legend-title-high {
    color: var(--primary-color);
    font-size: 0.8rem;
}

html.dark-mode .legend-title-high {
    color: var(--primary-light);
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.8em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
    cursor: help;
}

.legend-icon {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

html.dark-mode .legend-icon {
    color: var(--primary-light);
}

/* Changelog più compatto */
.changelog-summary {
    background: var(--primary-light);
    color: white;
    padding: 0.75rem; /* Ridotto da 1.5rem */
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.85rem; /* Testo più piccolo */
    max-width: 100%; /* Assicura che si adatti al layout */
}

html.dark-mode .changelog-summary {
    background: var(--primary-dark);
}

.changelog-summary h2 {
    margin-bottom: 0.5rem; /* Ridotto da 1rem */
    font-size: 1.1rem; /* Titolo più piccolo */
}

#recent-changes {
    margin-bottom: 0.75rem; /* Ridotto da 1.5rem */
    line-height: 1.4; /* Righe più ravvicinate */
}

.change-item {
    padding: 0.25rem 0; /* Ridotto da 0.75rem */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.change-date {
    font-size: 0.8rem; /* Data più piccola */
    opacity: 0.9;
}

.btn {
    padding: 0.4rem 0.75rem; /* Pulsante più piccolo */
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

html.dark-mode .btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#recent-changes {
    display: none; /* Nascosto di default */
}

#recent-changes.active {
    display: block;
}

.changelog-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

html.dark-mode .btn:hover {
    background-color: #ffffff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

html.dark-mode .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 800px;
    box-shadow: var(--card-shadow);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

html.dark-mode .modal-content {
    background-color: var(--gray-dark);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    opacity: 0.7;
}

html.dark-mode .close {
    color: var(--text-dark);
}

.close:hover {
    opacity: 1;
}

/* Contenuto principale */
.content {
    margin-bottom: 3rem;
}

/* Sezione categoria */
.category-section {
    margin-bottom: 3rem;
    scroll-margin-top: 120px; /* Per lo scroll alle ancore */
}

.category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

html.dark-mode .category-header {
    border-bottom: 2px solid var(--primary-light);
}

.category-header h2 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

html.dark-mode .category-header h2 {
    color: var(--primary-dark);
}

.category-header h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

html.dark-mode .category-header h3 {
    color: var(--primary-dark);
}

.category-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.category-header p a {
    color: var(--primary-color);
    text-decoration: none;
}

html.dark-mode .category-header p a {
    color: var(--primary-light);
}

.category-header p a:hover {
    text-decoration: underline;
}

/* Griglia alternative */
.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Carta alternativa */
.alternative-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: visible;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

html.dark-mode .alternative-card {
    background-color: var(--gray-dark);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.alternative-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

html.dark-mode .alternative-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.4);
}

.alternative-header {
    position: relative;
    padding: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--gray-light);
    background-color: rgba(213, 63, 140, 0.05);
}

html.dark-mode .alternative-header {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(237, 100, 166, 0.1);
}

.alternative-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 1rem;
    border-radius: 8px;
}

.alternative-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
}

html.dark-mode .alternative-name {
    color: var(--primary-light);
}

.alternative-content {
    padding: 1rem;
}

.alternative-description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.alternative-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pros, .cons {
    background-color: rgba(72, 187, 120, 0.1);
    padding: 0.75rem;
    border-radius: var(--border-radius);
}

.cons {
    background-color: rgba(229, 62, 62, 0.1);
}

html.dark-mode .pros {
    background-color: rgba(72, 187, 120, 0.2);
}

html.dark-mode .cons {
    background-color: rgba(229, 62, 62, 0.2);
}

.pros h4, .cons h4 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--success);
}

.cons h4 {
    color: var(--danger);
}

html.dark-mode .pros h4 {
    color: #4ece7c;
}

html.dark-mode .cons h4 {
    color: #ff6b6b;
}

.pros h4::before, .cons h4::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.pros h4::before {
    content: "\f00c";
}

.cons h4::before {
    content: "\f00d";
}

.pros ul, .cons ul {
    padding-left: 1.5rem;
    font-size: 0.8rem;
    margin: 0;
}

.meta-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
    margin-top: 1rem;
}

html.dark-mode .meta-icons {
    border-color: rgba(255, 255, 255, 0.1);
}

.meta-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    cursor: help;
}

html.dark-mode .meta-icon {
    background-color: rgba(255, 255, 255, 0.05);
}

.meta-icon i {
    width: 14px;
    margin-right: 0.25rem;
    color: var(--primary-color);
}

html.dark-mode .meta-icon i {
    color: var(--primary-light);
}

/* Sezioni speciali (come Matrix) */
.protocol-section {
    margin-bottom: 2rem;
}

.protocol-header {
    background: var(--primary-light);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

html.dark-mode .protocol-header {
    background: var(--primary-dark);
}

html.dark-mode body.dark-mode main.container div#content.content section#chatfederate.category-section div.protocol-section div.protocol-header p a{
    text-decoration: underline;
    color: white;
}

.protocol-header h3 {
    margin-bottom: 0.5rem;
}

.protocol-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.servers-section h4, .clients-section > h4:nth-child(1) {
    color: white;
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.2rem;
    background: var(--primary-dark);
    padding-left: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

html.dark-mode .servers-section h4, 
html.dark-mode .clients-section > h4:nth-child(1) {
    background: var(--primary-color);
}

.protocol-compact-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

html.dark-mode .protocol-compact-card {
    border: 1px solid #3a3a3a;
    background: var(--gray-dark);
}

.protocol-compact-header {
    display: flex;
    align-items: flex-start; /* prima era center */
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.protocol-compact-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* <-- aggiunto */
    gap: 0.2rem;
    margin-top: -5px; /* <-- piccolo trucco per mobile */
}


.protocol-compact-logo {
    width: 40px;
    height: 40px;
}

.protocol-compact-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
	margin-top: 1rem;
}

.protocol-details-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

html.dark-mode .protocol-details-container {
    border-top: 1px dashed #3a3a3a;
}

.protocol-subblock {
    margin-bottom: 1rem;
}

.compact-item {
    background: #f9f9f9;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

html.dark-mode .compact-item {
    background: #2a2a2a;
}

.compact-item strong {
    font-size: 1rem;
}

.compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
    font-size: 0.75rem;
}

.mini-description {
    font-size: 0.85rem;
    margin-bottom: 0.5rem; 
    margin: 0.2rem 0;
}

.mini-meta .meta-icon {
    font-size: 0.75rem;
}

.mini-meta {
    margin-top: 0; /* Rimuovi margin-top predefinito sui meta */
    margin-bottom: 0.5rem; /* Spazio dopo i meta */
}

.protocol-subblock h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #c44a87; /* un rosa/rosato */
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid #c44a87; /* sottolineatura più visibile */
    padding-bottom: 0.3rem;
    letter-spacing: 0.5px; /* un pizzico di spazio tra le lettere */
}

html.dark-mode .protocol-subblock h4 {
    color: var(--primary-light);
    border-bottom: 2px solid var(--primary-light);
}

.external-link-icon {
    font-size: 0.8rem;
    margin-left: 4px;
}

.compact-item-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.3rem;
}

.protocol-meta {
    margin-top: 0.5rem;
    width: 100%; /* così prende tutta la larghezza disponibile sotto */
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-start; /* se vuoi partire a sinistra */
}


.name-meta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* se vuoi centrato usa center */
    flex-grow: 1;
    margin-left: 1rem;
}

.protocol-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    justify-content: flex-start;
    width: 100%;
}

.topline {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ⬅️ Questa è la chiave */
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alternative-logo {
    width: 40px;
    height: auto;
}

.protocol-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.topline .alternative-name {
    margin: 0; /* Evita margini strani */
    text-align: left;
}

.protocol-header-2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 👈 👈 👈 così tutto parte a sinistra */
}

/* Modifica la gestione degli header */
header, 
.mobile-mini-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Importante: non usare width maggiori di 100% */
    z-index: 200;
    box-sizing: border-box; /* Assicura che padding non aumenti la larghezza */
}

/* Aggiungi queste proprietà alla classe .mobile-mini-header */
.mobile-mini-header {
    display: none;
    position: fixed; /* Cambiato da sticky a fixed */
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-light);
    z-index: 200;
    padding: 0.5rem;
    box-sizing: border-box;  
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html.dark-mode .mobile-mini-header {
    background: var(--bg-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Assicurati che anche su mobile gli elementi non siano troppo larghi */
@media (max-width: 600px) {
    .mobile-mini-header, 
    header, 
    .container,
    .search-container,
    .search-input-wrapper,
    #search-input,
    .mobile-mini-search-wrapper,
    .mobile-mini-search-wrapper .search-input-wrapper {
        max-width: 100vw;
        box-sizing: border-box;
    }
}

.mobile-mini-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
}

.mobile-logo-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-logo {
    height: 28px;
}

.mini-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

html.dark-mode .mini-title {
    color: var(--primary-light);
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--primary-light);
    cursor: pointer;
}

html.dark-mode .hamburger-btn {
    color: var(--primary-light);
}

.mobile-mini-search-wrapper {
    margin-top: 0.6rem;
    text-align: center;
}

.mobile-mini-search-wrapper .search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--primary-light);
    border-radius: 30px;
    padding: 0.4rem 0.8rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

html.dark-mode .mobile-mini-search-wrapper .search-input-wrapper {
    background: var(--gray-dark);
    border: 1px solid var(--primary-light);
}

.mobile-mini-search-wrapper .search-input-wrapper i {
    font-size: 1rem;
    color: var(--primary-light);
}

.mobile-mini-search-wrapper .search-input-wrapper input {
    flex: 1; /* ← prende tutto lo spazio disponibile accanto alla lente */
    border: none;
    outline: none;
    background: transparent;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

html.dark-mode .mobile-mini-search-wrapper .search-input-wrapper input {
    color: var(--text-dark);
}

.mobile-mini-search-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

#mobile-menu {
    background: var(--bg-light);
    border-top: 1px solid var(--gray-light);
    max-height: 70vh; /* Limita l'altezza al 70% della viewport */
    overflow-y: auto; /* Permette lo scrolling */
    padding: 0.75rem;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Due colonne di default */
    gap: 0.75rem;
}

.mobile-category-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-category-item:hover {
    background: rgba(0,0,0,0.08);
}

.mobile-icon-container {
    position: relative;
    margin-right: 0.75rem;
}

.mobile-category-item i {
    color: var(--primary-color);
}

.mobile-secondary-icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.7em;
}

/* Una colonna su schermi molto piccoli */
@media (max-width: 550px) {
    .mobile-menu-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

html.dark-mode #mobile-menu {
    background: var(--bg-dark);
    border-top: 1px solid var(--primary-dark);
}

.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.mobile-categories .category-pill {
    background: var(--primary-light);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
}

.mobile-categories .category-pill:hover {
    background: var(--primary-dark);
}

.hidden {
    display: none;
}

/* Two-column layout for server and client sections on desktop */
@media screen and (min-width: 768px) {
    /* Apply grid layout only to the protocol-subblock containers */
    .protocol-subblock {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Make the section heading span both columns */
    .protocol-subblock > h4 {
        grid-column: 1 / -1;
        margin-bottom: 0.75rem;
    }

    /* Make each compact-item fill its grid cell */
    .compact-item {
        height: 100%;
/*        display: flex;*/
        flex-direction: column;
    }

    /* Keep the description taking natural space */
    .mini-description {
        margin: 0.5rem 0;
    }

    /* Push meta information to the bottom */
    .mini-meta {
        margin-top: auto;
    }
}

/* Return to single column on smaller screens (already default behavior) */
@media screen and (max-width: 767px) {
    .protocol-subblock {
        display: block;
    }

    .compact-item {
        margin-bottom: 0.5rem;
    }
}

/* Layout a 4 colonne per le easy alternatives */
.easy-alternatives-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 1 colonna su mobile */
    gap: 1rem;
}

/* Tablet: 2 colonne */
@media screen and (min-width: 600px) {
    .easy-alternatives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 colonne */
@media screen and (min-width: 992px) {
    .easy-alternatives-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Stile specifico per le easy cards */
.easy-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
    height: 100%; /* Per allineare le carte di altezze diverse */
    display: flex;
    flex-direction: column;
}

html.dark-mode .easy-card {
    background-color: var(--gray-dark);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.easy-card-content {
    display: flex;
    flex-direction: column;
/*    flex: 1 0 auto;*/
}

.easy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

html.dark-mode .easy-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

/* Stile del contenuto */
.easy-card .mini-description {
    font-size: 0.85rem;
    margin: 0.5rem 0;
    flex-grow: 1; /* Spinge i meta in basso */
}

.easy-card .mini-meta {
    margin-top: auto; /* Spinto in basso */
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.easy-card .meta-icon {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

/* Stili per i risultati di ricerca "alternative a" */
.search-result-alternative {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
    position: relative;
}

html.dark-mode .search-result-alternative {
    background-color: rgba(237, 100, 166, 0.1);
    border-left-color: var(--primary-light);
    border-right-color: var(--primary-light);
}

.search-result-alternative:hover {
    background-color: var(--primary-light);
    color: white;
}

html.dark-mode .search-result-alternative:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Stili per l'icona exchange */
.search-alternative-icon {
    margin-right: 8px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

html.dark-mode .search-alternative-icon {
    color: var(--primary-light);
}

/* Icona diventa bianca on hover */
.search-result-alternative:hover .search-alternative-icon {
    color: white !important;
}

/* Animazione leggera per i risultati alternativi */
@keyframes highlightAlternative {
    from {
        background-color: rgba(var(--primary-color-rgb), 0.2);
    }
    to {
        background-color: rgba(var(--primary-color-rgb), 0.05);
    }
}

.search-result-alternative {
    animation: highlightAlternative 0.5s ease-out;
}