/* ============================================================
   EFESTO - Article Detail Page Styles
   Basato sullo stile delle pagine progetto (progetto.css)
   ============================================================ */

/* --- Article Hero with Full-Width Image --- */
.art-hero {
    position: relative;
    height: clamp(400px, 55vh, 650px);
    overflow: hidden;
    margin-top: 60px;
}

.art-hero-img {
    position: absolute;
    inset: 0;
}

.art-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 24, 22, .15) 0%,
        rgba(26, 24, 22, .5) 60%,
        rgba(26, 24, 22, .85) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl) var(--gutter);
}

.art-hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.art-hero .breadcrumb {
    margin-bottom: var(--space-md);
}

.art-hero .breadcrumb a,
.art-hero .breadcrumb span {
    color: rgba(255, 255, 255, .5);
}

.art-hero .breadcrumb a:hover {
    color: var(--white);
}

.art-hero-tag {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(26, 92, 46, .75);
    padding: .4em 1em;
    border-radius: 3px;
    margin-bottom: var(--space-sm);
    backdrop-filter: blur(8px);
}

.art-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: .5rem;
    max-width: 800px;
}

.art-hero h1 em {
    font-style: italic;
    color: var(--green-soft);
}

.art-hero-subtitle {
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
    margin-top: .5rem;
    max-width: 600px;
    line-height: 1.6;
}

/* --- Article Meta Bar --- */
.art-meta-bar {
    background: var(--white);
    border-bottom: 1px solid var(--grey-100);
    padding: var(--space-md) 0;
}

.art-meta-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.art-meta-item {
    text-align: center;
}

.art-meta-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: .3rem;
}

.art-meta-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--grey-800);
}

/* --- Article Body Content --- */
.art-body {
    max-width: 820px;
    margin: 0 auto;
}

.art-body-intro {
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    color: var(--grey-600);
    line-height: 1.9;
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.art-body-text {
    font-size: .95rem;
    color: var(--grey-500);
    line-height: 1.9;
}

.art-body-text p + p {
    margin-top: var(--space-sm);
}

/* Section headings within article */
.art-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--grey-800);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    line-height: 1.2;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.art-section-title em {
    color: var(--green);
    font-style: italic;
}

/* Numbered section title */
.art-section-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--green-pale);
    line-height: 1;
    margin-bottom: .3rem;
    display: block;
}

/* --- Article Highlight Box (same as proj-highlight) --- */
.art-highlight {
    background: var(--green-pale);
    border-left: 4px solid var(--green);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 4px);
    margin: var(--space-lg) 0;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.art-highlight h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--green-dark);
    margin-bottom: var(--space-sm);
    font-weight: 400;
}

.art-highlight ul {
    list-style: none;
    padding: 0;
}

.art-highlight ul li {
    font-size: .9rem;
    color: var(--grey-600);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
}

.art-highlight ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6em;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

/* Highlight with just text (no list) */
.art-highlight p {
    font-size: .95rem;
    color: var(--green-dark);
    line-height: 1.8;
    font-weight: 500;
}

/* --- Article Data/Specs Grid --- */
.art-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.art-data-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--grey-100);
    transition: all var(--fast);
}

@media (max-width: 480px) {
    .art-data-card { min-width: 0; }
}

.art-data-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--green-soft);
}

.art-data-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--green);
    line-height: 1;
    margin-bottom: .3rem;
}

.art-data-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: var(--space-xs);
}

.art-data-desc {
    font-size: .85rem;
    color: var(--grey-500);
    line-height: 1.7;
}

/* --- Article Representative Figure --- */
.art-figure {
    max-width: 1000px;
    margin: var(--space-lg) auto 0;
}

.art-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

.art-figure figcaption {
    font-size: .75rem;
    color: var(--grey-400);
    text-align: center;
    margin-top: .7rem;
    font-style: italic;
    line-height: 1.6;
}

.art-figure.is-portrait {
    max-width: 560px;
}

/* --- Article Partners Strip --- */
.art-partners {
    max-width: 820px;
    margin: var(--space-lg) auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-md) var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--grey-100);
}

.art-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-align: center;
}

.art-partner-label {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--grey-400);
}

.art-partner img {
    height: 46px;
    width: auto;
    object-fit: contain;
}

/* --- GWEB logo inside highlight --- */
.art-gweb-head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.art-gweb-head img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.art-gweb-head h3 {
    margin-bottom: 0;
}

/* --- Article Material Cards (immagini materiali) --- */
.art-mat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: 1000px;
    margin: var(--space-md) auto 0;
}

.art-mat-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--fast);
}

.art-mat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--green-soft);
}

.art-mat-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--off-white);
}

.art-mat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.art-mat-body {
    padding: var(--space-sm);
}

.art-mat-code {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--green);
    line-height: 1;
    margin-bottom: .35rem;
}

.art-mat-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: var(--space-xs);
}

.art-mat-desc {
    font-size: .82rem;
    color: var(--grey-500);
    line-height: 1.7;
}

/* --- Article Product Cards (gamma / card prodotti) --- */
.art-prod-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.art-prod-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--fast);
    text-decoration: none;
    color: inherit;
}

a.art-prod-card {
    cursor: pointer;
}

