/* HSDD Single — Cover */

/* ── Header trasparente ── */

.hsdd-single--transparent-header #header {
    position: absolute !important;
    width: 100%;
    z-index: 100;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.hsdd-single--transparent-header #header_main {
    background: transparent !important;
}

.hsdd-single--transparent-header .main_menu .av-main-nav > li > a {
    color: #fff !important;
}

.hsdd-single--transparent-header #logo img {
    filter: brightness(0) invert(1);
}

.hsdd-single--transparent-header .av-hamburger-inner,
.hsdd-single--transparent-header .av-hamburger-inner::before,
.hsdd-single--transparent-header .av-hamburger-inner::after {
    background: #fff !important;
}

/* ── Cover Hero ── */

.hsdd-single__cover-hero {
    position: relative;
    width: 100%;
    min-height: 70vh;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
}

.hsdd-single--hero-small .hsdd-single__cover-hero { min-height: 50vh; }
.hsdd-single--hero-medium .hsdd-single__cover-hero { min-height: 70vh; }
.hsdd-single--hero-large .hsdd-single__cover-hero { min-height: 100vh; }

.hsdd-single__cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
}

.hsdd-single__cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.3) 100%);
}

/* ── Inner container — aligned to Enfold .container ── */

.hsdd-single__cover-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--hsdd-container-width, 1210px);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top — category label */

.hsdd-single__cover-top {
    padding-top: 36px;
}

.hsdd-single__cover-hero .hsdd-single__cat {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 3px;
}

/* Bottom — meta + title */

.hsdd-single__cover-bottom {
    padding-bottom: 36px;
    margin-top: auto;
}

.hsdd-single__cover-hero .hsdd-single__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hsdd-single__cover-hero .hsdd-single__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.3);
    background-color: #f9f9f9;
}

.hsdd-single__cover-hero .hsdd-single__meta-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hsdd-single__cover-hero .hsdd-single__author {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1em;
    color: #fff;
}

.hsdd-single__cover-hero .hsdd-single__meta-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hsdd-single__cover-hero .hsdd-single__meta-sep {
    opacity: .5;
    color: rgba(255,255,255,.5);
}

.hsdd-single__cover-hero .hsdd-single__reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.7);
}

.hsdd-single__cover-hero .hsdd-single__reading-time svg {
    flex-shrink: 0;
    opacity: .6;
}

.hsdd-single__cover-hero .hsdd-single__title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    color: #fff;
    letter-spacing: -0.02em;
}

/* ── Layout with sidebar ── */

.hsdd-single__layout {
    display: flex;
    gap: 40px;
    position: relative;
}

.hsdd-single__layout .hsdd-single__sidebar {
    flex: 0 0 280px;
    align-self: flex-start;
    will-change: transform;
}

.hsdd-single__layout .hsdd-single__article-body {
    flex: 1;
    min-width: 0;
}

/* ── Article body (inside container) ── */

.hsdd-single__article-body {
    padding: 32px 0 0;
}

/* ── Toolbar ── */

.hsdd-single__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin: 0 0 24px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.hsdd-single__toolbar-share {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hsdd-single__toolbar-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #555;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.hsdd-single__toolbar-share a:hover {
    background: #f0f0f0;
    color: #1d1d1f;
}

.hsdd-single__toolbar-a11y {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hsdd-single__toolbar:last-of-type {
    margin-bottom: 48px;
}

.hsdd-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    line-height: 1;
}

.hsdd-toolbar-btn:hover {
    background: #f0f0f0;
    color: #1d1d1f;
    border-color: #ccc;
}

.hsdd-toolbar-btn--active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}

.hsdd-toolbar-btn--active:hover {
    background: #333;
    color: #fff;
}

/* ── Content ── */

.hsdd-single--cover .hsdd-single__content {
    font-size: 17px;
    line-height: 1.75;
    color: #333;
}

.hsdd-single--cover .hsdd-single__content p {
    margin: 0 0 1.5em;
}

.hsdd-single--cover .hsdd-single__content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 2em 0 0.8em;
    color: #1d1d1f;
}

.hsdd-single--cover .hsdd-single__content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 1.8em 0 0.6em;
    color: #1d1d1f;
}

.hsdd-single--cover .hsdd-single__content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5em 0;
}

.hsdd-single--cover .hsdd-single__content blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    border-left: 3px solid #1d1d1f;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

