/* Home page body, layout option A. Colours follow the header (header-rb.css). */
.rb-home {
    --rb-navy: #0b3d7a;
    --rb-blue: #1a5dab;
    --rb-orange: #f28c1b;
    --rb-orange-dark: #d9531a;
    --rb-ink: #1f2d3d;
    --rb-muted: #5b6b80;
    --rb-line: #dfe5ee;
    --rb-soft: #f4f7fb;
    --rb-tag-bg: #fdebd5;
    --rb-tag-ink: #9a4a0b;
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    color: var(--rb-ink);
    background: #fff;
    padding: 22px 0 40px;
}
.rb-home *, .rb-home *::before, .rb-home *::after { box-sizing: border-box; }
.rb-home a { text-decoration: none; }
.rb-home-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Carousel: same place, shorter (banner ratio kept, nothing cropped) */
.rb-carousel { border-radius: 12px; overflow: hidden; background: var(--rb-navy); }
.rb-carousel .carousel-item img { width: 100%; height: auto; aspect-ratio: 1286 / 339; object-fit: cover; display: block; }
.rb-carousel .carousel-indicators { margin-bottom: 8px; }
.rb-carousel .carousel-indicators li { width: 22px; height: 4px; border-radius: 2px; border: 0; background: rgba(255, 255, 255, .55); transition: background .2s, width .2s; }
.rb-carousel .carousel-indicators li:hover { background: #fff; }
.rb-carousel .carousel-indicators .active { width: 34px; background: var(--rb-orange); }
.rb-carousel .carousel-control-prev,
.rb-carousel .carousel-control-next { width: 46px; opacity: 0; transition: opacity .2s; }
.rb-carousel:hover .carousel-control-prev,
.rb-carousel:hover .carousel-control-next,
.rb-carousel .carousel-control-prev:focus-visible,
.rb-carousel .carousel-control-next:focus-visible { opacity: 1; }
.rb-carousel .carousel-control-prev-icon,
.rb-carousel .carousel-control-next-icon {
    width: 34px; height: 34px; border-radius: 50%; background-color: rgba(11, 61, 122, .65); background-size: 45%;
    transition: background-color .2s, transform .2s;
}
.rb-carousel .carousel-control-prev:hover .carousel-control-prev-icon,
.rb-carousel .carousel-control-next:hover .carousel-control-next-icon { background-color: var(--rb-orange); transform: scale(1.08); }

/* Section heading */
.rb-section { margin-top: 30px; }
.rb-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rb-section-head h2 {
    display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 700; color: var(--rb-navy);
    font-family: inherit; line-height: 1.3;
}
.rb-section-head h2::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--rb-orange); flex: none; }
.rb-more { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--rb-blue); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rb-more i { font-size: 12px; transition: transform .2s; }
.rb-more:hover, .rb-more:focus-visible { color: var(--rb-orange-dark); }
.rb-more:hover i, .rb-more:focus-visible i { transform: translateX(4px); }

