/* =============================================================
   RIiM SAFE HOMEPAGE V3
   Every design selector is scoped to .riim-home-v3.
   It will not resize or restyle the rest of OJS.
   ============================================================= */

.riim-home-v3 {
  --v3-navy-950:#041a35;
  --v3-navy-900:#06264c;
  --v3-navy-800:#08396d;
  --v3-blue:#087dc0;
  --v3-cyan:#00a5cf;
  --v3-green:#006c58;
  --v3-ink:#182236;
  --v3-muted:#5d697a;
  --v3-line:#d8e1ea;
  --v3-soft:#f3f7fa;
  --v3-white:#fff;
  --v3-shadow:0 9px 28px rgba(4,29,61,.09);
  --v3-radius:10px;
  --v3-max:1360px;

  color:var(--v3-ink);
  background:#fff;
  font-family:Arial,Helvetica,sans-serif;
  font-size:16px;
  line-height:1.6;
}

.riim-home-v3,
.riim-home-v3 *,
.riim-home-v3 *::before,
.riim-home-v3 *::after {
  box-sizing:border-box;
}

.riim-home-v3 a {
  color:#075fa8;
  text-underline-offset:3px;
}

.riim-v3-container {
  width:min(calc(100% - 40px),var(--v3-max));
  margin:0 auto;
}

.riim-v3-hero {
  color:#fff;
  background:
    radial-gradient(circle at 84% 15%,rgba(0,165,207,.25),transparent 26%),
    linear-gradient(125deg,var(--v3-navy-950),var(--v3-navy-800) 65%,#0a668d);
}

.riim-v3-hero-grid {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(290px,.7fr);
  gap:2rem;
  align-items:center;
  min-height:410px;
  padding:3.2rem 0;
}

.riim-v3-kicker {
  margin:0 0 .45rem;
  color:var(--v3-cyan);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.riim-v3-hero h1 {
  max-width:850px;
  margin:0;
  color:#fff;
  font-size:clamp(2.3rem,5vw,4.4rem);
  line-height:1.04;
  letter-spacing:-.035em;
}

.riim-v3-lead {
  max-width:780px;
  margin:1.2rem 0;
  color:#dfedf8;
  font-size:clamp(1rem,1.55vw,1.2rem);
}

.riim-v3-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.75rem;
  margin-top:1.4rem;
}

.riim-v3-actions-center {
  justify-content:center;
}

.riim-v3-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:45px;
  padding:.72rem 1.15rem;
  border:2px solid transparent;
  border-radius:6px;
  font-weight:800;
  line-height:1.2;
  text-align:center;
  text-decoration:none !important;
}

.riim-v3-button-primary {
  color:#fff !important;
  background:var(--v3-blue);
}

.riim-v3-button-outline {
  color:#fff !important;
  background:transparent;
  border-color:rgba(255,255,255,.72);
}

.riim-v3-button-dark {
  color:#fff !important;
  background:var(--v3-navy-800);
}

.riim-v3-text-link {
  color:#fff !important;
  font-weight:750;
}

.riim-v3-facts {
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.2rem;
  margin:1.35rem 0 0;
  padding:0;
  color:#dcebf6;
  font-size:.86rem;
  list-style:none;
}

.riim-v3-facts li::before {
  content:"✓";
  margin-right:.38rem;
  color:#7ce2c4;
  font-weight:900;
}

.riim-v3-glance {
  padding:1.4rem;
  color:var(--v3-ink);
  background:rgba(255,255,255,.98);
  border-radius:var(--v3-radius);
  box-shadow:0 20px 48px rgba(0,0,0,.24);
}

.riim-v3-glance h2 {
  margin:0 0 .7rem;
  color:var(--v3-navy-900);
  font-size:1.22rem;
}

.riim-v3-glance dl {
  display:grid;
  grid-template-columns:minmax(105px,.85fr) minmax(130px,1.15fr);
  margin:0;
}

