/* ResearchBridge — modern blue/white corporate theme */

:root {
  --rb-blue-900: #0a2540;
  --rb-blue-800: #0e3a63;
  --rb-blue-700: #124e88;
  --rb-blue-600: #1565c0;
  --rb-blue-500: #1e88e5;
  --rb-blue-100: #e3f0fc;
  --rb-blue-050: #f2f7fd;
  --rb-ink: #10202f;
  --rb-body: #4a5b6b;
  --rb-line: #e2e9f1;
  --rb-white: #ffffff;
  --rb-radius: 16px;
  --rb-shadow: 0 18px 45px -25px rgba(10, 37, 64, 0.45);
  --rb-max: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
}

.rb-body-wrap {
  font-family: "Jost", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--rb-body);
  background: var(--rb-white);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.rb h1,
.rb h2,
.rb h3,
.rb h4,
.rb h5 {
  color: var(--rb-ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
}

.rb p {
  margin: 0 0 16px;
}

.rb a {
  color: var(--rb-blue-600);
  text-decoration: none;
}

.rb a:hover {
  color: var(--rb-blue-800);
}

.rb img {
  max-width: 100%;
  height: auto;
  display: block;
}

.rb-container {
  width: 100%;
  max-width: var(--rb-max);
  margin: 0 auto;
  padding: 0 20px;
}

.rb-section {
  padding: 60px 0;
}

.rb-section--tight {
  padding: 44px 0;
}

.rb-section--soft {
  background: var(--rb-blue-050);
}

.rb-section--dark {
  background: linear-gradient(135deg, var(--rb-blue-900), var(--rb-blue-700));
  color: rgba(255, 255, 255, 0.85);
}

.rb-section--dark h1,
.rb-section--dark h2,
.rb-section--dark h3,
.rb-section--dark h4,
.rb-section--dark h5 {
  color: #fff;
}

/* ---------- Section headings ---------- */
.rb-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.rb-heading--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.rb-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rb-blue-600);
  background: var(--rb-blue-100);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.rb-section--dark .rb-eyebrow {
  color: #cfe6ff;
  background: rgba(255, 255, 255, 0.14);
}

.rb-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.rb-heading p {
  font-size: 17px;
  margin-bottom: 0;
}

.rb-section--dark .rb-heading p {
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Buttons ---------- */
.rb-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 28px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.rb-btn--primary {
  background: var(--rb-blue-600);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(21, 101, 192, 0.8);
}

.rb-btn--primary:hover {
  background: var(--rb-blue-800);
  color: #fff;
  transform: translateY(-2px);
}

.rb-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.rb-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.rb-btn--outline {
  background: #fff;
  border-color: var(--rb-line);
  color: var(--rb-blue-700);
}

.rb-btn--outline:hover {
  border-color: var(--rb-blue-500);
  color: var(--rb-blue-800);
}

.rb-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Header ---------- */
.rb-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.rb-header.is-stuck {
  border-color: var(--rb-line);
  box-shadow: 0 10px 30px -22px rgba(10, 37, 64, 0.6);
}

.rb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.rb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--rb-blue-900);
  font-size: 20px;
}

.rb-logo img {
  height: 40px;
  width: auto;
}

.rb-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.rb-nav a {
  color: var(--rb-ink);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 6px 0;
}

.rb-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--rb-blue-500);
  transition: width 0.25s ease;
}

.rb-nav a:hover::after,
.rb-nav a.is-active::after {
  width: 100%;
}

.rb-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rb-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--rb-line);
  background: #fff;
  color: var(--rb-blue-800);
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rb-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.rb-mobile-nav.is-open {
  display: block;
}

.rb-mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.5);
}

.rb-mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.rb-mobile-nav__panel a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--rb-line);
  color: var(--rb-ink);
  font-weight: 500;
}

.rb-mobile-nav__close {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--rb-ink);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.rb-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f6faff 0%, #e8f2fe 55%, #ffffff 100%);
  padding: 96px 0 88px;
}

.rb-hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.22), transparent 65%);
}

.rb-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.rb-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.02em;
}

.rb-hero p {
  font-size: 18px;
  max-width: 560px;
}

.rb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.rb-hero__actions .rb-btn--ghost {
  border-color: var(--rb-blue-500);
  color: var(--rb-blue-700);
}

