.blog-main {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero del blog */
.blog-hero {
    padding: 3rem 5% 2.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.06) 0%, transparent 100%);
}

.blog-hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.blog-hero-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 16px;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.35);
}

.blog-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.blog-hero-underline {
    height: 5px;
    width: 100px;
    margin: 0 auto 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.blog-hero-subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

/* Contenedor de filtros: flujo normal, NO position fixed */
.blog-filters-wrap {
    padding: 0 5% 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.blog-search {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 400px;
}

.blog-search input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: 3px solid rgba(76, 175, 80, 0.35);
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.blog-search input:hover {
    border-color: rgba(76, 175, 80, 0.5);
}

.blog-search input:focus {
    border-color: var(--primary-color);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.blog-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.3s ease, background 0.3s ease;
}

.blog-search button:hover {
    color: var(--primary-color);
    background: rgba(76, 175, 80, 0.1);
}

.blog-category-select-wrap {
    min-width: 200px;
}

.blog-category-select {
    width: 100%;
    min-width: 180px;
    padding: 14px 40px 14px 20px;
    border: 3px solid rgba(76, 175, 80, 0.35);
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234CAF50' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 18px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.blog-category-select:hover {
    border-color: rgba(76, 175, 80, 0.5);
}

.blog-category-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Contenedor y grid de artículos */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 4rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    row-gap: 3rem;
}

.blog-card {
    position: relative;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(76, 175, 80, 0.08);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18), 0 12px 28px rgba(76, 175, 80, 0.25);
    border-color: rgba(76, 175, 80, 0.2);
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f5f0 0%, #e0e8e0 100%);
}

.blog-card-image a {
    display: block;
    height: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.blog-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    z-index: 2;
}

.blog-card-date {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    text-align: center;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.blog-card-date .day,
.blog-card-date .month,
.blog-card-date .year {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

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

.blog-card-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

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

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

.blog-card-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
    transition: all 0.35s ease;
}

.blog-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(76, 175, 80, 0.45);
}

.blog-card-link i {
    transition: transform 0.3s ease;
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

/* Sin resultados */
.blog-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.blog-no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.blog-no-results p {
    color: #666;
    margin-bottom: 1.5rem;
}

.blog-reset-filters {
    padding: 12px 28px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-dark);
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-reset-filters:hover {
    background: var(--primary-color);
    color: white;
}

/* Ocultar tarjetas por filtro */
.blog-card.hidden {
    display: none;
}

/* ========== PÁGINA DE ARTÍCULO (lectura ancha + imágenes) ========== */
.blog-article-page {
    padding-top: 80px;
    min-height: 100vh;
}

.blog-article-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 5% 4rem;
}

.blog-article {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.08);
}

.blog-article-header {
    padding: 0;
}

.blog-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 2rem 2.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

.blog-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 50px;
    font-weight: 600;
}

.blog-article-meta i {
    color: var(--primary-color);
}

.blog-article-figure {
    width: 100%;
    margin: 1.5rem 0 0;
    padding: 0;
}

.blog-article-figure img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.blog-article-figure figcaption {
    padding: 1rem 2.5rem 1.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
}

.blog-article h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
    margin: 2rem 2.5rem 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 5px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--primary-dark)) 1;
    border-image-slice: 0 0 1 0;
}

.blog-article-body {
    padding: 0 2.5rem 2.5rem;
}

.blog-article-body p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.blog-article-body p:first-of-type::first-letter {
    font-size: 4rem;
    line-height: 0.9;
    float: left;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.blog-article-body h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 2.5rem 0 1rem;
    padding-left: 1.25rem;
    border-left: 5px solid var(--primary-color);
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

/* Listas: ítems uno debajo del otro, sin línea entre ellos, con punto verde delante. Misma fuente, tamaño y color que p */
.blog-article-body ul li,
.blog-article-body ol li {
    display: list-item;
    list-style: none;
    margin-bottom: 0;
    padding-left: 1.35em;
    position: relative;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
}

.blog-article-body ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.blog-article-body ol {
    counter-reset: blog-list;
}

.blog-article-body ol li {
    counter-increment: blog-list;
}

.blog-article-body ol li::before {
    content: counter(blog-list) ".";
    color: var(--primary-color);
    font-weight: 600;
    position: absolute;
    left: 0;
}

.blog-article-body .article-image {
    width: 100%;
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.blog-article-body .article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body .article-image--small {
    width: 100%;
}

.blog-article-body .article-image--small img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
}

/* Imagen reducida pero mostrada completa (sin recortar) */
.blog-article-body .article-image--small-full {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.blog-article-body .article-image--small-full img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body .article-image figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
    background: #f9f9f9;
}

.blog-article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 5px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.08), transparent);
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.75;
}

.blog-article-back {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.blog-article-back a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-article-back a:hover {
    color: var(--primary-dark);
}

.blog-article-back a:hover i {
    transform: translateX(-4px);
}

.blog-article-back i {
    transition: transform 0.3s ease;
}

/* Responsive blog index */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    .blog-hero-content {
        margin-top: -1.5rem;
    }
    .blog-filters {
        flex-direction: column;
        padding: 1.25rem;
    }
    .blog-search {
        max-width: 100%;
    }
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    .blog-card-image {
        height: 220px;
    }
}

/* Responsive artículo */
@media (max-width: 768px) {
    .blog-article-wrap {
        padding: 1.5rem 4% 3rem;
        margin-top: -2rem;
    }
    .blog-article h1 {
        font-size: 1.6rem;
        margin: 1.5rem 1.5rem 1rem;
    }
    .blog-article-meta {
        padding: 0.75rem 1.5rem 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .blog-article-meta span {
        margin-right: 0;
        padding: 4px 10px;
        font-size: 0.85rem;
    }
    .blog-article-body {
        padding: 0 1.5rem 1.5rem;
    }
    .blog-article-body p {
        font-size: 0.95rem;
        text-align: left;
    }
    .blog-article-body ul,
    .blog-article-body ol {
        text-align: left;
    }
    .blog-article-body ul li,
    .blog-article-body ol li {
        font-size: 0.95rem;
        text-align: left;
    }
    .blog-article-body h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }
    .blog-card-content h2 {
        font-size: 1.2rem;
    }
    .blog-article h1 {
        font-size: 1.4rem;
    }
    .blog-article-body h2 {
        font-size: 1.2rem;
    }
}