.riim-v3-glance dt,
.riim-v3-glance dd {
  margin:0;
  padding:.55rem 0;
  border-bottom:1px solid var(--v3-line);
  font-size:.84rem;
}

.riim-v3-glance dt {
  color:var(--v3-muted);
}

.riim-v3-glance dd {
  font-weight:750;
}

.riim-v3-trust {
  background:#eef5fa;
  border-bottom:1px solid var(--v3-line);
}

.riim-v3-trust-grid {
  display:grid;
  grid-template-columns:repeat(6,1fr);
}

.riim-v3-trust article {
  display:grid;
  grid-template-columns:32px 1fr;
  gap:.5rem;
  align-items:center;
  min-height:90px;
  padding:.85rem;
  border-right:1px solid #d4e0ea;
}

.riim-v3-trust article:last-child {
  border-right:0;
}

.riim-v3-trust article > span {
  color:#075fa8;
  font-size:1.55rem;
  text-align:center;
}

.riim-v3-trust strong,
.riim-v3-trust small {
  display:block;
}

.riim-v3-trust strong {
  font-size:.82rem;
}

.riim-v3-trust small {
  color:var(--v3-muted);
  font-size:.7rem;
}

.riim-v3-section {
  padding:3rem 0;
}

.riim-v3-soft {
  background:var(--v3-soft);
  border-top:1px solid var(--v3-line);
  border-bottom:1px solid var(--v3-line);
}

.riim-v3-navy {
  color:#fff;
  background:var(--v3-navy-900);
}

.riim-v3-heading {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:1rem;
  margin-bottom:1.45rem;
}

.riim-v3-heading h2 {
  margin:0;
  color:var(--v3-navy-900);
  font-size:clamp(1.7rem,2.5vw,2.3rem);
  line-height:1.15;
}

.riim-v3-navy .riim-v3-heading h2 {
  color:#fff;
}

.riim-v3-heading > a {
  font-size:.86rem;
  font-weight:750;
}

.riim-v3-current-grid {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,.55fr);
  gap:1.2rem;
}

.riim-v3-issue-card,
.riim-v3-welcome-card,
.riim-v3-editor-card {
  background:#fff;
  border:1px solid var(--v3-line);
  border-radius:var(--v3-radius);
  box-shadow:var(--v3-shadow);
}

.riim-v3-issue-card {
  display:grid;
  grid-template-columns:175px 1fr;
  gap:1.45rem;
  padding:1.45rem;
}