.rb-hero__actions .rb-btn--ghost:hover {
  background: var(--rb-blue-100);
  color: var(--rb-blue-900);
}

.rb-hero__media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--rb-shadow);
  background: #fff;
}

.rb-hero__media img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.rb-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
}

.rb-hero__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--rb-blue-800);
  font-size: 15px;
}

.rb-hero__badge i {
  color: var(--rb-blue-500);
}

/* ---------- Cards / grids ---------- */
.rb-grid {
  display: grid;
  gap: 26px;
}

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

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

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

.rb-card {
  background: #fff;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.rb-card:hover {
  transform: translateY(-6px);
  border-color: rgba(30, 136, 229, 0.4);
  box-shadow: var(--rb-shadow);
}

.rb-card h3 {
  font-size: 20px;
}

.rb-card p {
  margin-bottom: 0;
  font-size: 15px;
}

.rb-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--rb-blue-100);
  color: var(--rb-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.rb-card__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ---------- About ---------- */
.rb-about {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.rb-about__media img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--rb-shadow);
}

.rb-rich h1,
.rb-rich h2,
.rb-rich h3 {
  margin-top: 22px;
}

.rb-rich ul,
.rb-rich ol {
  padding-left: 20px;
  margin: 0 0 16px;
}

.rb-rich li {
  margin-bottom: 8px;
}

.rb-tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 18px;
  flex-wrap: wrap;
}

.rb-tab {
  border: 1px solid var(--rb-line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--rb-blue-800);
  cursor: pointer;
}

.rb-tab.is-active {
  background: var(--rb-blue-600);
  border-color: var(--rb-blue-600);
  color: #fff;
}

.rb-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.rb-check-list li {
  position: relative;
  padding-left: 28px;
  font-weight: 500;
  color: var(--rb-ink);
}

.rb-check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rb-blue-100);
  color: var(--rb-blue-600);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rb-section--dark .rb-check-list li {
  color: rgba(255, 255, 255, 0.9);
}

.rb-section--dark .rb-check-list li::before {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ---------- Stats ---------- */
.rb-stat {
  text-align: center;
  padding: 26px 16px;
  border-radius: var(--rb-radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.rb-stat__value {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.rb-stat__label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  margin-top: 6px;
}

/* ---------- Process ---------- */
.rb-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius);
  padding: 34px 26px 28px;
  height: 100%;
}

.rb-step__num {
  position: absolute;
  top: -22px;
  left: 26px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rb-blue-600), var(--rb-blue-800));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -14px rgba(21, 101, 192, 0.9);
}

.rb-step h3 {
  font-size: 19px;
  margin-top: 12px;
}

.rb-step p {
  margin-bottom: 0;
  font-size: 15px;
}

/* ---------- Projects ---------- */
.rb-project {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius);
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rb-project:hover {
  transform: translateY(-6px);
  box-shadow: var(--rb-shadow);
}

.rb-project__media {
  aspect-ratio: 16 / 10;
  background: var(--rb-blue-100);
  overflow: hidden;
}

.rb-project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rb-project__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.rb-project__body h3 {
  font-size: 20px;
  margin: 0;
}

.rb-project__body p {
  font-size: 15px;
  margin: 0;
}

.rb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.rb-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--rb-blue-050);
  color: var(--rb-blue-700);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---------- Team ---------- */
