/* =========================================================
   POMOSDA — SECTION 13 + 14 FINAL R1.1 STRUCTURE FIX
   Fixes R1 auto-detection mistakes in Section 13.
   ========================================================= */

/* Never let Biaya & Beasiswa behave like a gallery heading */
.s1314-r1-section13
.s1314-scholarship-card.s1314-gallery-title,
.s1314-r1-section13
.s1314-benefit-card.s1314-gallery-title,
.s1314-r1-section13
.s1314-r11-wrong-gallery-title {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: left !important;
}

/* Remove R1 pseudo eyebrow from wrongly-tagged scholarship title */
.s1314-r1-section13
.s1314-r11-wrong-gallery-title::before,
.s1314-r1-section13
.s1314-scholarship-card .s1314-r11-wrong-gallery-title::before {
    content: none !important;
    display: none !important;
}

/* A clean deterministic scholarship wrapper */
.s1314-r1-section13 .s1314-r11-scholarship-grid {
    position: relative;
    z-index: 3;
    display: grid !important;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
    gap: 28px !important;
    width: min(1180px, calc(100% - 40px)) !important;
    margin: 54px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Disable the oversized auto-detected R1 wrapper */
.s1314-r1-section13 .s1314-scholarship-wrap.s1314-r11-old-wrapper {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.s1314-r1-section13
.s1314-scholarship-wrap.s1314-r11-old-wrapper::before,
.s1314-r1-section13
.s1314-scholarship-wrap.s1314-r11-old-wrapper::after {
    content: none !important;
    display: none !important;
}

/* Restore cards to balanced proportions */
.s1314-r1-section13 .s1314-scholarship-card,
.s1314-r1-section13 .s1314-benefit-card {
    min-height: 300px !important;
    height: 100% !important;
    padding: clamp(30px, 3vw, 42px) !important;
}

.s1314-r1-section13 .s1314-scholarship-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.s1314-r1-section13 .s1314-benefit-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
}

/* Keep the inner two benefit rows as rows, not giant nested cards */
.s1314-r1-section13 .s1314-benefit-card > * {
    max-width: 100% !important;
}

.s1314-r1-section13 .s1314-benefit-card > * + * {
    margin-top: 0 !important;
}

/* Gallery stays flush/full width with no fake heading spacing */
.s1314-r1-section13 .s1314-gallery {
    margin-top: 0 !important;
}

.s1314-r1-section13.s1314-r11-no-gallery-title .s1314-gallery {
    margin-top: 0 !important;
}

/* If R1 animated the wrong title, neutralize it */
.s1314-r1-section13 .s1314-r11-wrong-gallery-title {
    opacity: 1 !important;
    translate: 0 !important;
}

/* Section 14 remains integrated, just ensure no accidental gap */
.s1314-r1-section14 {
    margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 820px) {
    .s1314-r1-section13 .s1314-r11-scholarship-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: min(100% - 24px, 680px) !important;
        margin-top: 34px !important;
    }

    .s1314-r1-section13 .s1314-scholarship-card,
    .s1314-r1-section13 .s1314-benefit-card {
        min-height: 0 !important;
    }
}
