/* =========================================================
   Astra Latest Posts – Front-end Styles
   Brand: navy #042C53 | blue #185FA5 | light #E6F1FB | muted #85B7EB
   ========================================================= */

/* ── Kill Elementor flex context on the widget container ─────────────────── */
.elementor-widget-astra_latest_posts .elementor-widget-container {
    display: block !important;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.plp-wrapper {
    box-sizing: border-box;
    display: block !important;
    width: 100%;
    background: #F4F8FD;
    padding: 80px 40px;
    font-family: 'Inter', sans-serif;
}

/* ── Section Header ──────────────────────────────────────────────────────── */
.plp-header {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 52px;
    float: none !important;
    clear: both;
}

.plp-eyebrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #185FA5;
    margin-bottom: 12px;
    width: 100%;
}
.plp-eyebrow::after {
    content: '';
    display: inline-block;
    width: 32px;
    height: 2px;
    background: #185FA5;
    border-radius: 2px;
    flex-shrink: 0;
}

.plp-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    color: #042C53;
    line-height: 1.2;
    margin: 0 0 12px !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    float: none !important;
}

.plp-section-subtitle {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.7;
    margin: 0 auto !important;
    max-width: 560px;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    float: none !important;
}

/* ── Footer / View All Button ────────────────────────────────────────────── */
.plp-footer {
    display: block !important;
    text-align: center;
    margin-top: 48px;
    width: 100%;
    clear: both;
}

.plp-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #185FA5;
    border: 2px solid #185FA5;
    border-radius: 8px;
    padding: 13px 32px;
    text-decoration: none;
    transition: background 0.22s ease, color 0.22s ease, gap 0.2s ease;
}
.plp-view-all-btn:hover {
    background: #185FA5;
    color: #ffffff;
    gap: 12px;
}
.plp-view-all-btn svg { transition: transform 0.2s ease; }
.plp-view-all-btn:hover svg { transform: translateX(3px); }

/* ── GRID Layout ─────────────────────────────────────────────────────────── */
.plp-grid {
    display: grid;
    gap: 28px;
}
.plp-cols-1 { grid-template-columns: 1fr; }
.plp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.plp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.plp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── LIST Layout ─────────────────────────────────────────────────────────── */
.plp-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.plp-card--list {
    flex-direction: row !important;
    align-items: stretch;
}
.plp-card--list .plp-thumb-link { flex: 0 0 280px; }
.plp-card--list .plp-thumb      { height: 100% !important; min-height: 200px; }
.plp-card--list .plp-card-body  { flex: 1; }

/* ── MASONRY / Featured Layout ───────────────────────────────────────────── */
.plp-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 28px;
}
.plp-card--featured {
    grid-column: 1 / 3;
    flex-direction: row !important;
    align-items: stretch;
}
.plp-card--featured .plp-thumb-link { flex: 0 0 55%; }
.plp-card--featured .plp-thumb      { height: 100% !important; min-height: 280px; }
.plp-card--featured .plp-card-body  { flex: 1; padding: 36px 32px !important; }
.plp-card--featured .plp-card-title { font-size: clamp(20px, 2.5vw, 28px); }

/* ── Card Base ───────────────────────────────────────────────────────────── */
.plp-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 0 2px 12px rgba(4, 44, 83, 0.07);
}
.plp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(4, 44, 83, 0.14);
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */
.plp-thumb-link { display: block; overflow: hidden; }
.plp-thumb {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #E6F1FB;
}
.plp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.plp-card:hover .plp-thumb img { transform: scale(1.05); }

/* ── Category Badge ──────────────────────────────────────────────────────── */
.plp-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #185FA5;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 2;
    transition: background 0.2s ease;
}
.plp-badge:hover { background: #042C53; color: #fff; }
.plp-badge--inline {
    position: static;
    display: inline-block;
    margin: 20px 0 0 24px;
}

/* ── Card Body ───────────────────────────────────────────────────────────── */
.plp-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Meta ────────────────────────────────────────────────────────────────── */
.plp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    font-weight: 500;
    color: #85B7EB;
    margin-bottom: 12px;
}
.plp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.plp-meta-icon {
    color: #185FA5;
    flex-shrink: 0;
}

/* ── Post Title ──────────────────────────────────────────────────────────── */
.plp-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    padding: 0;
    color: #042C53;
}
.plp-card-title a {
    color: #042C53;
    text-decoration: none;
    transition: color 0.2s ease;
}
.plp-card-title a:hover { color: #185FA5; }

/* ── Excerpt ─────────────────────────────────────────────────────────────── */
.plp-excerpt {
    font-size: 14.5px;
    line-height: 1.7;
    color: #4a5568;
    margin: 0 0 22px;
    flex: 1;
}

/* ── Read More Button ────────────────────────────────────────────────────── */
.plp-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #185FA5;
    border: 1.5px solid #185FA5;
    border-radius: 6px;
    padding: 9px 18px;
    text-decoration: none;
    transition: background 0.22s ease, color 0.22s ease, gap 0.2s ease;
    align-self: flex-start;
    margin-top: auto;
}
.plp-btn:hover {
    background: #185FA5;
    color: #ffffff;
    gap: 11px;
}
.plp-btn svg { transition: transform 0.2s ease; }
.plp-btn:hover svg { transform: translateX(2px); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .plp-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .plp-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .plp-masonry { grid-template-columns: repeat(2, 1fr); }
    .plp-card--featured { grid-column: 1 / 3; }
}

@media (max-width: 768px) {
    .plp-wrapper { padding: 60px 20px; }
    .plp-header  { flex-direction: column; align-items: flex-start; }
    .plp-cols-2,
    .plp-cols-3,
    .plp-cols-4  { grid-template-columns: 1fr; }
    .plp-masonry { grid-template-columns: 1fr; }
    .plp-card--featured,
    .plp-card--list { flex-direction: column !important; }
    .plp-card--featured .plp-thumb-link,
    .plp-card--list .plp-thumb-link { flex: none; width: 100%; }
    .plp-card--featured .plp-thumb,
    .plp-card--list .plp-thumb { height: 220px !important; }
}

/* ── Stacked Header Layout ───────────────────────────────────────────────── */
.plp-header-stacked .plp-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.plp-header-stacked .plp-header-left {
    text-align: center;
}
.plp-header-stacked .plp-eyebrow {
    justify-content: center;
}
.plp-header-stacked .plp-section-subtitle {
    margin-left: auto;
    margin-right: auto;
}