.rb-member {
  background: #fff;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius);
  overflow: hidden;
  text-align: center;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rb-member:hover {
  transform: translateY(-6px);
  box-shadow: var(--rb-shadow);
}

.rb-member__media {
  aspect-ratio: 1 / 1;
  background: var(--rb-blue-050);
}

.rb-member__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rb-member__body {
  padding: 20px;
}

.rb-member__body h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.rb-member__role {
  color: var(--rb-blue-600);
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.rb-member__body a {
  font-size: 14px;
  word-break: break-word;
}

/* ---------- Contact ---------- */
.rb-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.rb-info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.rb-info-item i {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rb-info-item h4 {
  font-size: 16px;
  margin-bottom: 2px;
}

.rb-info-item p,
.rb-info-item a {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.rb-map {
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rb-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.rb-form {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--rb-shadow);
}

.rb-form h3 {
  font-size: 22px;
}

.rb-field {
  margin-bottom: 16px;
}

.rb-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--rb-ink);
  margin-bottom: 6px;
}

.rb-form input,
.rb-form textarea {
  width: 100%;
  border: 1px solid var(--rb-line);
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--rb-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rb-form input:focus,
.rb-form textarea:focus {
  border-color: var(--rb-blue-500);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.14);
}

/* ---------- CTA strip ---------- */
.rb-cta {
  background: linear-gradient(135deg, var(--rb-blue-700), var(--rb-blue-500));
  border-radius: 24px;
  padding: 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.rb-cta h2 {
  color: #fff;
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 32px);
}

.rb-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- Footer ---------- */
.rb-footer {
  background: var(--rb-blue-900);
  color: rgba(255, 255, 255, 0.72);
  padding: 68px 0 0;
}

.rb-footer h4 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 18px;
}

.rb-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.rb-footer a:hover {
  color: #fff;
}

.rb-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.rb-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.rb-footer__brand img {
  height: 42px;
  margin-bottom: 16px;
}

.rb-socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.rb-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.rb-socials a:hover {
  background: var(--rb-blue-500);
}

.rb-footer__bottom {
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Page header (inner pages) ---------- */
.rb-pagehead {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, var(--rb-blue-900), var(--rb-blue-600));
  color: #fff;
  padding: 64px 0;
  overflow: hidden;
}

.rb-pagehead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.rb-pagehead > * {
  position: relative;
}

.rb-pagehead h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 8px;
}

.rb-pagehead p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 720px;
}

.rb-breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
}

.rb-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

.rb-article {
  max-width: 820px;
  margin: 0 auto;
  font-size: 17px;
}

.rb-article img {
  border-radius: 18px;
  margin-bottom: 28px;
}

.rb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--rb-line);
  margin-bottom: 28px;
  font-size: 14px;
}

.rb-meta strong {
  color: var(--rb-ink);
  display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .rb-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rb-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rb-hero__grid,
  .rb-about,
  .rb-contact {
    grid-template-columns: 1fr;
  }
  .rb-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .rb-nav,
  .rb-header__actions .rb-btn {
    display: none;
  }
  .rb-burger {
    display: flex;
  }
  .rb-section {
    padding: 64px 0;
  }
  .rb-hero {
    padding: 56px 0 64px;
  }
}

@media (max-width: 640px) {
  .rb-grid--2,
  .rb-grid--3,
  .rb-grid--4,
  .rb-footer__grid {
    grid-template-columns: 1fr;
  }
  .rb-cta {
    padding: 32px 24px;
  }
  .rb-form {
    padding: 24px;
  }
}

/* ---------- Admin rich text editor ---------- */
.rb-editor {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.rb-editor__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fb;
}

.rb-editor__bar button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #33415c;
}

.rb-editor__bar button:hover {
  background: #e9eef5;
}

.rb-editor__bar button.is-active {
  background: #1565c0;
  color: #fff;
}

.rb-editor .ProseMirror {
  min-height: 220px;
  padding: 16px;
  outline: none;
}

.rb-editor .ProseMirror p {
  margin: 0 0 12px;
}

/* Link colour must not override button variants */
.rb a.rb-btn--primary,
.rb a.rb-btn--primary:hover {
  color: #fff;
}

.rb a.rb-btn--ghost,
.rb a.rb-btn--ghost:hover {
  color: var(--rb-blue-700);
}

.rb-section--dark a.rb-btn--ghost,
.rb-section--dark a.rb-btn--ghost:hover {
  color: #fff;
}

.rb a.rb-btn--outline,
.rb a.rb-btn--outline:hover {
  color: var(--rb-blue-700);
}

.rb a.rb-project,
.rb a.rb-project:hover {
  color: inherit;
}

/* Cards keep light-surface typography even inside dark sections */
.rb-section--dark .rb-card h3,
.rb-section--dark .rb-card h4 {
  color: var(--rb-ink);
}
.rb-section--dark .rb-card p,
.rb-section--dark .rb-card li {
  color: var(--rb-body);
}