.hsdd-single--cover .hsdd-single__content ul,
.hsdd-single--cover .hsdd-single__content ol {
    padding-left: 1.5em;
    margin: 0 0 1.5em;
}

.hsdd-single--cover .hsdd-single__content a {
    color: #06c;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.hsdd-single--cover .hsdd-single__content a:hover {
    color: #004c99;
}

/* ── Related ── */

.hsdd-single__related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.hsdd-single__related-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #50575e;
    margin: 0 0 20px;
}

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

.hsdd-single__related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: box-shadow .2s, transform .15s;
}

.hsdd-single__related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.hsdd-single__related-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.hsdd-single__related-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hsdd-single__related-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
}

.hsdd-single__related-date {
    font-size: 12px;
    color: #86868b;
}

/* ── Navigation ── */

.hsdd-single--cover .hsdd-single__nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.hsdd-single--cover .hsdd-single__nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    max-width: 48%;
}

.hsdd-single--cover .hsdd-single__nav-link small {
    font-size: 12px;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hsdd-single--cover .hsdd-single__nav-link span {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    transition: color .2s;
}

.hsdd-single--cover .hsdd-single__nav-link:hover span {
    color: #06c;
}

.hsdd-single--cover .hsdd-single__nav-link--next {
    margin-left: auto;
    text-align: right;
}

/* ── Infinite scroll ── */

.hsdd-single__article-block {
    margin-bottom: 60px;
}

/* AJAX-loaded heroes break out of container to full width */
.hsdd-single--cover .hsdd-single__article-block .hsdd-single__cover-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hsdd-single__article-block + .hsdd-single__article-block {
    padding-top: 0;
    border-top: none !important;
}

.hsdd-single__article-block--ajax .hsdd-single__article-body,
.hsdd-single__article-block--ajax .hsdd-single__layout {
    padding-top: 40px;
}

.hsdd-single__footer {
    margin-bottom: 75px;
}

.hsdd-single__sentinel {
    height: 1px;
}

.hsdd-single__spinner {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    color: #999;
}

/* ── Sidebar ── */

.hsdd-single--cover .hsdd-single__cta {
    background: #1d1d1f;
    border-radius: 10px;
    padding: 28px 24px;
    margin-bottom: 24px;
}

.hsdd-single--cover .hsdd-single__cta-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

.hsdd-single--cover .hsdd-single__cta-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,.6);
    margin: 0 0 12px;
}

.hsdd-single--cover .hsdd-single__cta-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.75);
    margin-bottom: 16px;
}

.hsdd-single--cover .hsdd-single__cta-text p:last-child {
    margin-bottom: 0;
}

.hsdd-single--cover .hsdd-single__cta-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity .2s;
}

.hsdd-single--cover .hsdd-single__cta-btn:hover {
    opacity: .85;
}

/* ── Alto contrasto ── */

.hsdd-single--high-contrast .hsdd-single__content {
    color: #000 !important;
    background: #fff !important;
}

.hsdd-single--high-contrast .hsdd-single__content a {
    color: #00e !important;
}

.hsdd-single--high-contrast .hsdd-single__content h2,
.hsdd-single--high-contrast .hsdd-single__content h3 {
    color: #000 !important;
}

.hsdd-single--high-contrast .hsdd-single__content blockquote {
    background: #eee !important;
    color: #000 !important;
    border-left-color: #000 !important;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .hsdd-single--hero-mob-small .hsdd-single__cover-hero { min-height: 40vh; }
    .hsdd-single--hero-mob-medium .hsdd-single__cover-hero { min-height: 50vh; }
    .hsdd-single--hero-mob-large .hsdd-single__cover-hero { min-height: 80vh; }
    .hsdd-single__layout {
        flex-direction: column;
    }
    .hsdd-single__layout .hsdd-single__sidebar {
        flex: none;
        position: static !important;
        width: auto !important;
        bottom: auto !important;
        top: auto !important;
    }
    .hsdd-single__cover-inner {
        padding: 0 16px;
    }
    .hsdd-single__cover-top {
        padding-top: 20px;
    }
    .hsdd-single__cover-bottom {
        padding-bottom: 20px;
    }
    .hsdd-single__footer {
        margin-bottom: 50px;
    }
    .hsdd-single__toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .hsdd-single__related-grid {
        grid-template-columns: 1fr;
    }
    .hsdd-single--cover .hsdd-single__nav {
        flex-direction: column;
    }
    .hsdd-single--cover .hsdd-single__nav-link {
        max-width: 100%;
    }
}
