/* ── UXD Blog Posts Widget ───────────────────────────────────── */

:root {
    --uxdbp-navy:   #0d1b40;
    --uxdbp-red:    #b51e23;
    --uxdbp-gold:   #f0a500;
    --uxdbp-txt:    #444;
    --uxdbp-radius: 12px;
}

/* ── Grid ───────────────────────────────────────────────────── */
.uxdwfebp-grid {
    display: grid;
    gap: 24px;
}

.uxdwfebp-cols-1 { grid-template-columns: 1fr; }
.uxdwfebp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.uxdwfebp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.uxdwfebp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Shared ─────────────────────────────────────────────────── */
.uxdwfebp-card {
    display: flex;
    flex-direction: column;
}

/* Category badge (shared) */
.uxdwfebp-badge {
    display: inline-block;
    background: var(--uxdbp-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 3px 11px;
    border-radius: 999px;
    line-height: 1.5;
}

/* Meta row (shared) */
.uxdwfebp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.74rem;
}

.uxdwfebp-date      { font-weight: 600; color: var(--uxdbp-red); }
.uxdwfebp-read-time { color: #aaa; }
.uxdwfebp-author    { color: #aaa; }

/* Title (shared) */
.uxdwfebp-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}

.uxdwfebp-title a {
    color: var(--uxdbp-navy);
    text-decoration: none;
    transition: color 0.2s ease;
}

.uxdwfebp-title a:hover { color: var(--uxdbp-red); }

/* Excerpt (shared) */
.uxdwfebp-excerpt {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--uxdbp-txt);
    margin: 0 0 14px;
}

/* Read More link (shared) */
.uxdwfebp-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--uxdbp-red);
    transition: gap 0.2s ease, color 0.2s ease;
    margin-top: auto;
}

.uxdwfebp-more:hover { gap: 10px; }

.uxdwfebp-arrow {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.uxdwfebp-more:hover .uxdwfebp-arrow { transform: translateX(3px); }

/* Image wrap (shared) */
.uxdwfebp-img-wrap {
    position: relative;
    overflow: hidden;
}

.uxdwfebp-img-wrap a { display: block; }

.uxdwfebp-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.uxdwfebp-img-wrap .uxdwfebp-badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

/* Body content area */
.uxdwfebp-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}


/* ═══════════════════════════════════════════════════════════════
   STYLE 1 – CFC (matches index.html blog card)
═══════════════════════════════════════════════════════════════ */

.uxdwfebp-style-cfc .uxdwfebp-cfc-card {
    background: #fff;
    border-radius: var(--uxdbp-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.uxdwfebp-style-cfc .uxdwfebp-cfc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.uxdwfebp-style-cfc .uxdwfebp-img-wrap img {
    border-radius: 0;
}

.uxdwfebp-style-cfc .uxdwfebp-cfc-card:hover .uxdwfebp-img-wrap img {
    transform: scale(1.05);
}

.uxdwfebp-style-cfc .uxdwfebp-title {
    font-size: 0.96rem;
}


/* ═══════════════════════════════════════════════════════════════
   STYLE 2 – Image Overlay
═══════════════════════════════════════════════════════════════ */

.uxdwfebp-style-overlay .uxdwfebp-overlay-card {
    position: relative;
    border-radius: var(--uxdbp-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #1a2a50;
    cursor: pointer;
}

.uxdwfebp-overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.uxdwfebp-style-overlay .uxdwfebp-overlay-card:hover .uxdwfebp-overlay-img {
    transform: scale(1.07);
}

/* Full-card click link */
.uxdwfebp-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Gradient overlay */
.uxdwfebp-overlay-body {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,27,64,0.92) 0%, rgba(13,27,64,0.15) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px;
    z-index: 2;
    pointer-events: none;
    transition: background 0.35s ease;
}

.uxdwfebp-style-overlay .uxdwfebp-overlay-card:hover .uxdwfebp-overlay-body {
    background: linear-gradient(to top, rgba(181,30,35,0.88) 0%, rgba(13,27,64,0.2) 60%, transparent 100%);
}

/* Allow links inside overlay-body to be clickable */
.uxdwfebp-overlay-body a { pointer-events: auto; }

/* Badge for overlay */
.uxdwfebp-badge--overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
}

.uxdwfebp-style-overlay .uxdwfebp-meta { color: rgba(255,255,255,0.7); }
.uxdwfebp-style-overlay .uxdwfebp-date { color: rgba(255,255,255,0.85); }
.uxdwfebp-style-overlay .uxdwfebp-read-time { color: rgba(255,255,255,0.55); }

.uxdwfebp-style-overlay .uxdwfebp-title a {
    color: #fff;
}

.uxdwfebp-style-overlay .uxdwfebp-title a:hover {
    color: rgba(255,255,255,0.85);
}

.uxdwfebp-style-overlay .uxdwfebp-excerpt {
    color: rgba(255,255,255,0.75);
}

.uxdwfebp-more--overlay {
    color: #fff;
}

.uxdwfebp-more--overlay:hover { color: rgba(255,255,255,0.8); }


/* ═══════════════════════════════════════════════════════════════
   STYLE 3 – Horizontal Card
═══════════════════════════════════════════════════════════════ */

.uxdwfebp-style-horizontal .uxdwfebp-horiz-card {
    background: #fff;
    border-radius: var(--uxdbp-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    flex-direction: row;
    align-items: stretch;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.uxdwfebp-style-horizontal .uxdwfebp-horiz-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.11);
    transform: translateY(-3px);
}

/* Thumbnail column */
.uxdwfebp-horiz-thumb {
    position: relative;
    flex-shrink: 0;
    width: 40%;
    overflow: hidden;
    display: block;
}

.uxdwfebp-horiz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.uxdwfebp-style-horizontal .uxdwfebp-horiz-card:hover .uxdwfebp-horiz-thumb img {
    transform: scale(1.06);
}

.uxdwfebp-horiz-thumb .uxdwfebp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.uxdwfebp-style-horizontal .uxdwfebp-body {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

/* 1-column horizontal: let it be full width, still side-by-side */
.uxdwfebp-cols-1.uxdwfebp-style-horizontal .uxdwfebp-horiz-thumb {
    width: 35%;
}


/* ═══════════════════════════════════════════════════════════════
   STYLE 4 – Minimal / Editorial
═══════════════════════════════════════════════════════════════ */

.uxdwfebp-style-minimal .uxdwfebp-minimal-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
}

/* Thumbnail — full-width, no card chrome */
.uxdwfebp-minimal-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 14px;
}

