/* ========================================
   BLOG PAGE STYLES - ULTRA MODERN
   ======================================== */

.blog-section {
    padding: 6rem 0;
}

/* ========== FILTRI ========== */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #2596be;
    color: #2596be;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(37, 150, 190, 0.3);
}

.filter-btn i {
    font-size: 1rem;
}

/* ========== BLOG GRID ========== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-category.news {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.blog-category.tips {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.blog-category.case-study {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

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

.blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #999;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: #2596be;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.blog-author span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.blog-read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2596be;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 0.75rem;
    color: #1a7a99;
}

/* ========== LOAD MORE BUTTON ========== */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: white;
    color: #2596be;
    border: 2px solid #2596be;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 150, 190, 0.3);
}

/* ========== NEWSLETTER CTA ========== */
.newsletter-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.newsletter-box {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.newsletter-title i {
    color: #2596be;
    font-size: 2.5rem;
}

.newsletter-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-form .input-group {
    display: flex;
    gap: 0.75rem;
}

.newsletter-form .form-control {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-form .form-control:focus {
    outline: none;
    border-color: #2596be;
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

.btn-newsletter {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-newsletter:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 150, 190, 0.4);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-post {
        padding: 2rem;
    }

    .featured-image {
        height: 300px;
    }

    .featured-title {
        font-size: 2rem;
    }

    .newsletter-box {
        padding: 2rem;
    }

    .newsletter-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .blog-section {
        padding: 4rem 0;
    }

    .blog-filters {
        gap: 0.75rem;
        margin-bottom: 3rem;
    }

    .filter-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
    }

    .featured-post-wrapper {
        margin-bottom: 3rem;
    }

    .featured-post {
        padding: 1.5rem;
    }

    .featured-image {
        height: 250px;
        margin-bottom: 1.5rem;
    }

    .featured-content {
        padding: 0;
    }

    .featured-title {
        font-size: 1.75rem;
    }

    .featured-excerpt {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card-content {
        padding: 1.5rem;
    }

    .blog-title {
        font-size: 1.25rem;
    }

    .newsletter-box {
        padding: 1.5rem;
    }

    .newsletter-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .newsletter-text {
        font-size: 1rem;
        text-align: center;
    }

    .newsletter-form .input-group {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-newsletter {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .blog-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 1rem;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .featured-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ========== ARTICLE MODAL ========== */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.article-modal.active {
    display: flex;
}

.article-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.article-modal-content {
    position: relative;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.article-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-modal-close:hover {
    background: #2596be;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 150, 190, 0.4);
}

.article-modal-body {
    overflow-y: auto;
    max-height: 90vh;
}

.article-modal-body::-webkit-scrollbar {
    width: 10px;
}

.article-modal-body::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.article-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    border-radius: 10px;
}

.article-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1a7a99 0%, #0398b8 100%);
}

/* Header con immagine hero */
.article-hero-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.article-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.article-header {
    position: relative;
    z-index: 1;
}

.article-category-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 20px rgba(37, 150, 190, 0.4);
}

.article-title {
    font-size: 2.75rem;
    font-weight: 900;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-author-info img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.author-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.author-role {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.article-details {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    color: white;
}

.article-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Contenuto articolo */
.article-body-content {
    padding: 3.5rem;
}

.article-content {
    font-size: 1.2rem;
    line-height: 2;
    color: #2d3748;
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 3.5rem 0 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2596be;
    line-height: 1.3;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #2596be;
    margin: 3rem 0 1.5rem;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a7a99;
    margin: 2.5rem 0 1.25rem;
    line-height: 1.4;
}

.article-content p {
    margin-bottom: 2rem;
    text-align: justify;
}

.article-content ul, .article-content ol {
    margin: 2rem 0 2rem 3rem;
    line-height: 2;
}

.article-content li {
    margin-bottom: 1.25rem;
    padding-left: 0.75rem;
}

.article-content strong {
    color: #1a1a1a;
    font-weight: 700;
}

.article-content blockquote {
    border-left: 5px solid #2596be;
    padding: 2rem 2.5rem;
    margin: 3rem 0;
    background: rgba(37, 150, 190, 0.05);
    border-radius: 0 15px 15px 0;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 2;
    color: #555;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: #2596be;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 3.5rem;
    margin-top: 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    border-top: 2px solid #e0e0e0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.article-tag {
    padding: 0.6rem 1.25rem;
    background: white;
    color: #2596be;
    border: 2px solid #2596be;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #2596be;
    color: white;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-share span {
    font-weight: 700;
    color: #666;
    font-size: 1rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    background: white;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
}

.share-btn:hover {
    background: linear-gradient(135deg, #2596be 0%, #04c1de 100%);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 150, 190, 0.3);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .article-modal {
        padding: 0;
    }

    .article-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .article-hero-image {
        height: 280px;
    }

    .article-hero-overlay {
        padding: 2rem 1.5rem;
    }

    .article-title {
        font-size: 1.85rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .article-body-content {
        padding: 2.5rem 2rem;
    }

    .article-content {
        font-size: 1.1rem;
        line-height: 1.9;
    }

    .article-content h2 {
        font-size: 1.9rem;
    }

    .article-content h3 {
        font-size: 1.6rem;
    }

    .article-content h4 {
        font-size: 1.3rem;
    }

    .article-content ul, .article-content ol {
        margin-left: 2rem;
    }

    .article-content blockquote {
        font-size: 1.15rem;
        padding: 1.5rem 1.75rem;
    }

    .article-footer {
        flex-direction: column;
        gap: 1.75rem;
        align-items: flex-start;
        padding: 2rem 2rem;
    }
}

@media (max-width: 480px) {
    .article-modal-close {
        width: 45px;
        height: 45px;
        top: 1.5rem;
        right: 1.5rem;
    }

    .article-hero-image {
        height: 220px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-body-content {
        padding: 2rem 1.5rem;
    }

    .article-content {
        font-size: 1.05rem;
    }

    .article-content h2 {
        font-size: 1.6rem;
    }

    .article-content h3 {
        font-size: 1.4rem;
    }

    .article-content ul, .article-content ol {
        margin-left: 1.5rem;
    }

    .article-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-footer {
        padding: 1.75rem 1.5rem;
    }
}

/* ========== ANIMAZIONI ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card, .featured-post {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }