/* ===== Resources & Media — Hero (single image) ===== */
.rhero {
    position: relative;
    width: 100%;
    height: 804px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
}

/* Rectangle 51 : gradient overlay (transparent -> black) */
.rhero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.rhero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 30px 120px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rhero__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 40px;
    line-height: 60px;
    color: #CF8E00;
}

.rhero__desc {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    color: #FFFFFF;
}

/* ===== Resources intro header (Frame 216) ===== */
.rintro {
    width: 100%;
    background: #FFFFFF;
    padding: 60px 0 40px;
    display: flex;
    justify-content: center;
}

/* tighter top padding when a header follows the filter bar */
.rintro--tight { padding-top: 34px; }

.rintro__inner {
    width: 1380px;
    max-width: calc(100% - 60px);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
}

.rintro__bar {
    flex: none;
    width: 6px;
    min-height: 90px;
    border-radius: 3px;
    background: linear-gradient(180deg, #CF8E00 0%, #064700 100%);
}

.rintro__text {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rintro__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 48px;
    line-height: 72px;
    text-transform: uppercase;
    color: #363636;
}

.rintro__desc {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    text-align: justify;
    color: #363636;
}

/* ===== Filter pills (Frame 258) ===== */
.rfilter {
    width: 100%;
    background: #FFFFFF;
    padding: 6px 0 24px;
    display: flex;
    justify-content: center;
}

.rfilter__inner {
    width: 1380px;
    max-width: calc(100% - 60px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rfilter__pill {
    flex: none;
    height: 60px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 35px;
    background: rgba(6, 71, 0, 0.1);
    color: rgba(6, 71, 0, 0.75);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 27px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.rfilter__pill:hover {
    background: rgba(6, 71, 0, 0.16);
}

.rfilter__pill.is-active {
    background: #CF8E00;
    color: #FFFFFF;
}

/* ===== Our Stories cards — masonry (Frame 259) ===== */
.rstories-section {
    width: 100%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 80px;
}

/* JS distributes cards left-to-right into these flex columns (row-major),
   matching the Figma order. Pre-JS it degrades to a simple wrapped grid. */
.rstories {
    width: 1380px;
    max-width: calc(100% - 60px);
    display: flex;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.rstories__col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.rcard {
    flex: 1 1 360px;
    max-width: 440px;
    background: #FFFFFF;
    box-shadow: 0 0 8px 3px rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 18px;
}

/* once JS builds the columns, cards fill their column */
.rstories__col .rcard {
    flex: none;
    max-width: none;
    width: 100%;
}

.rcard__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 13px;
}

.rcard__body {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rcard__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #363636;
}

.rcard__desc {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    text-align: justify;
    color: #363636;
}

.rstories__empty {
    margin: 20px 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: rgba(6, 71, 0, 0.6);
}

/* ===== Projects Spotlight — uniform 3-column grid (Frame 305) ===== */
.rspot-section {
    width: 100%;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    padding: 10px 0 80px;
}

.rspot {
    width: 1380px;
    max-width: calc(100% - 60px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.rspot__card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    box-shadow: 0 0 8px 3px rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    padding: 18px;
}

.rspot__img {
    display: block;
    width: 100%;
    aspect-ratio: 408 / 402;
    object-fit: cover;
    border-radius: 13px;
}

.rspot__body {
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rspot__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #363636;
}

.rspot__desc {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    text-align: justify;
    color: #363636;
}

/* ===== Gallery grid (Rectangle 114…) + bottom fade (Rectangle 120) ===== */
.rgallery-section {
    position: relative;
    width: 100%;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    padding: 10px 0 60px;
}

.rgallery {
    width: 1380px;
    max-width: calc(100% - 60px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.rgallery__img {
    display: block;
    width: 100%;
    aspect-ratio: 397 / 384;
    object-fit: cover;
}

/* white gradient fading the bottom of the gallery into the page */
.rgallery__fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 176px;
    background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .rhero { height: 640px; }
    .rhero__content { padding: 0 26px 90px; }
    .rhero__title { font-size: 34px; line-height: 48px; }
    .rintro__title { font-size: 38px; line-height: 56px; }
}

@media (max-width: 768px) {
    .rhero { height: 520px; }
    .rhero__content { padding: 0 22px 64px; }
    .rhero__title { font-size: 28px; line-height: 38px; }
    .rhero__desc { font-size: 16px; line-height: 24px; }
    .rintro { padding: 44px 0 32px; }
    .rintro__title { font-size: 30px; line-height: 44px; }
    .rintro__desc { font-size: 17px; line-height: 26px; }
    .rfilter__pill { height: 52px; padding: 0 20px; font-size: 16px; }
}

@media (max-width: 1000px) {
    .rstories { gap: 24px; }
    .rstories__col { gap: 24px; }
}

@media (max-width: 1000px) {
    .rspot { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .rgallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .rstories-section { padding: 6px 0 50px; }
    .rcard { padding: 14px; }
    .rcard__desc { text-align: left; }
    .rspot-section { padding: 6px 0 50px; }
    .rspot { grid-template-columns: 1fr; }
    .rspot__card { padding: 14px; }
    .rspot__desc { text-align: left; }
    .rgallery { gap: 8px; }
}

@media (max-width: 480px) {
    .rhero { height: 420px; }
    .rhero__content { padding: 0 16px 44px; }
    .rhero__title { font-size: 23px; line-height: 32px; }
    .rhero__desc { font-size: 14px; line-height: 21px; }
    .rintro__title { font-size: 24px; line-height: 34px; }
    .rintro__desc { font-size: 15px; line-height: 23px; text-align: left; }
}