.uxdwfebp-minimal-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.uxdwfebp-style-minimal .uxdwfebp-minimal-card:hover .uxdwfebp-minimal-thumb img {
    transform: scale(1.04);
}

/* Badge variant for minimal — no absolute positioning */
.uxdwfebp-badge--minimal {
    margin-bottom: 10px;
}

.uxdwfebp-style-minimal .uxdwfebp-meta {
    margin-bottom: 6px;
}

.uxdwfebp-style-minimal .uxdwfebp-title {
    font-size: 1.05rem;
    border-left: 3px solid var(--uxdbp-red);
    padding-left: 10px;
}

.uxdwfebp-style-minimal .uxdwfebp-title a { color: var(--uxdbp-navy); }
.uxdwfebp-style-minimal .uxdwfebp-title a:hover { color: var(--uxdbp-red); }

/* Last card: remove bottom border */
.uxdwfebp-style-minimal .uxdwfebp-minimal-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════
   STYLE 5 – Dark Card
═══════════════════════════════════════════════════════════════ */

.uxdwfebp-style-dark .uxdwfebp-dark-card {
    background: var(--uxdbp-navy);
    border-radius: var(--uxdbp-radius);
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease;
}

.uxdwfebp-style-dark .uxdwfebp-dark-card:hover {
    background: #162248;
    transform: translateY(-5px);
}

/* Image inside dark card */
.uxdwfebp-dark-img {
    margin: 0;
    border-radius: 0;
}

.uxdwfebp-dark-img img {
    border-radius: 0;
}

.uxdwfebp-style-dark .uxdwfebp-dark-card:hover .uxdwfebp-dark-img img {
    transform: scale(1.05);
}

.uxdwfebp-style-dark .uxdwfebp-body {
    padding: 20px;
}

.uxdwfebp-style-dark .uxdwfebp-meta     { color: rgba(255,255,255,0.5); }
.uxdwfebp-style-dark .uxdwfebp-date     { color: var(--uxdbp-gold); }
.uxdwfebp-style-dark .uxdwfebp-read-time { color: rgba(255,255,255,0.4); }

.uxdwfebp-style-dark .uxdwfebp-title a  { color: #fff; }
.uxdwfebp-style-dark .uxdwfebp-title a:hover { color: var(--uxdbp-gold); }

.uxdwfebp-style-dark .uxdwfebp-excerpt  { color: rgba(255,255,255,0.6); }

.uxdwfebp-style-dark .uxdwfebp-more     { color: var(--uxdbp-gold); }
.uxdwfebp-style-dark .uxdwfebp-more:hover { color: #fff; }

.uxdwfebp-style-dark .uxdwfebp-badge    { background: var(--uxdbp-gold); color: var(--uxdbp-navy); }


/* ── Pagination ──────────────────────────────────────────────── */
.uxdwfe-blog-pagination {
    margin-top: 40px;
}

.uxdwfe-blog-pagination a,
.uxdwfe-blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0 3px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: var(--uxdbp-navy);
    transition: background 0.2s ease, color 0.2s ease;
    border: 1px solid #e0e0e0;
}

.uxdwfe-blog-pagination a:hover,
.uxdwfe-blog-pagination .current {
    background: var(--uxdbp-red);
    color: #fff;
    border-color: var(--uxdbp-red);
}

.uxdwfe-pagination-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.uxdwfe-pagination-prev,
.uxdwfe-pagination-next {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: var(--uxdbp-navy);
    border: 1px solid #e0e0e0;
    transition: background 0.2s ease, color 0.2s ease;
}

.uxdwfe-pagination-prev:hover,
.uxdwfe-pagination-next:hover {
    background: var(--uxdbp-red);
    color: #fff;
    border-color: var(--uxdbp-red);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .uxdwfebp-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .uxdwfebp-cols-3,
    .uxdwfebp-cols-4 { grid-template-columns: repeat(2, 1fr); }

    /* Horizontal: stack on mobile */
    .uxdwfebp-style-horizontal .uxdwfebp-horiz-card {
        flex-direction: column;
    }
    .uxdwfebp-horiz-thumb {
        width: 100% !important;
        max-height: 200px;
    }
    .uxdwfebp-horiz-thumb img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .uxdwfebp-cols-2,
    .uxdwfebp-cols-3,
    .uxdwfebp-cols-4 { grid-template-columns: 1fr; }
}