.riim-v3-cover {
  position:relative;
  display:flex;
  flex-direction:column;
  width:175px;
  aspect-ratio:3/4.2;
  padding:1rem;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(155deg,var(--v3-navy-950),#07558f);
  box-shadow:8px 10px 22px rgba(4,29,61,.2);
}

.riim-v3-cover::after {
  position:absolute;
  right:-45%;
  bottom:-18%;
  width:190px;
  height:190px;
  content:"";
  border:1px solid rgba(62,216,240,.42);
  border-radius:50%;
  box-shadow:
    0 0 0 24px rgba(62,216,240,.07),
    0 0 0 48px rgba(62,216,240,.045);
}

.riim-v3-cover > * {
  position:relative;
  z-index:1;
}

.riim-v3-cover small {
  font-size:.55rem;
  letter-spacing:.06em;
}

.riim-v3-cover strong {
  margin-top:2rem;
  font-size:3rem;
  line-height:1;
}

.riim-v3-cover strong span {
  color:#28cae1;
}

.riim-v3-cover p {
  margin-top:.2rem;
  font-size:1rem;
  font-weight:700;
  line-height:1.15;
}

.riim-v3-cover footer {
  margin-top:auto;
  font-size:.65rem;
}

.riim-v3-issue-content {
  align-self:center;
}

.riim-v3-tag {
  margin:0 0 .4rem;
  color:#075fa8;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.riim-v3-issue-content h3,
.riim-v3-welcome-card h3,
.riim-v3-editor-card h3 {
  color:var(--v3-navy-900);
}

.riim-v3-issue-content h3 {
  margin:.2rem 0;
  font-size:1.55rem;
}

.riim-v3-issue-content p {
  color:var(--v3-muted);
}

.riim-v3-welcome-card {
  padding:1.4rem;
}

.riim-v3-editor-photo {
  width:66px;
  height:66px;
  object-fit:cover;
  border-radius:50%;
  border:3px solid #fff;
  box-shadow:0 4px 14px rgba(4,29,61,.16);
}

.riim-v3-editor-placeholder {
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(145deg,var(--v3-navy-800),var(--v3-cyan));
  font-weight:850;
}

.riim-v3-welcome-card h3 {
  margin:.7rem 0 0;
}

.riim-v3-role {
  margin:.15rem 0 .7rem;
  color:#075fa8;
  font-weight:750;
}

.riim-v3-topic-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:.85rem;
}

.riim-v3-topic-grid a {
  display:flex;
  align-items:center;
  gap:.75rem;
  min-height:74px;
  padding:1rem;
  color:var(--v3-navy-800);
  background:#fff;
  border:1px solid var(--v3-line);
  border-radius:8px;
  box-shadow:0 4px 14px rgba(4,29,61,.045);
  font-size:.9rem;
  font-weight:750;
  text-decoration:none;
}

.riim-v3-topic-grid span {
  color:#075fa8;
  font-size:1.5rem;
}

.riim-v3-editor-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
}

.riim-v3-editor-card {
  display:flex;
  gap:.85rem;
  align-items:center;
  min-width:0;
  padding:1rem;
}

.riim-v3-editor-card h3 {
  margin:0;
  font-size:.96rem;
  line-height:1.25;
}

.riim-v3-editor-card p {
  margin:.2rem 0;
  color:#075fa8;
  font-size:.78rem;
  font-weight:750;
  line-height:1.3;
}

.riim-v3-editor-card small {
  color:var(--v3-muted);
  font-size:.7rem;
}

.riim-v3-benefit-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
}

.riim-v3-benefit-grid article {
  padding:1.1rem;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
}

.riim-v3-benefit-grid strong {
  display:block;
  color:#fff;
}

.riim-v3-benefit-grid p {
  margin-bottom:0;
  color:#d7e7f3;
  font-size:.85rem;
}

.riim-v3-link-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.riim-v3-link-grid a {
  display:grid;
  gap:.35rem;
  padding:1.25rem;
  color:var(--v3-navy-800);
  background:#fff;
  border:1px solid var(--v3-line);
  border-radius:8px;
  box-shadow:var(--v3-shadow);
  text-decoration:none;
}

.riim-v3-link-grid span {
  color:var(--v3-muted);
  font-size:.83rem;
}

.riim-home-v3 a:focus-visible {
  outline:3px solid #ffd75e;
  outline-offset:3px;
}

@media (max-width:1050px) {
  .riim-v3-trust-grid {
    grid-template-columns:repeat(3,1fr);
  }

  .riim-v3-topic-grid,
  .riim-v3-editor-grid,
  .riim-v3-benefit-grid {
    grid-template-columns:repeat(2,1fr);
  }
}

@media (max-width:780px) {
  .riim-v3-container {
    width:min(calc(100% - 24px),var(--v3-max));
  }

  .riim-v3-hero-grid,
  .riim-v3-current-grid {
    grid-template-columns:1fr;
  }

  .riim-v3-hero-grid {
    min-height:auto;
    padding:2.5rem 0;
  }

  .riim-v3-issue-card {
    grid-template-columns:145px 1fr;
  }

  .riim-v3-cover {
    width:145px;
  }

  .riim-v3-link-grid {
    grid-template-columns:1fr;
  }
}