/* News cards (2 x 2) */
.rb-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rb-news-card {
    display: flex; gap: 14px; padding: 12px; border: 1px solid var(--rb-line); border-radius: 12px; background: #fff; color: var(--rb-ink);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.rb-news-card:hover, .rb-news-card:focus-visible {
    border-color: #f5c48f; box-shadow: 0 10px 24px rgba(11, 61, 122, .10); transform: translateY(-2px); outline: none;
}
.rb-news-thumb {
    flex: none; width: 128px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--rb-soft);
    display: flex; align-items: center; justify-content: center; color: #a9b8cc; font-size: 28px; position: relative;
}
/* The icon stays behind the image, so a missing or broken image still shows a placeholder. */
.rb-news-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.rb-news-card:hover .rb-news-thumb img { transform: scale(1.06); }
.rb-news-card:hover .rb-news-thumb i { color: var(--rb-orange); }
.rb-news-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rb-tag {
    align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--rb-tag-bg);
    color: var(--rb-tag-ink); transition: background .2s, color .2s;
}
.rb-news-card:hover .rb-tag { background: var(--rb-orange); color: #fff; }
.rb-news-title {
    font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--rb-ink); transition: color .2s;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rb-news-card:hover .rb-news-title { color: var(--rb-blue); }
.rb-news-date { margin-top: auto; font-size: 12px; color: var(--rb-muted); }
.rb-news-date i { margin-right: 4px; color: var(--rb-orange); }
.rb-empty { color: var(--rb-muted); font-size: 14px; }

/* Popular news (two columns) */
.rb-popular { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.rb-popular a {
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--rb-ink);
    transition: background .2s;
}
.rb-num {
    flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--rb-navy); color: #fff; font-size: 13.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s;
}
.rb-popular-title { font-size: 14px; line-height: 1.45; padding-top: 4px; transition: color .2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rb-popular a:hover, .rb-popular a:focus-visible { background: var(--rb-soft); outline: none; }
.rb-popular a:hover .rb-num, .rb-popular a:focus-visible .rb-num { background: var(--rb-orange); transform: scale(1.06); }
.rb-popular a:hover .rb-popular-title, .rb-popular a:focus-visible .rb-popular-title { color: var(--rb-blue); }

/* Archive years */
.rb-years { display: flex; flex-wrap: wrap; gap: 10px; }
.rb-year {
    min-width: 76px; text-align: center; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--rb-line); background: #fff;
    font-size: 14px; font-weight: 600; color: var(--rb-navy); transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.rb-year:hover, .rb-year:focus-visible { background: var(--rb-navy); border-color: var(--rb-navy); color: #fff; transform: translateY(-1px); outline: none; }

/* Documents (max 5) */
.rb-docs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rb-line); border-radius: 12px; overflow: hidden; }
.rb-docs li + li { border-top: 1px solid var(--rb-line); }
.rb-doc { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--rb-ink); transition: background .2s; }
.rb-doc-icon { flex: none; font-size: 20px; color: #d93025; transition: transform .2s; }
.rb-doc-name { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.45; transition: color .2s; }
.rb-doc-size { flex: none; width: 76px; text-align: right; font-size: 12.5px; color: var(--rb-muted); font-variant-numeric: tabular-nums; }
.rb-doc-dl {
    flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 6px; border: 1px solid #cfe0f3;
    font-size: 12.5px; font-weight: 600; color: var(--rb-blue); transition: background .2s, color .2s, border-color .2s;
}
.rb-doc:hover, .rb-doc:focus-visible { background: var(--rb-soft); outline: none; }
.rb-doc:hover .rb-doc-name, .rb-doc:focus-visible .rb-doc-name { color: var(--rb-blue); }
.rb-doc:hover .rb-doc-icon { transform: scale(1.12); }
.rb-doc:hover .rb-doc-dl, .rb-doc:focus-visible .rb-doc-dl { background: var(--rb-blue); border-color: var(--rb-blue); color: #fff; }
.rb-docs-more { display: flex; justify-content: flex-end; margin-top: 14px; }
.rb-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; background: var(--rb-navy); color: #fff;
    font-size: 14px; font-weight: 600; transition: background .2s, box-shadow .2s;
}
.rb-btn span { font-weight: 400; opacity: .8; }
.rb-btn i { font-size: 12px; transition: transform .2s; }
.rb-btn:hover, .rb-btn:focus-visible { background: var(--rb-orange); color: #fff; box-shadow: 0 6px 16px rgba(242, 140, 27, .3); outline: none; }
.rb-btn:hover i, .rb-btn:focus-visible i { transform: translateX(4px); }

/* Tablet */
@media (max-width: 991px) {
    .rb-home { padding-top: 16px; }
    .rb-news-thumb { width: 104px; height: 84px; }
    .rb-news-title { font-size: 14px; }
}

/* Phone: one column */
@media (max-width: 767px) {
    .rb-home-wrap { padding: 0 14px; }
    .rb-carousel { border-radius: 8px; }
    .rb-carousel .carousel-control-prev, .rb-carousel .carousel-control-next { opacity: 1; width: 36px; }
    .rb-carousel .carousel-control-prev-icon, .rb-carousel .carousel-control-next-icon { width: 26px; height: 26px; }
    .rb-section { margin-top: 24px; }
    .rb-section-head h2 { font-size: 17px; }
    .rb-news, .rb-popular { grid-template-columns: minmax(0, 1fr); }
    .rb-news-thumb { width: 96px; height: 76px; }
    .rb-doc { padding: 11px 12px; gap: 10px; flex-wrap: wrap; }
    .rb-doc-name { flex-basis: calc(100% - 34px); font-size: 13.5px; }
    .rb-doc-size { width: auto; margin-left: auto; text-align: right; }
    .rb-doc-dl { margin-left: 0; }
    .rb-docs-more { justify-content: stretch; }
    .rb-btn { width: 100%; justify-content: center; }
}
@media (max-width: 400px) {
    .rb-news-card { gap: 10px; padding: 10px; }
    .rb-news-thumb { width: 80px; height: 68px; }
    .rb-news-title { font-size: 13.5px; }
    .rb-doc-dl span { display: none; }
}
