/* ============================================
   BLOG STYLES — FUNDE
   Editorial, clean, institutional design
   ============================================ */

/* ---------- Page Layout ---------- */
.blog-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* ---------- Blog Header ---------- */
.blog-header {
    margin-bottom: 2.5rem;
}

.blog-header-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.blog-header-accent {
    color: #00a29a;
}

.blog-header-subtitle {
    font-size: 1.0625rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 640px;
    margin: 0;
}

/* ---------- Search & Filter Toolbar ---------- */
.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.blog-search {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.blog-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
}

.blog-search input:focus {
    border-color: #00a29a;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 162, 154, 0.1);
}

.blog-search input::placeholder {
    color: #94a3b8;
}

.blog-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    transition: color 0.2s ease;
}

.blog-search input:focus ~ .blog-search-icon {
    color: #00a29a;
}

/* Category Filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.blog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: inherit;
}

.blog-filter-btn:hover {
    border-color: #00a29a;
    color: #00a29a;
}

.blog-filter-btn.active {
    border-color: #00a29a;
    color: #ffffff;
    background: #00a29a;
}

.blog-filter-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.25rem;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease;
}

.blog-filter-btn.active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* ---------- Results Info ---------- */
.blog-results-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.blog-results-info strong {
    color: #1e293b;
}

.blog-link-clean {
    color: #00a29a;
    text-decoration: none;
    font-weight: 600;
}

.blog-link-clean:hover {
    text-decoration: underline;
}

/* ============================================
   FEATURED ARTICLE — Horizontal Editorial Layout
   ============================================ */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 3rem;
    background: #ffffff;
    opacity: 0;
    animation: blogFadeUp 0.5s ease forwards;
}

.blog-featured:hover {
    border-left-color: #00a29a;
}

.blog-featured-image {
    position: relative;
    min-height: 320px;
    background: #f1f5f9;
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.blog-featured-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    margin: 0.75rem 0;
}

.blog-featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-featured-title a:hover {
    color: #00a29a;
}

.blog-featured-excerpt {
    font-size: 1rem;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
}

/* ============================================
   BLOG GRID — Standard Article Cards
   ============================================ */
/* ---------- Entrance Animations ---------- */
@keyframes blogFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, border-left-color 0.3s ease, transform 0.3s ease;
    position: relative;
    opacity: 0;
    animation: blogFadeUp 0.5s ease forwards;
}

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

.blog-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
    border-left-color: #00a29a;
    transform: translateY(-2px);
}

.blog-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Card Image */
.blog-card-image {
    position: relative;
    height: 200px;
    background: #f1f5f9;
    overflow: hidden;
}

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

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

/* Placeholder — subtle gradient, no icon */
.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #f0fdfa 100%);
}

/* Card Body */
.blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

