/* =========================================================
   research-grants.css
   Uses your global variables: --navy, --gold, --transition
   ========================================================= */

:root{
  --rg-navy: var(--navy, #0b2a5b);
  --rg-gold: var(--gold, #c9a24a);
  --rg-bg:   #f4f7fb;
}

/* =========================
   RESEARCH GRANT / PAGE BANNER
========================= */

.page-banner {
    position: relative;
    width: 100%;
    height: 315px;
    overflow: hidden;
    background: #0b2352;
}

.banner-flex {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1300px;
    margin: 0 auto;
}


/* =========================
   HERO IMAGE
========================= */

.banner-media {
    position: absolute;
    top: 0;
    right: 0;
    width: 82%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.banner-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


/* =========================
   LEFT DARK / BLURRED AREA
========================= */

.banner-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 40px 40px 70px;
    background: rgba(11, 35, 82, 0.88);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}


/* =========================
   SLANTED TRANSITION
========================= */

.banner-text::after {
    content: "";
    position: absolute;
    top: 0;
    right: -100px;
    width: 150px;
    height: 100%;
    background: rgba(11, 35, 82, 0.88);clip-path: polygon( 35% 0,100% 0, 65% 100%, 0 100% );
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}


/* =========================
   TITLE
========================= */

.banner-text h1 {
    margin: 0 0 22px 0;
    color: #ffffff;
    font-size: 36px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 1px;
}


/* =========================
   BREADCRUMB
========================= */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #e1a80b;
}

.breadcrumb .sep {
    color: #ffffff;
}

.breadcrumb .current {
    color: #e1a80b;
    font-weight: 600;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .page-banner {
        height: 260px;
    }

    .banner-media {
        width: 100%;
    }

    .banner-text {
        width: 70%;
        padding: 30px;
    }

    .banner-text h1 {
        font-size: 28px;
    }

    .breadcrumb {
        font-size: 13px;
        gap: 8px;
    }
}

/* =========================
   RESEARCH GRANT INTRO
========================= */

.rg-intro {
    width: 100%;
    padding: 40px 0 30px;
    background: #ffffff;
}

.rg-intro .container {
    max-width: 1200px;
    margin: 0 auto;
}

.rg-intro p {
    margin: 0 0 25px 0;
    color: #333333;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}


/* =========================
   RESEARCH BOOKLET BUTTON
========================= */

.rg-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    background: #0b2352;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rg-hero-btn i:first-child {
    color: #e1a80b;
    font-size: 18px;
}

.rg-hero-btn i:last-child {
    font-size: 16px;
    margin-left: 5px;
}

.rg-hero-btn:hover {
    background: #e1a80b;
    color: #0b2352;
    transform: translateY(-2px);
}

.rg-hero-btn:hover i:first-child {
    color: #0b2352;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .rg-intro {
        padding: 30px 20px 25px;
    }
    .rg-intro p {
        font-size: 15px;
        line-height: 1.7;
        text-align: left;
    }
    .rg-hero-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* ---------- Hero ---------- */


.rg-hero .container > *{ max-width: 640px; }

.rg-breadcrumb{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  margin-bottom: 24px;
}
.rg-breadcrumb a{ color: #fff; text-decoration: none; }
.rg-breadcrumb a:hover{ color: var(--rg-gold); }

.rg-hero h1{
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.15;
}

.rg-hero p{
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.9);
  margin: 0 0 24px;
}

.rg-hero-btn{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--rg-gold);
  color: var(--rg-navy);
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  transition: filter var(--transition, .25s ease), transform var(--transition, .25s ease);
}
.rg-hero-btn:hover{ filter: brightness(1.08); transform: translateY(-1px); color: var(--rg-navy); }
.rg-hero-btn:focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Stats bar ---------- */
.rg-stats{
  background: #eaf0f8;
  border-bottom: 1px solid #dde5f0;
}

.rg-stats-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.rg-stat{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 12px;
  border-right: 1px solid #d3dcea;
  color: var(--rg-navy);
}
.rg-stat:last-child{ border-right: 0; }

.rg-stat > i{ font-size: 28px; }