@media (max-width:560px) {
  .riim-v3-actions {
    flex-direction:column;
    align-items:stretch;
  }

  .riim-v3-button {
    width:100%;
  }

  .riim-v3-glance dl {
    grid-template-columns:1fr;
  }

  .riim-v3-glance dt {
    padding-bottom:0;
    border-bottom:0;
  }

  .riim-v3-glance dd {
    padding-top:0;
  }

  .riim-v3-trust-grid,
  .riim-v3-topic-grid,
  .riim-v3-editor-grid,
  .riim-v3-benefit-grid {
    grid-template-columns:1fr;
  }

  .riim-v3-heading {
    display:block;
  }

  .riim-v3-heading > a {
    display:inline-block;
    margin-top:.6rem;
  }

  .riim-v3-issue-card {
    grid-template-columns:1fr;
  }

  .riim-v3-cover {
    width:155px;
  }
}

/* =============================================================
   RIiM V3 CONTRAST & READABILITY FIX
   Added after the original V3 rules so these values win against
   DEENK theme inheritance and editor-generated styles.
   ============================================================= */

/* Ensure the complete component is fully opaque */
.riim-home-v3,
.riim-home-v3 section,
.riim-home-v3 article,
.riim-home-v3 aside,
.riim-home-v3 div {
  opacity: 1 !important;
  filter: none !important;
}

/* Strong hero background and readable foreground */
.riim-home-v3 .riim-v3-hero {
  position: relative;
  isolation: isolate;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 82% 18%, rgba(0, 174, 222, .28), transparent 28%),
    linear-gradient(125deg, #031b36 0%, #063866 58%, #075d7c 100%) !important;
}

.riim-home-v3 .riim-v3-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(1, 18, 39, .22), rgba(1, 18, 39, .04));
  pointer-events: none;
}

.riim-home-v3 .riim-v3-hero h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.riim-home-v3 .riim-v3-kicker {
  color: #5ee4ff !important;
}

.riim-home-v3 .riim-v3-lead {
  color: #eaf5ff !important;
}

.riim-home-v3 .riim-v3-facts {
  color: #e8f6ff !important;
}

.riim-home-v3 .riim-v3-facts li,
.riim-home-v3 .riim-v3-text-link {
  color: #ffffff !important;
}

/* Make buttons unmistakable */
.riim-home-v3 .riim-v3-button-primary {
  color: #ffffff !important;
  background: #087cc4 !important;
  border-color: #087cc4 !important;
  box-shadow: 0 5px 14px rgba(0, 83, 145, .28);
}

.riim-home-v3 .riim-v3-button-primary:hover,
.riim-home-v3 .riim-v3-button-primary:focus {
  background: #00a3d7 !important;
  border-color: #00a3d7 !important;
}

.riim-home-v3 .riim-v3-button-outline {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .88) !important;
}

.riim-home-v3 .riim-v3-button-outline:hover,
.riim-home-v3 .riim-v3-button-outline:focus {
  color: #06264c !important;
  background: #ffffff !important;
}

/* Journal at a Glance: force dark text on white */
.riim-home-v3 .riim-v3-glance {
  color: #16243a !important;
  background: #ffffff !important;
  border: 1px solid #cbd8e3 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
}

.riim-home-v3 .riim-v3-glance h2 {
  color: #06264c !important;
}

.riim-home-v3 .riim-v3-glance dt {
  color: #5a6678 !important;
}

.riim-home-v3 .riim-v3-glance dd {
  color: #172238 !important;
}

.riim-home-v3 .riim-v3-glance dt,
.riim-home-v3 .riim-v3-glance dd {
  border-bottom-color: #d8e2eb !important;
}

/* Trust strip: stronger contrast and spacing */
.riim-home-v3 .riim-v3-trust {
  color: #172238 !important;
  background: #edf5fb !important;
}

.riim-home-v3 .riim-v3-trust article {
  background: #edf5fb !important;
  border-right-color: #cbd9e5 !important;
}