a.art-prod-card::after {
    content: 'Vedi il sistema \2192';
    margin-top: var(--space-sm);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green);
    padding: 0 var(--space-md) var(--space-md);
    opacity: .7;
    transition: opacity var(--fast), transform var(--fast);
}

a.art-prod-card:hover::after {
    opacity: 1;
}

.art-prod-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--green-soft);
}

.art-prod-figure {
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-md) var(--space-md) 0;
    background: linear-gradient(165deg, var(--green-pale), var(--off-white));
    overflow: hidden;
}

.art-prod-figure img {
    height: auto;
    width: auto;
    max-height: 268px;
    max-width: 88%;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .14));
}

/* Photo variant (novità con foto di prodotto) — immagine quadrata a tutta card */
.art-prod-figure.is-photo {
    display: block;
    padding: 0;
    background: none;
    height: auto;
    aspect-ratio: 1 / 1;
}

.art-prod-figure.is-photo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
    filter: none;
}

.art-prod-body {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-prod-code {
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--green);
    background: var(--green-pale);
    padding: .35em .85em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
}

.art-prod-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--grey-800);
    margin-bottom: var(--space-xs);
    line-height: 1.2;
}

.art-prod-card h3 em {
    font-style: italic;
    color: var(--green);
}

.art-prod-card > .art-prod-body > p {
    font-size: .85rem;
    color: var(--grey-500);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.art-prod-feats {
    list-style: none;
    padding: 0;
    margin: auto 0 0;
}

.art-prod-feats li {
    font-size: .8rem;
    color: var(--grey-600);
    line-height: 1.6;
    padding-left: 1.6rem;
    position: relative;
    margin-bottom: .3rem;
}

.art-prod-feats li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .25em;
    width: 11px;
    height: 7px;
    border-left: 2px solid var(--green);
    border-bottom: 2px solid var(--green);
    transform: rotate(-45deg);
}

/* --- Article Comparison Table --- */
.art-table-wrap {
    max-width: 820px;
    margin: var(--space-lg) auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.art-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.art-table thead {
    background: var(--green-dark);
    color: var(--white);
}

.art-table th {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .8rem 1rem;
    text-align: left;
}

.art-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--grey-100);
    color: var(--grey-600);
    line-height: 1.6;
}

.art-table tbody tr:hover {
    background: var(--green-pale);
}

.art-table tbody tr:last-child td {
    border-bottom: none;
}

/* Highlighted row */
.art-table tr.highlight {
    background: var(--green-pale);
    font-weight: 600;
}

.art-table tr.highlight td {
    color: var(--green-dark);
}

/* --- Article Checklist --- */
.art-checklist {
    max-width: 820px;
    margin: var(--space-lg) auto;
    list-style: none;
    padding: 0;
}

.art-checklist li {
    font-size: .9rem;
    color: var(--grey-600);
    line-height: 1.8;
    padding: .5rem 0 .5rem 2.2rem;
    position: relative;
    border-bottom: 1px solid var(--grey-100);
}

.art-checklist li:last-child {
    border-bottom: none;
}

.art-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .85rem;
    width: 18px;
    height: 18px;
    border: 2px solid var(--green);
    border-radius: 3px;
    background: var(--white);
}

.art-checklist li::after {
    content: '';
    position: absolute;
    left: 4px;
    top: calc(.85rem + 3px);
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--green);
    border-bottom: 2px solid var(--green);
    transform: rotate(-45deg);
}

/* --- Article Sources/References --- */
.art-sources {
    max-width: 820px;
    margin: var(--space-xl) auto 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--grey-100);
}

.art-sources-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: .5rem;
}

.art-sources p {
    font-size: .75rem;
    color: var(--grey-400);
    line-height: 1.8;
}

/* --- Article Service List (same as proj) --- */
.art-list {
    list-style: none;
    padding: 0;
    margin-top: var(--space-sm);
}

.art-list li {
    font-size: .9rem;
    color: var(--grey-600);
    line-height: 1.8;
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: .4rem;
}

.art-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .art-hero {
        height: clamp(350px, 45vh, 500px);
    }

    .art-meta-grid {
        gap: var(--space-lg);
    }

    .art-data-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .art-prod-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .art-mat-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 560px;
    }
}

@media (max-width: 768px) {
    .art-hero {
        height: clamp(300px, 50vh, 400px);
    }

    .art-hero-overlay {
        padding: var(--space-lg) var(--gutter);
    }

    .art-meta-grid {
        gap: var(--space-md);
    }

    .art-data-grid {
        grid-template-columns: 1fr 1fr;
    }

    .art-prod-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .art-hero {
        height: 300px;
    }

    .art-meta-grid {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .art-meta-item {
        text-align: left;
        display: flex;
        gap: .5rem;
        align-items: baseline;
    }

    .art-data-grid {
        grid-template-columns: 1fr;
    }

    .art-mat-grid {
        grid-template-columns: 1fr 1fr;
        max-width: none;
    }
}

/* Schermi molto stretti: le schede prodotto nell'articolo non devono forzare una larghezza minima */
@media (max-width: 480px) {
    .art-prod-grid { grid-template-columns: minmax(0, 1fr); }
    .art-prod-card, .art-prod-figure, .art-prod-figure.is-photo { min-width: 0; max-width: 100%; }
}
