/*
 * [B] Elementor Blog Grid - Base Styles
 * Structural Flex/Grid definitions. Colors and Typography controlled via Elementor.
 */

.bdw-ebg-wrapper {
    position: relative;
    width: 100%;
}

/* Loading Overlay */
.bdw-ebg-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    backdrop-filter: blur(2px);
}

.bdw-ebg-spinner {
    width: 40px; height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #0f4aab; /* Fallback Baqueiro Blue */
    border-radius: 50%;
    animation: bdw-spin 1s linear infinite;
}

@keyframes bdw-spin {
    to { transform: rotate(360deg); }
}

/* Grid Layout */
.bdw-ebg-grid {
    display: grid;
    /* Grid columns fallback, overridden by Elementor responsive settings */
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.bdw-ebg-post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.bdw-ebg-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.bdw-ebg-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.bdw-ebg-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bdw-ebg-post-card:hover .bdw-ebg-card-img img {
    transform: scale(1.05);
}

.bdw-ebg-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1;
}

.bdw-ebg-placeholder svg { width: 48px; height: 48px; }

.bdw-ebg-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bdw-ebg-card-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
}

.bdw-ebg-cat-badge {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f4aab; background: rgba(15, 74, 171, 0.1);
    padding: 4px 10px; border-radius: 3px;
}

.bdw-ebg-meta-date { font-size: 0.8rem; color: #64748b; }
.bdw-ebg-meta-dot { width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; }

.bdw-ebg-card-title {
    font-size: 1.15rem; font-weight: 700; line-height: 1.3;
    margin: 0 0 10px 0; color: #1e293b;
}

.bdw-ebg-card-excerpt {
    font-size: 0.9rem; color: #475569; line-height: 1.6;
    margin: 0 0 20px 0;
}

.bdw-ebg-card-footer {
    margin-top: auto;
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 16px; border-top: 1px solid #f1f5f9;
}

.bdw-ebg-author-info { display: flex; align-items: center; gap: 10px; }

.bdw-ebg-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: #0f4aab; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800;
}

.bdw-ebg-author-name { font-size: 0.8rem; font-weight: 600; color: #475569; }

.bdw-ebg-arrow-link {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid #e5e7eb; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}

.bdw-ebg-post-card:hover .bdw-ebg-arrow-link {
    background: #0f4aab; color: #fff; border-color: #0f4aab;
}

/* Pagination */
.bdw-ebg-pagination-wrap { margin-top: 40px; display: flex; justify-content: center; }
.bdw-ebg-pagination-wrap ul.page-numbers { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
.bdw-ebg-pagination-wrap a.page-numbers, .bdw-ebg-pagination-wrap span.page-numbers {
    display: flex; align-items: center; justify-content: center;
    height: 40px; min-width: 40px; padding: 0 12px;
    border-radius: 6px; border: 1px solid #e5e7eb;
    font-size: 0.9rem; font-weight: 600; color: #475569; text-decoration: none;
    transition: all 0.2s ease;
}
.bdw-ebg-pagination-wrap a.page-numbers:hover { border-color: #0f4aab; color: #0f4aab; }
.bdw-ebg-pagination-wrap span.current { background: #0f4aab; color: #fff; border-color: #0f4aab; }