.rg-stat div{ display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.rg-stat span{ font-size: 13px; color: #55657f; }
.rg-stat strong{
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 600;
}

/* ---------- Main layout ---------- */
.rg-main{
  background: var(--rg-bg);
  padding: 36px 0 64px;
}

.rg-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}

.rg-title{
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--rg-navy);
  margin: 0 0 22px;
}
.rg-title::before{
  content: "";
  width: 28px;
  height: 2px;
  background: var(--rg-gold);
}

/* ---------- Grant cards ---------- */
.rg-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.rg-card{
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(11,42,91,.06);
  transition: box-shadow var(--transition, .25s ease), transform var(--transition, .25s ease);
}
.rg-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11,42,91,.12);
}

.rg-card-img{ display: block; height: 120px; overflow: hidden; background: #dfe7f2; }
.rg-card-img img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.rg-card-body{ padding: 12px 14px 16px; text-align: left; }

.rg-code{
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--rg-navy);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eef1f6;
}

.rg-card-body h3{
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rg-navy);
  margin: 0 0 6px;
}

.rg-card-body p{
  font-size: 11.5px;
  line-height: 1.5;
  color: #55657f;
  margin: 0;
}

/* ---------- Research Impact card (spans last 2 columns) ---------- */
.rg-impact{
  grid-column: span 2;
  position: relative;
  padding: 24px 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e9f0fa 0%, #dbe6f5 100%);
  border: 1px solid #d3dfef;
  color: var(--rg-navy);
  text-align: left;
}
.rg-impact > i{ font-size: 26px; margin-bottom: 8px; display: block; }
.rg-impact h3{
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rg-gold);
  display: inline-block;
}
.rg-impact p{ font-size: 12.5px; line-height: 1.6; margin: 8px 0 14px; }
.rg-impact-tags{
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 12.5px;
}

/* =========================================================
   SIDEBAR (your styles)
   ========================================================= */
.opportunities-sidebar{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-menu{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.sidebar-menu h3{
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 20px;
  background: var(--navy);
  margin: 0;
}

.sidebar-menu ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu ul li a{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.sidebar-menu ul li a i:first-child{
  color: var(--navy);
  width: 18px;
  text-align: center;
  transition: color var(--transition);
}

.sidebar-menu ul li a:hover{
  background: #f5f7fb;
  color: var(--navy);
}

.sidebar-menu ul li.active a{
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
}

.sidebar-menu ul li.active a i:first-child{
  color: var(--gold);
}

.sidebar-menu ul li a .arrow{
  margin-left: auto;
  font-size: 11px;
  color: var(--gold);
}

/* =========================
   RESEARCH IMPACT SIDEBAR
========================= */

.rg-impact {
    margin-top: 25px;
    padding: 28px 24px;

    background: #0b2352;
    border-radius: 6px;

    color: #ffffff;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.10);

    text-align: left;
}


/* Globe Icon */

.rg-impact-icon {
    display: block;

    margin-bottom: 12px;

    color: #e1a80b;

    font-size: 34px;
}


/* Heading */

.rg-impact h3 {
    margin: 0 0 14px;

    color: #ffffff;

    font-size: 21px;
    font-weight: 700;
}


/* Description */

.rg-impact p {
    margin: 0 0 18px;

    color: rgba(255, 255, 255, 0.90);

    font-size: 14px;
    line-height: 1.7;
}


/* Tags */

.rg-impact-tags {
    display: block;

    padding-top: 15px;

    border-top: 1px solid rgba(255, 255, 255, 0.20);

    color: #e1a80b;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.6;
}


/* Hover effect */

.rg-impact:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);

    transition: all 0.3s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px){
  .rg-grid{ grid-template-columns: repeat(3, 1fr); }
  .rg-impact{ grid-column: span 3; }
}

@media (max-width: 900px){
  .rg-layout{ grid-template-columns: 1fr; }
  .rg-stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .rg-stat:nth-child(2){ border-right: 0; }
  .rg-stat:nth-child(-n+2){ border-bottom: 1px solid #d3dcea; }
}

@media (max-width: 640px){
  .rg-grid{ grid-template-columns: repeat(2, 1fr); }
  .rg-impact{ grid-column: span 2; }
  .rg-hero-btn{ font-size: 13px; }
}

@media (max-width: 420px){
  .rg-grid{ grid-template-columns: 1fr; }
  .rg-impact{ grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce){
  .rg-card, .rg-hero-btn{ transition: none; }
  .rg-card:hover, .rg-hero-btn:hover{ transform: none; }
}