.blog-post-page {
    background-color: #fdfdfb;
}

.blog-article {
    padding: 120px 20px 100px;
    color: var(--text);
}

 
.post-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.post-meta {
    font-family: var(--nunito);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--marine);
    opacity: 0.6;
    display: block;
    margin-bottom: 15px;
}

.post-title {
    font-family: var(--alice);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--text);
}

 
.post-body {
    font-family: var(--lora);
    font-size: 1.25rem;
    line-height: 1.8;
    color: #2c2c2c;
}

.post-body > * {
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

 
figure {
    margin-bottom: 50px !important;
}

figure img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

figcaption {
    font-family: var(--nunito);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    opacity: 0.6;
}

 
.post-body .media-wide {
    max-width: 1000px;
}

.post-body .media-full {
    max-width: 100%;
    border-radius: 0;
}

 
blockquote {
    font-family: var(--alice);
    font-size: 1.6rem;
    text-align: center;
    border-left: none;
    margin: 60px auto !important;
    padding: 0 20px;
    color: var(--marine);
    line-height: 1.4;
}

.signature {
    max-width: 740px;
    margin: 40px auto 0;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    opacity: 0.85;
}

.signature-line {
    width: 80px;
    height: 1.5px;
    background: linear-gradient(
        to left,
        #2c2c2c 0%,
        rgba(253, 253, 251, 0.9) 75%, 
        rgba(253, 253, 251, 0.95) 90%, 
        #fdfdfb 100%  
    );
    opacity: 0.4;
    
}

.signature-text {
    font-family: var(--lora);
    font-style: italic;
    font-size: 1.2rem;
}

.post-nav {
    max-width: 1200px;
    margin: 80px auto 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

 
.back-link-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.back-link-wrapper:hover {
    opacity: 1;
    color: var(--marine);
}

 
.back-link-wrapper .post-nav-label {
    visibility: hidden;
}

 
.next-post-link {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}
.next-post-link .post-nav-label {
    margin-right: 26px; 
}

.next-post-link:hover {
    opacity: 1;
    color: var(--marine);
}

 
.post-nav-label {
    font-family: var(--nunito);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0.5;
    line-height: 1;
    margin-bottom: 2px;
}

 
.post-nav-title {
    font-family: var(--alice);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--marine);
    transition: color 0.3s;
    line-height: 1;
  
}

 
.post-nav-title .arrow {
    display: inline-block;
    transition: margin 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

 
.back-link-wrapper:hover .back-arrow {
    margin-left: -6px;
    margin-right: 6px;
}

 
.next-post-link:hover .arrow {
    margin-left: 6px;
    margin-right: -6px;
}

 
@media (max-width: 900px) {
    .post-nav {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .post-nav-title {
        text-align: right;
    }
  
}

 
@media (max-width: 900px) {
    .blog-article { padding-top: 80px; }
    .post-body .media-wide { max-width: 100%; }
    .post-footer-nav { flex-direction: column; gap: 20px; }
    .post-body { font-size: 1.1rem; }
}

/* =========================================
   INDICE BLOG: CONTAINER (Margini & Aria)
   ========================================= */

.blog-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 120px;
    padding-left: 80px;
    padding-right: 80px;
    box-sizing: border-box;
}

.blog-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    scroll-margin-top: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 20px;
    font-family: var(--alice);
    font-size: 0.85rem;
    color: var(--marine);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.filter-btn:hover { border-color: var(--marine); }
.filter-btn.active { background-color: var(--marine); color: white; border-color: var(--marine); box-shadow: none; }



.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 50px;
}

.lab-card {
    background: white;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 2px;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.lab-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--marine);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

 
.blog-card-img {
    width: 100%;
    aspect-ratio: 2/1;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(20%);
}

.lab-card:hover .blog-card-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

 
.blog-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

 
.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    font-family: var(--nunito);
    font-size: 0.7rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.lab-tag { font-weight: 600; color: var(--marine); letter-spacing: 0.1em; text-transform: uppercase; }
.blog-date { opacity: 0.5; font-style: italic; font-family: var(--lora); }

.lab-tag,
.blog-date {
    line-height: 1;
}
 
.lab-card h3 {
    font-family: var(--alice);
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0 0 8px 0;
    color: var(--text);
}

 
.lab-subtitle-card {
    font-family: var(--lora);
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

 
.lab-link {
    font-family: var(--alice);
    color: var(--marine);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    align-self: flex-start;
}

 
@media (max-width: 900px) {
    .blog-container {
        padding-left: 30px;
        padding-right: 30px;
    }

    .lab-grid {
        gap: 40px;
        grid-template-columns: 1fr;
    }
}



@media (max-width: 768px) {
    .blog-card-img { aspect-ratio: 16/9; }
}

.pagination-wrapper {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-wrapper button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #ddd;
    color: var(--text);
    font-family: var(--alice);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.pagination-wrapper button:hover:not(:disabled):not(.active) {
    background-color: rgba(26, 74, 110, 0.08);
    color: var(--marine);
    border-color: var(--marine);
}

.pagination-wrapper button.active {
    background-color: var(--marine);
    color: white;
    border-color: var(--marine);
    cursor: default;
    pointer-events: none;
}

.pagination-wrapper button:disabled {
    opacity: 0.2;
    cursor: default;
    border-color: #eee;
}

 
.griglia-nascosta {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

 
.blog-vuoto {
    text-align: center;
    width: 100%;
    opacity: 0.5;
    padding: 50px;
}

.blog-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 70px;
    scroll-margin-top: 40px;
}

.blog-controls .blog-filters {
    margin-bottom: 0;
}

.rss-wrapper-inline {
    justify-self: end;
    display: flex;
    transform: translateY(1px);
}

.rss-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--nunito);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--marine);
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 6px 12px;
}

.rss-link:hover {
    opacity: 1;
    background-color: rgba(26, 74, 110, 0.05);
    border-radius: 4px;
}

.rss-link span {
    line-height: 1;
    transform: translateY(1px);
}

@media (max-width: 1000px) {
    .blog-controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }

    .spacer {
        display: none;
    }

    .rss-wrapper-inline {
        align-self: center;
    }

    .rss-link {
        margin: 20px 0 0;
        font-size: 0.7rem;
        opacity: 0.35;
    }
}

 
.blog-section-intro { text-align: center; padding: 80px 5% 40px; max-width: 900px; margin: 0 auto; }

.blog-divider {
    width: 60px;
    height: 3px;
    background: var(--marine);
    margin: 30px auto 0;
    opacity: 0.3;
}

@media (max-width: 900px) {
    .blog-divider { margin: 15px auto 0; width: 40px; }
}