/* ================= GALERÍA BLOG ================= */
/* =========================================================
   SECCIÓN NOTICIAS / BLOG JURÍDICO
   ========================================================= */
/* HERO BLOG */
/* ===== HERO BLOG ===== */
body.modal-open {
    overflow: hidden;
}

.blog-hero {
    background: linear-gradient(180deg,
            var(--deep-blue),
            #020b10);
    padding: 90px 6%;
}

.blog-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    max-width: 520px;
}

.blog-tag {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--teal-accent);
}

.hero-text h1 {
    font-size: 2.6rem;
    margin: 15px 0;
    color: var(--white);
}

.hero-text p {
    color: var(--gray-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.hero-text input {
    width: 100%;
    padding: 12px 15px;
    background: var(--deep-blue);
    border: 1px solid rgba(21, 161, 179, 0.3);
    color: var(--white);
    outline: none;
}

}


.blog-gallery {
    padding: 50px 30px;
    background: #0a2d37;

}

.blog-gallery-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    height: 180px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

@media (max-width: 900px) {
    .blog-gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .blog-gallery-container {
        grid-template-columns: 1fr;
    }

    .blog-gallery {
        padding: 40px 20px;
        background: #0a2d37;
    }

    .blog-gallery-container {
        max-width: 1200px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .gallery-item {
        background: #0b1c22;
        /* fallback elegante */
        border-radius: 12px;
        overflow: hidden;
        height: 180px;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    @media (max-width: 900px) {
        .blog-gallery-container {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 500px) {
        .blog-gallery-container {
            grid-template-columns: 1fr;
        }

        .gallery-item {
            height: 200px;
        }
    }

    .blog-gallery {
        margin-top: -20px;
        border-radius: 30px 30px 0 0;
    }


    .gallery-item {
        height: 200px;
    }
}


/* ===== HERO IMAGE ===== */
.hero-image img {
    max-width: 420px;
}

/* ===== GRID BLOG ===== */
.blog-grid-section {
    padding: 80px 6%;
    background: var(--deep-blue);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 40px;
}

.blog-card {
    background: var(--teal-dark);
    border-radius: 6px;
    overflow: hidden;
    transition: 0.3s;
}

.blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.blog-card h3 {
    padding: 15px;
    font-size: 1.1rem;
    color: var(--white);
}

.blog-card p {
    padding: 0 15px 20px;
    font-size: 0.85rem;
    color: var(--gray-light);
    line-height: 1.5;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
    .blog-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image img {
        max-width: 280px;
    }
}

.blog-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


.blog-modal-content {
    background: var(--deep-blue);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    /* 🔑 límite vertical */
    overflow-y: auto;
    /* 🔑 scroll SOLO aquí */
    padding: 2rem;
    border-radius: 12px;
}

.blog-modal-content img {
    width: 100%;
    max-height: 300px;
    /* 🔥 límite visual */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.blog-modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--teal-accent);
}

.blog-modal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-light);
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 26px;
    cursor: pointer;
    color: var(--white);
}

.close-modal:hover {
    color: var(--teal-accent);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- META (FECHA / CATEGORÍA) ---------- */

.news-meta {
    display: flex;
    gap: 18px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.news-date {
    color: var(--gray-light);
}

.news-tag {
    color: var(--teal-accent);
}

/* ---------- CONTENIDO ---------- */

.news-item h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.news-item p {
    max-width: 700px;
    color: var(--gray-light);
    margin-bottom: 12px;
}

/* ---------- LINKS ---------- */

.news-read,
.featured-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
}

.news-read::after {
    content: " →";
    transition: 0.3s;
}

.news-read:hover::after {
    margin-left: 12px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {

    .featured-news {
        padding: 40px 30px;
    }

    .featured-title {
        font-size: 2rem;
    }

    .news-header h2 {
        font-size: 2rem;
    }

    .news-item {
        padding-left: 30px;
    }

    .news-list {
        gap: 35px;
    }