/* ---------- Hover / motion helpers ---------- */
.rb-lift {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.rb-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--rb-shadow);
}
.rb-zoom {
  overflow: hidden;
  border-radius: 24px;
}
.rb-zoom img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.rb-zoom:hover img {
  transform: scale(1.06);
}
.rb-btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.rb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(10, 37, 64, 0.75);
}
.rb-card__icon {
  transition: transform 0.35s ease, background 0.25s ease, color 0.25s ease;
}
.rb-card:hover .rb-card__icon {
  transform: translateY(-4px) rotate(-6deg) scale(1.08);
  background: var(--rb-blue-600);
  color: #fff;
}
.rb-step__num {
  transition: transform 0.35s ease, box-shadow 0.3s ease;
}
.rb-step:hover .rb-step__num {
  transform: scale(1.1);
}
.rb-tag {
  transition: background 0.25s ease, color 0.25s ease;
}
.rb-project:hover .rb-tag {
  background: var(--rb-blue-600);
  color: #fff;
}
.rb-info-item {
  transition: transform 0.25s ease;
}
.rb-info-item:hover {
  transform: translateX(6px);
}
.rb-socials a {
  transition: transform 0.25s ease, background 0.25s ease;
}
.rb-socials a:hover {
  transform: translateY(-3px);
}

/* ---------- Image swap on hover ---------- */
.rb-swap {
  position: relative;
  overflow: hidden;
}
.rb-swap .rb-swap__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.rb-swap .rb-swap__img:not(.rb-swap__img--0) {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.rb-project:hover .rb-swap .rb-swap__img--0,
.rb-member:hover .rb-swap .rb-swap__img--0 {
  opacity: 0;
}
.rb-project:hover .rb-swap .rb-swap__img--1,
.rb-member:hover .rb-swap .rb-swap__img--1 {
  opacity: 1;
}
.rb-project:hover .rb-swap .rb-swap__img--2 {
  animation: rb-third 3.6s ease-in-out 0.9s infinite;
}
@keyframes rb-third {
  0%, 20% { opacity: 0; }
  40%, 70% { opacity: 1; }
  90%, 100% { opacity: 0; }
}
.rb-swap:hover .rb-swap__img {
  transform: scale(1.05);
}

/* ---------- Sections with background imagery ---------- */
.rb-section--bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.rb-section--bg > .rb-container {
  position: relative;
  z-index: 1;
}
.rb-section__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 0;
  mix-blend-mode: luminosity;
  transform: scale(1.02);
}

/* ---------- Gallery mosaic ---------- */
.rb-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 18px;
}
.rb-mosaic__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--rb-radius);
  background: var(--rb-blue-100);
  grid-column: span 1;
  grid-row: span 1;
  box-shadow: 0 10px 30px -22px rgba(10, 37, 64, 0.6);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.rb-mosaic__item.is-large {
  grid-column: span 2;
  grid-row: span 2;
}
.rb-mosaic__item.is-wide {
  grid-column: span 2;
}
.rb-mosaic__item.is-tall {
  grid-row: span 2;
}
.rb-mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}
.rb-mosaic__item:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--rb-shadow);
}
.rb-mosaic__item:hover img {
  transform: scale(1.09);
}
.rb-mosaic__item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 16px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(to top, rgba(6, 20, 33, 0.85), transparent);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rb-mosaic__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 991px) {
  .rb-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 150px;
  }
}
@media (max-width: 575px) {
  .rb-mosaic {
    grid-template-columns: 1fr;
  }
  .rb-mosaic__item,
  .rb-mosaic__item.is-large,
  .rb-mosaic__item.is-wide,
  .rb-mosaic__item.is-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ---------- Pagination ---------- */
.rb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.rb-pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rb-line);
  background: #fff;
  color: var(--rb-ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rb-pagination button:hover:not(:disabled) {
  border-color: var(--rb-blue-500);
  color: var(--rb-blue-700);
  transform: translateY(-2px);
}
.rb-pagination button.is-active {
  background: var(--rb-blue-600);
  border-color: var(--rb-blue-600);
  color: #fff;
}
.rb-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Darker footer ---------- */
.rb-footer {
  background: #060a10;
  color: rgba(255, 255, 255, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rb-footer a {
  color: rgba(255, 255, 255, 0.62);
}
.rb-footer__bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.rb-card h3,
.rb-card p,
.rb-project-card h3,
.rb-project-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}
