/* ==========================================================
   People Also Planned
   ========================================================== */

   .ewbr-module {
    margin: 40px 0;
    padding: 24px;
    background: #faf9f6;
    border: 1px solid #ece8df;
    border-radius: 12px;
    clear:both;
    float: right;
    max-width: 730px;
}

.ewbr-header {
    margin-bottom: 20px;
}

.ewbr-title {
    margin: 0 0 6px;
    
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.ewbr-header h3 {
    margin-top:0px;
}

.ewbr-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.ewbr-debug {
    margin: 0 0 16px;
    font-size: 12px;
    color: #999;
}

/* ==========================================================
   Grid
   ========================================================== */

.ewbr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* ==========================================================
   Card
   ========================================================== */

.ewbr-card {
    display: flex;
    flex-direction: column;
}

.ewbr-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-bottom:none !important;
}

.ewbr-card-image-wrap {
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #f3f3f3;
}

.ewbr-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform .25s ease;
}

.ewbr-card:hover .ewbr-card-image {
    transform: scale(1.03);
}

.ewbr-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.ewbr-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #777;
}

.ewbr-card-meta-item {
    margin-top:5px;
    white-space: nowrap;
}

.ewbr-card-debug {
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

.ewbr-card-body h4 {
    font-size:0.9em;
    font-weight: 600;
    line-height:1.2em;
}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 1024px) {

    .ewbr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {

    .ewbr-module {
        padding: 18px;
    }

    .ewbr-grid {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
    }

    .ewbr-card {
        flex: 0 0 75%;
        scroll-snap-align: start;
    }

    .ewbr-grid::-webkit-scrollbar {
        display: none;
    }

}

@media (max-width: 640px) {

    .ewbr-card {
        flex: 0 0 55%;
        scroll-snap-align: start;
    }

    .ewbr-card-image {
        aspect-ratio: 1 / 1.25;
    }

}

/* ==========================================================
   V2 editorial preview — administrators only
   The PHP adds .ewbr-module--v2 only for manage_options users.
   Public visitors continue to see the original module.
   ========================================================== */

.ewbr-module--v2 {
    float: none;
    clear: both;
    width: 100%;
    max-width: 780px;
    margin: 58px auto 54px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.ewbr-module--v2 .ewbr-header {
    position: relative;
    margin: 0 0 30px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--ew-border-soft, #efeee9);
}

.ewbr-module--v2 .ewbr-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--ew-green, #183a2a);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ewbr-module--v2 .ewbr-eyebrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ew-stone, #e8e5de);
    border-radius: 50%;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0;
}

.ewbr-module--v2 .ewbr-title {
    margin: 0 0 6px;
    color: var(--ew-ink, #242521);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.06;
    font-weight: 500;
    letter-spacing: -.025em;
}

.ewbr-module--v2 .ewbr-subtitle {
    margin: 0;
    color: var(--ew-muted, #6f726c);
    font-size: 14px;
    line-height: 1.45;
}

.ewbr-module--v2 .ewbr-debug {
    display: none !important;
}

.ewbr-module--v2 .ewbr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.ewbr-module--v2 .ewbr-card {
    min-width: 0;
}

.ewbr-module--v2 .ewbr-card-image-wrap {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    background: var(--ew-warm-white, #faf9f6);
    border-radius: 0;
}

.ewbr-module--v2 .ewbr-card-image {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.ewbr-module--v2 .ewbr-planned-badge {
    position: absolute;
    z-index: 2;
    left: 8px;
    top: 8px;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
    background: rgba(250, 249, 246, .94);
    color: var(--ew-green, #183a2a);
    font-size: 10px;
    line-height: 1.1;
    font-weight: 700;
    white-space: nowrap;
}

.ewbr-module--v2 .ewbr-card-title,
.ewbr-module--v2 .ewbr-card-body h4 {
    margin: 0 0 9px;
    color: var(--ew-ink, #242521);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -.015em;
}

.ewbr-module--v2 .ewbr-card-meta {
    gap: 0;
    color: var(--ew-muted, #6f726c);
    font-size: 11px;
    line-height: 1.35;
}

.ewbr-module--v2 .ewbr-card-meta-item {
    margin-top: 0;
}

.ewbr-module--v2 .ewbr-card-meta-item + .ewbr-card-meta-item::before {
    content: "·";
    margin: 0 7px;
    color: var(--ew-soft, #8b8d87);
}

.ewbr-module--v2 .ewbr-card-debug {
    display: none !important;
}

@media (max-width: 1024px) {
    .ewbr-module--v2 .ewbr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ewbr-module--v2 {
        float: none;
        max-width: none;
        margin: 46px 0;
        padding: 0;
    }

    .ewbr-module--v2 .ewbr-header {
        margin-bottom: 18px;
        padding-bottom: 15px;
    }

    .ewbr-module--v2 .ewbr-title {
        font-size: 28px;
    }

    .ewbr-module--v2 .ewbr-grid {
        display: flex;
        gap: 14px;
        margin-right: -18px;
        padding: 0 18px 10px 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .ewbr-module--v2 .ewbr-card {
        flex: 0 0 68%;
        scroll-snap-align: start;
    }

    .ewbr-module--v2 .ewbr-card-image {
        aspect-ratio: 4 / 5;
    }

    .ewbr-module--v2 .ewbr-card-title,
    .ewbr-module--v2 .ewbr-card-body h4 {
        font-size: 16px;
    }
}