.riim-home-v3 .riim-v3-trust article > span {
  color: #075fa8 !important;
}

.riim-home-v3 .riim-v3-trust strong {
  color: #102946 !important;
}

.riim-home-v3 .riim-v3-trust small {
  color: #536173 !important;
}

/* Normal content sections */
.riim-home-v3 .riim-v3-section {
  color: #172238 !important;
  background-color: #ffffff;
}

.riim-home-v3 .riim-v3-soft {
  background: #f2f6fa !important;
}

.riim-home-v3 .riim-v3-heading h2,
.riim-home-v3 .riim-v3-issue-content h3,
.riim-home-v3 .riim-v3-welcome-card h3,
.riim-home-v3 .riim-v3-editor-card h3 {
  color: #06264c !important;
}

.riim-home-v3 .riim-v3-heading > a,
.riim-home-v3 .riim-v3-welcome-card > a {
  color: #075fa8 !important;
  font-weight: 750;
}

/* Cards and body copy */
.riim-home-v3 .riim-v3-issue-card,
.riim-home-v3 .riim-v3-welcome-card,
.riim-home-v3 .riim-v3-editor-card {
  color: #172238 !important;
  background: #ffffff !important;
  border-color: #d4dee7 !important;
}

.riim-home-v3 .riim-v3-issue-content p,
.riim-home-v3 .riim-v3-welcome-card p,
.riim-home-v3 .riim-v3-editor-card small {
  color: #566376 !important;
}

.riim-home-v3 .riim-v3-role,
.riim-home-v3 .riim-v3-editor-card p {
  color: #075fa8 !important;
}

/* Research-area cards */
.riim-home-v3 .riim-v3-topic-grid a {
  color: #063866 !important;
  background: #ffffff !important;
  border-color: #d4dee7 !important;
}

.riim-home-v3 .riim-v3-topic-grid a:hover,
.riim-home-v3 .riim-v3-topic-grid a:focus {
  color: #ffffff !important;
  background: #075fa8 !important;
  border-color: #075fa8 !important;
}

.riim-home-v3 .riim-v3-topic-grid a:hover span,
.riim-home-v3 .riim-v3-topic-grid a:focus span {
  color: #ffffff !important;
}

/* Dark author-benefit section */
.riim-home-v3 .riim-v3-navy {
  color: #ffffff !important;
  background: #06264c !important;
}

.riim-home-v3 .riim-v3-navy .riim-v3-heading h2,
.riim-home-v3 .riim-v3-navy .riim-v3-kicker,
.riim-home-v3 .riim-v3-benefit-grid strong {
  color: #ffffff !important;
}

.riim-home-v3 .riim-v3-navy .riim-v3-kicker {
  color: #61dcf5 !important;
}

.riim-home-v3 .riim-v3-benefit-grid article {
  background: rgba(255, 255, 255, .10) !important;
  border-color: rgba(255, 255, 255, .25) !important;
}

.riim-home-v3 .riim-v3-benefit-grid p {
  color: #e0edf7 !important;
}

/* Final navigation cards */
.riim-home-v3 .riim-v3-link-grid a {
  color: #06264c !important;
  background: #ffffff !important;
  border-color: #d4dee7 !important;
}

.riim-home-v3 .riim-v3-link-grid span {
  color: #586679 !important;
}

/* Prevent OJS editor styles from adding white text globally */
.riim-home-v3 p,
.riim-home-v3 li,
.riim-home-v3 dt,
.riim-home-v3 dd,
.riim-home-v3 small,
.riim-home-v3 strong,
.riim-home-v3 h1,
.riim-home-v3 h2,
.riim-home-v3 h3 {
  opacity: 1 !important;
}

/* Slightly reduce hero height for better page balance */
.riim-home-v3 .riim-v3-hero-grid {
  min-height: 380px;
  padding-top: 2.8rem;
  padding-bottom: 2.8rem;
}