/* ---------- Card Meta (Category + Date) ---------- */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.blog-category {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #00a29a;
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Per-category color overrides (text only, no background) */
.blog-category.cat-periodismo { color: #3b82f6; }
.blog-category.cat-transparencia { color: #059669; }
.blog-category.cat-legal { color: #d97706; }
.blog-category.cat-acceso { color: #e11d48; }
.blog-category.cat-opinion { color: #7c3aed; }
.blog-category.cat-economia { color: #0891b2; }

.blog-card-meta time {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Card Title */
.blog-card-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin: 0 0 0.5rem 0;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: #00a29a;
}

/* Card Excerpt */
.blog-card-excerpt {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   READ MORE BUTTON — Premium Corporate Design
   ============================================ */
.blog-btn-more {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 50%;
    align-self: flex-start;
    padding: 8px 0;
    background: #ffffff;
    border: 1.5px solid #00a29a;
    border-radius: 4px;
    color: #00a29a;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
    line-height: 1.4;
    margin-top: auto;
}

.blog-btn-more svg {
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out;
}

.blog-btn-more:hover,
.blog-btn-more:focus {
    background: #00a29a;
    color: #ffffff;
    border-color: #00a29a;
    outline: none;
}

.blog-btn-more:hover svg,
.blog-btn-more:focus svg {
    stroke: #ffffff;
    transform: translateX(2px);
}

.blog-btn-more:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 162, 154, 0.3);
}


/* ============================================
   PAGINATION
   ============================================ */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 3rem;
}

.blog-pag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.blog-pag-btn:hover {
    border-color: #00a29a;
    color: #00a29a;
}

.blog-pag-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pag-num:hover {
    border-color: #00a29a;
    color: #00a29a;
}

.blog-pag-num.active {
    background: #00a29a;
    border-color: #00a29a;
    color: #ffffff;
}

.blog-pag-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #94a3b8;
    font-size: 0.8125rem;
}

/* ============================================
   "VER MÁS PUBLICACIONES" BUTTON — Contrast Fix
   ============================================ */
.blog-load-more {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-ver-mas {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: #00a29a;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.btn-ver-mas:hover,
.btn-ver-mas:focus,
.btn-ver-mas:focus-visible {
    color: #ffffff !important;
    background-color: #008b84 !important;
}

.btn-ver-mas:hover svg,
.btn-ver-mas:focus svg,
.btn-ver-mas:focus-visible svg {
    stroke: #ffffff !important;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.blog-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: #94a3b8;
}

.blog-empty svg {
    margin: 0 auto 1rem;
    opacity: 0.3;
}

.blog-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
}

.blog-empty p {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ============================================
   SKELETON LOADING PLACEHOLDERS
   ============================================ */
@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.skeleton {
    background: #e2e8f0;
    border-radius: 4px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.skeleton-card-image {
    height: 200px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-card-body {
    padding: 1.25rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.skeleton-line-sm {
    width: 40%;
    height: 10px;
}

.skeleton-line-md {
    width: 80%;
}

.skeleton-line-lg {
    width: 100%;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Admin skeleton table rows */
.skeleton-admin-row {
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-admin-thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    flex-shrink: 0;
}

.skeleton-admin-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================
   BLOG POST — PREMIUM CARD DESIGN
   Tarjeta contenedora elegante con tipografía jerarquizada
   ============================================ */
.blog-post-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.blog-post-container {
    max-width: 820px;
    margin: 0 auto;
}

/* Back Link */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
    opacity: 0;
    animation: blogFadeUp 0.4s ease 0.1s forwards;
}

.blog-back-link:hover {
    color: #00a29a;
}

/* ============================================
   .post-container-card — Premium card wrapper
   ============================================ */
.post-container-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.06);
    padding: 48px;
    opacity: 0;
    animation: blogFadeUp 0.55s ease 0.15s forwards;
}

/* Hero image inside card */
.post-card-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2.25rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.post-card-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #f0fdfa 100%);
}

/* ============================================
   .post-header-meta — Category badge, title, meta row
   ============================================ */
.post-header-meta {
    margin-bottom: 2rem;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 162, 154, 0.08);
    color: #00a29a;
    margin-bottom: 1rem;
}

/* Per-category badge colors */
.post-category-badge.cat-transparencia { background: rgba(5, 150, 105, 0.08); color: #059669; }
.post-category-badge.cat-periodismo    { background: rgba(59, 130, 246, 0.08); color: #2563eb; }
.post-category-badge.cat-legal         { background: rgba(217, 119, 6, 0.08);  color: #d97706; }
.post-category-badge.cat-acceso        { background: rgba(225, 29, 72, 0.08);  color: #e11d48; }
.post-category-badge.cat-opinion       { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
.post-category-badge.cat-economia      { background: rgba(8, 145, 178, 0.08);  color: #0891b2; }

.post-card-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.18;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0;
}

.post-meta-date {
    font-weight: 500;
}

.post-meta-sep {
    color: #cbd5e1;
    font-weight: 700;
}

.post-meta-author {
    font-weight: 600;
    color: #475569;
}

.post-meta-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 1.25rem 0 1.5rem 0;
}

.post-card-excerpt {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #475569;
    margin: 0;
}

/* ============================================
   .post-body-content — Body typography
   ============================================ */
.post-body-content {
    color: #334155;
}

.post-body-content .post-lead {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #1e293b;
    font-weight: 500;
    margin-bottom: 2rem;
}

.post-body-content p {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.0625rem !important;
    line-height: 1.75 !important;
    color: #334155 !important;
    margin-bottom: 1.5rem !important;
}

.post-body-content .post-body-text {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.0625rem !important;
    line-height: 1.75 !important;
    color: #334155 !important;
    margin-bottom: 1.5rem !important;
}

.post-body-content h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.625rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.post-body-content h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
}

.post-body-content strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.post-body-content .post-blockquote {
    font-family: Arial, Helvetica, sans-serif !important;
    border-left: 4px solid #00a29a !important;
    padding: 1rem 1.5rem !important;
    margin: 2rem 0 !important;
    background: rgba(0, 162, 154, 0.04) !important;
    font-style: italic !important;
    color: #475569 !important;
    font-size: 1.0625rem !important;
    line-height: 1.65 !important;
    border-radius: 0 6px 6px 0 !important;
}

.post-body-content ul,
.post-body-content ol {
    margin-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.0625rem !important;
    line-height: 1.75 !important;
    color: #334155 !important;
}

.post-body-content ul li,
.post-body-content ol li {
    margin-bottom: 0.375rem !important;
}

.post-body-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 2rem auto !important;
    display: block !important;
    border: 1px solid #f1f5f9 !important;
}

/* ============================================
   .post-card-footer — Author + CTA
   ============================================ */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    opacity: 0;
    animation: blogFadeUp 0.4s ease 0.45s forwards;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.post-card-author-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 162, 154, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a29a;
    flex-shrink: 0;
}

.post-card-author-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.post-card-author-role {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

.post-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #00a29a;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.post-card-cta:hover {
    background: #008b84;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ============================================
   RELATED ARTICLES
   ============================================ */
.blog-related {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
    opacity: 0;
    animation: blogFadeUp 0.4s ease 0.5s forwards;
}

.blog-related-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.blog-related-card {
    display: block;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: box-shadow 0.3s ease, border-left-color 0.3s ease, transform 0.25s ease;
}

.blog-related-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-left-color: #00a29a;
    transform: translateY(-1px);
}

.blog-related-card-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin: 0.625rem 0 0 0;
    transition: color 0.2s ease;
}

.blog-related-card:hover .blog-related-card-title {
    color: #00a29a;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: #00a29a;
    z-index: 100;
    transition: width 0.1s ease-out;
}

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

@media (max-width: 768px) {
    .blog-main {
        padding: 2rem 1rem 3rem;
    }

    .blog-header-title {
        font-size: 2rem;
    }

    .blog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-search {
        min-width: 100%;
    }

    .blog-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .blog-filters::-webkit-scrollbar {
        display: none;
    }

    /* Featured: stack vertically on mobile */
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured-image {
        min-height: 200px;
    }

    .blog-featured-body {
        padding: 1.5rem;
    }

    .blog-featured-title {
        font-size: 1.375rem;
    }

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

    /* Blog post responsive */
    .blog-post-main {
        padding: 1.5rem 1rem 3rem;
    }

    .post-container-card {
        padding: 28px 24px;
        border-radius: 12px;
    }

    .post-card-title {
        font-size: 1.75rem;
    }

    .post-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-header-title {
        font-size: 1.75rem;
    }

    .blog-featured-body {
        padding: 1.25rem;
    }

    .blog-card-body {
        padding: 1rem;
    }

    .post-card-title {
        font-size: 1.5rem;
    }

    .post-card-hero {
        border-radius: 8px;
    }

    .post-container-card {
        padding: 20px 16px;
    }
}

/* ============================================
   REDUCED MOTION — Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .blog-featured,
    .blog-card,
    .blog-card:active,
    .blog-back-link,
    .post-container-card,
    .post-card-footer,
    .blog-related {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .blog-card:hover,
    .blog-card-image img,
    .blog-btn-more,
    .blog-related-card,
    .btn-ver-mas,
    .blog-back-link,
    .post-card-cta {
        transition: none !important;
        transform: none !important;
    }

    .blog-card:hover .blog-card-image img {
        transform: none !important;
    }

    .blog-page-overlay {
        display: none !important;
    }
}

/* ============================================
   PAGE LOAD OVERLAY
   ============================================ */
.blog-page-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease 0.3s;
    pointer-events: none;
}

.blog-page-overlay.hidden {
    opacity: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .blog-toolbar,
    .blog-filters,
    .btn-ver-mas,
    .blog-load-more,
    .reading-progress,
    .blog-pagination {
        display: none !important;
    }

    .blog-featured,
    .blog-card,
    .blog-card:hover,
    .blog-back-link,
    .post-container-card,
    .post-card-footer,
    .blog-related {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        animation: none !important;
        opacity: 1 !important;
    }

    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .blog-featured {
        border: 1px solid #d1d5db !important;
    }

    body {
        background: #ffffff !important;
    }

    .blog-grid {
        display: block !important;
    }

    .blog-card + .blog-card {
        margin-top: 1rem;
    }

    /* Blog post page print */
    .post-card-cta,
    .blog-back-link,
    .blog-related,
    .reading-progress {
        display: none !important;
    }

    .post-card-hero {
        border: 1px solid #d1d5db !important;
        border-radius: 0 !important;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.7em;
        color: #6b7280;
    }
}

/* ============================================
   GALERÍA DE IMÁGENES — Premium Card Design
   ============================================ */
.galeria-post {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.galeria-post img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.galeria-post img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Responsive: mobile single column */
@media (max-width: 640px) {
    .galeria-post {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 400px) {
    .galeria-post {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================
   MODAL PERSONALIZADO — Lightbox Premium v2
   Glassmorphism panel + imagen con marco + botón elegante
   ============================================ */
.modal-custom {
    display: flex;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-custom.active {
    opacity: 1;
    pointer-events: auto;
}

/* Panel central — glassmorphism card */
.modal-custom-panel {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-custom.active .modal-custom-panel {
    transform: scale(1) translateY(0);
}

/* Contenedor flexible para imagen + footer */
.modal-custom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1;
    min-height: 0;
}

/* Wrapper de la imagen — marco con bordes redondeados */
.modal-custom-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 100%;
    max-height: calc(92vh - 100px);
}

.modal-custom-image-wrapper img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-custom.active .modal-custom-image-wrapper img {
    opacity: 1;
    transform: scale(1);
}

/* Footer del modal — botón centrado */
.modal-custom-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 0 4px 0;
    flex-shrink: 0;
}

/* Botón de cierre — circular, vidrio, esquina superior derecha del panel */
.modal-custom-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    z-index: 10;
}

.modal-custom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-custom-close:active {
    transform: scale(0.92);
}

/* Botón "Cerrar ventana" — premium pill con icono */
.modal-custom-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #1e293b;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.modal-custom-btn:hover {
    background: #ffffff;
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.modal-custom-btn:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.modal-custom-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   ENLACES EXTERNOS — Frontend (blog-post.php)
   ═══════════════════════════════════════════════ */

.post-enlaces-externos {
    margin: 2rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.post-enlaces-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem 0;
}

.post-enlaces-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-enlaces-list li {
    margin: 0;
    padding: 0;
}

.post-enlace-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #00a29a;
    text-decoration: none;
    padding: 0.375rem 0;
    transition: color 0.15s ease, gap 0.15s ease;
}

.post-enlace-link:hover {
    color: #00796b;
    gap: 0.625rem;
}

.post-enlace-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.post-enlace-link:hover svg {
    opacity: 1;
}

.post-enlace-link span {
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.post-enlace-link:hover span {
    border-bottom-color: currentColor;
}
