/* 
 * ARTICLE STYLES 
 * Semantic Layout for Blog Articles
 */

.progress-q-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px; /* Altezza della curva */
    z-index: 10000;
    pointer-events: none;
}

#progress-q-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none !important;
}

#progress-q-path {
    pointer-events: none !important;
    transition: stroke-dashoffset 0.1s linear;
    stroke-dasharray: 200; /* Valore arbitrario, verrà calcolato da JS */
    stroke-dashoffset: 200;
}

.article-header { 
    padding: 150px 5% 50px 5%; 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto; 
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 30px;
    transition: color var(--transition-smooth);
}

.back-link:hover {
    color: var(--accent-oro);
}

.article-category {
    color: var(--accent-oro); 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 20px; 
    display: block; 
}

.article-title { 
    font-family: var(--font-heading); 
    font-size: clamp(2.5rem, 5vw, 3.5rem); 
    color: #fff; 
    line-height: 1.15; 
    margin-bottom: 25px; 
}

.article-lead {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.6;
    color: #fff;
    margin-bottom: 30px;
}

.article-meta-info {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-cover-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 5%;
}

.article-hero-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    object-position: var(--img-position, center);
    display: block;
    border-radius: 8px;
    filter: grayscale(10%); 
}

/* AUDIO PLAYER */
.article-audio-wrapper {
    width: min(calc(100% - 40px), 720px);
    margin: 15px auto 30px auto;
    padding: 14px 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-audio-wrapper .audio-label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-oro);
    margin-bottom: 4px;
}
.article-audio-wrapper .audio-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    margin-top: 2px;
}

/* Custom UI */
.custom-audio-ui {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border-radius: 6px;
    width: 100%;
}
.audio-play-btn, .audio-volume-btn {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}
.audio-play-btn:hover, .audio-volume-btn:hover {
    color: var(--accent-oro);
    transform: scale(1.05);
}
.audio-play-btn:focus-visible, .audio-volume-btn:focus-visible {
    outline: 2px solid var(--accent-oro);
    outline-offset: 4px;
}
.audio-play-btn svg { width: 24px; height: 24px; }
.audio-volume-btn svg { width: 20px; height: 20px; }

.audio-time-display {
    font-size: 0.85rem;
    color: #ccc;
    font-variant-numeric: tabular-nums;
    min-width: 75px;
}

.audio-progress-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
}
.audio-progress-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    background-image: linear-gradient(var(--accent-oro), var(--accent-oro));
    background-size: 0% 100%;
    background-repeat: no-repeat;
}
.audio-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-oro);
    cursor: pointer;
    transition: transform 0.1s;
}
.audio-progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.audio-progress-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-oro);
    cursor: pointer;
    border: none;
}

.article-audio-player {
    width: 100%;
    outline: none;
}

.article-body {
    width: min(calc(100% - 40px), 720px);
    margin-inline: auto;
    font-size: clamp(1.08rem, 0.25vw + 1rem, 1.22rem);
    line-height: 1.8;
    color: #E5E7EB;
    font-weight: 400;
    padding-bottom: 60px;
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-family: var(--font-heading);
    color: #fff;
    margin: 2.4em 0 0.7em;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.3;
}

.article-body h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin: 2em 0 0.6em;
    font-size: 1.45rem;
    line-height: 1.4;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5em;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 0.5em;
}

.article-body a {
    color: var(--accent-oro);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: #fff;
}

blockquote.article-pullquote, .article-body blockquote {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: #fff;
    font-style: italic;
    border-left: 3px solid var(--accent-oro);
    padding-left: 25px;
    margin: 40px 0;
    line-height: 1.4;
}

.article-footer {
    width: min(calc(100% - 40px), 720px);
    margin-inline: auto;
    padding: 60px 0 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-footer-section {
    margin-bottom: 50px;
}

.article-footer-section h4 {
    font-family: var(--font-heading);
    color: var(--accent-oro);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.article-footer-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
}

.article-sharing h4 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.sharing-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-smooth);
    font-family: var(--font-body);
}

.share-btn:hover, .share-btn:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-oro);
    outline: none;
}

@media (max-width: 768px) {
    .article-body {
        width: auto;
        margin-inline: 20px;
        font-size: 1.1rem;
        line-height: 1.75;
    }

    .article-header h1 {
        font-size: clamp(2.2rem, 10vw, 3.3rem);
        line-height: 1.08;
    }
    
    .article-footer {
        width: auto;
        margin-inline: 20px;
    }
}

/* LOGO IMAGE EXCEPTION */
.article-hero-image[src*="logo-g9"] {
    object-fit: contain;
    filter: none;
}

/* --- CUSTOM AUDIO PLAYER --- */
.custom-audio-player {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-audio-btn {
    background: transparent;
    border: none;
    color: var(--accent-oro, #D4AF37);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 0;
    transition: opacity 0.2s ease;
}

.custom-audio-btn:hover {
    opacity: 0.8;
}

.audio-time {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-left: auto;
}

.audio-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: var(--accent-oro, #D4AF37);
    width: 0%;
    transition: width 0.1s linear;
}
