/**
 * BLOG CARDS - MODERN GRID SYSTEM
 */
:root {
    --blog-card-bg: #ffffff;
    --blog-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --blog-shadow-hover: 0 20px 45px rgba(255, 77, 109, 0.12);
}

/* BLOG HERO REFINEMENT */
.blog-archive-header {
    padding: 80px 0 60px;
    background: white;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.back-to-blog i {
    font-size: 18px;
    transition: transform 0.3s;
}

.back-to-blog:hover {
    color: var(--brand-pink);
}

.back-to-blog:hover i {
    transform: translateX(-5px);
}

.blog-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-pink);
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
}

.brand-title {
    font-size: 52px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 30px;
    font-family: var(--font-heading);
    letter-spacing: -2px;
}

.brand-title span {
    color: var(--brand-pink);
}

/* CATEGORY NAVIGATION */
.blog-cat-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.cat-nav-item {
    padding: 10px 24px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
}

.cat-nav-item:hover, .cat-nav-item.active {
    background: var(--brand-pink);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 77, 109, 0.2);
}

/* BLOG LAYOUT WITH SIDEBAR */
.blog-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 60px 0;
}

@media (max-width: 1024px) {
    .blog-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* BLOG GRID (Inside main content) */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Balanced 3 Columns */
    gap: 20px;
}

@media (max-width: 1400px) {
    .blog-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
    .blog-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .blog-posts-grid { grid-template-columns: 1fr; }
}

/* INDIVIDUAL CARD STYLE */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f1f5f9;
    box-shadow: var(--blog-shadow);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--blog-shadow-hover);
    border-color: rgba(255, 77, 109, 0.2);
}

.blog-card-thumb {
    position: relative;
    height: 195px; /* ALLUNGATO LEGGERMENTE */
    overflow: hidden;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.1);
}

.blog-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-pink);
    color: white;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 2;
}

.blog-card-content {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-date {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 600;
}

.blog-card-content h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.35;
    color: #0f172a;
}

.blog-card-content h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-content h2 a:hover {
    color: var(--brand-pink);
}

.blog-card-excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    margin-top: auto;
    padding-top: 10px;
}

.read-more-link {
    font-size: 12px;
    font-weight: 900;
    color: #0f172a;
    text-decoration: none;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.read-more-link:hover {
    color: var(--brand-pink);
}

.read-more-link i {
    font-size: 16px;
    transition: transform 0.3s;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .blog-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .brand-title { font-size: 42px; }
}

@media (max-width: 650px) {
    .blog-posts-grid { grid-template-columns: 1fr; }
    .brand-title { font-size: 32px; }
}

/* MOBILE BLOG */
@media (max-width: 768px) {
    /* Header archivio: padding ridotto */
    .blog-archive-header {
        padding: 40px 0 30px;
    }
    .blog-archive-header h1 {
        font-size: 28px !important;
    }

    /* Layout: sidebar va sotto */
    .blog-layout-grid {
        grid-template-columns: 1fr;
        padding: 30px 0;
        gap: 0;
    }

    /* Separatore visivo prima della sidebar */
    .blog-layout-grid .sidebar-premium {
        margin-top: 40px;
        padding-top: 40px;
        border-top: 2px solid #f1f5f9;
    }

    /* Thumb blog card: altezza fissa */
    .blog-card .blog-thumb {
        height: 180px;
    }

    /* Category nav: scroll orizzontale */
    .blog-cat-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
        scrollbar-width: none;
    }
    .blog-cat-nav::-webkit-scrollbar { display: none; }
    .cat-nav-item { white-space: nowrap; }
}
