:root{
  --brand: #1f5fcc; /* deep blue */
  --accent-green: #2bb673; /* green */
  --accent-red: #d93025; /* red */
  --accent-orange: #f58a07; /* saffron */
  --accent-blue: #1f5fcc; /* russia blue */
  --accent-za: #007a4d; /* south africa green */
  --muted: #5a6b85;
  --border: #d7e2f2;
  --surface: #ffffff;
  --alt: #f6f9ff;
}

.brics-home{
  position:relative;
  padding-bottom: 36px;
}
.brics-home .container{
  width: min(1200px, 94vw);
  margin: 0 auto;
}

.b-hero{ position: relative; padding: 22px 0 16px 0; }
.b-hero__shell{
  position:relative;
  border-radius: 32px;
  overflow:hidden;
  border: 1px solid rgba(211,224,243,.86);
  box-shadow: 0 20px 60px rgba(12,28,52,.14);
  background:
    radial-gradient(1100px 520px at 15% 0%, rgba(31,95,204,.22) 0%, transparent 60%),
    radial-gradient(900px 520px at 90% 20%, rgba(43,182,115,.18) 0%, transparent 55%),
    linear-gradient(135deg, #f6f9ff 0%, #edf4ff 100%);
}
.b-hero__media{ position:absolute; inset:0; }
.b-hero__media img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: right center;
  transform: none;
  filter: saturate(1.08) contrast(1.04);
}
.b-hero__shell::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(8,18,40,.84) 0%, rgba(8,18,40,.70) 42%, rgba(8,18,40,.10) 72%, rgba(8,18,40,0) 100%),
    radial-gradient(900px 520px at 20% 10%, rgba(255,255,255,.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.22) 100%);
}
.b-hero__shell::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(600px 260px at 12% 18%, rgba(31,95,204,.30) 0%, transparent 60%),
    radial-gradient(560px 260px at 92% 12%, rgba(245,138,7,.22) 0%, transparent 62%);
  mix-blend-mode: overlay;
  opacity: .85;
  pointer-events:none;
}
.b-hero__content{
  position:relative;
  z-index:1;
  padding: 52px 56px 44px 56px;
  max-width: 720px;
  isolation: isolate;
}
.b-hero__content::before{
  content:"";
  position:absolute;
  /* Extend the glass layer to the right and fade out smoothly (handles varied hero images). */
  inset: -18px -260px -18px -26px;
  border-radius: 26px;
  background:
    linear-gradient(90deg,
      rgba(8,18,40,.86) 0%,
      rgba(8,18,40,.68) 34%,
      rgba(8,18,40,.40) 58%,
      rgba(8,18,40,.16) 78%,
      rgba(8,18,40,0) 100%
    );
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 26px 80px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,.86) 64%, rgba(0,0,0,.44) 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,.86) 64%, rgba(0,0,0,.44) 80%, rgba(0,0,0,0) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  z-index: 0;
  pointer-events:none;
}
.b-hero__content > *{
  position:relative;
  z-index:1;
}
.b-hero .b-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-transform: uppercase;
  letter-spacing:.12em;
  font-size: 12px;
  font-weight:800;
  color: rgba(255,255,255,.88);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(8,18,40,.35);
  backdrop-filter: blur(10px);
  text-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.b-hero h1{
  margin: 16px 0 12px 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color:#f7fbff;
  text-wrap: balance;
  font-size: clamp(34px, 4vw, 56px);
  text-shadow: 0 18px 46px rgba(0,0,0,.25);
}
.b-hero .b-lead{
  margin: 0;
  max-width: 62ch;
  color: rgba(255,255,255,.80);
  font-size: 16px;
  line-height: 1.6;
  text-shadow: 0 12px 34px rgba(0,0,0,.26);
}
.b-hero .b-ribbon{
  margin-top: 18px;
  height: 3px;
  width: 168px;
  border-radius: 3px;
  background: linear-gradient(90deg,var(--accent-red),var(--accent-orange),var(--accent-za),var(--accent-green),var(--accent-blue));
  opacity:.95;
}

/* Fix WP Button block rendering in hero: prevent full-width bars */
.b-hero .wp-block-buttons{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; justify-content:flex-start; }
.b-hero .wp-block-button{ margin:0; width:auto; }
.b-hero .wp-block-button .wp-block-button__link{ display:inline-flex; align-items:center; height:40px; padding:0 16px; border-radius:10px; box-shadow:none; }
.b-hero .wp-block-button.is-style-outline .wp-block-button__link{ border:1px solid var(--border); background:#ffffffdd; color:#0a3a88; }
.b-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link{ background:var(--brand); color:#fff; }

/* Custom CTA buttons to match original design */
.b-cta{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin: 18px 0 0 0; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:42px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration:none;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  will-change: transform;
}
.btn.primary{
  background: linear-gradient(135deg, #2a6cf0 0%, #1f5fcc 40%, #1548ab 100%);
  color:#fff;
  box-shadow: 0 12px 28px rgba(14,38,82,.24);
}
.btn.ghost{
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(14,38,82,.24);
}
.btn.ghost:hover{
  background: rgba(255,255,255,.18);
}

.b-chips{ display:flex; flex-wrap:wrap; gap:10px; }
.b-chip{ display:inline-flex; align-items:center; padding:6px 12px; border-radius:999px; text-decoration:none; border:1px solid var(--border); background:#f1f6ff; color:#0a3a88; font-weight:600; }
.b-chip[data-accent="brazil"]{ background:#e8f8f0; color:#00a859; border-color:#cfe9dc; }
.b-chip[data-accent="russia"]{ background:#eaf1ff; color:#1f5fcc; border-color:#cfdbff; }
.b-chip[data-accent="india"]{ background:#fff3e3; color:#f58a07; border-color:#f8d9ae; }
.b-chip[data-accent="china"]{ background:#fcecec; color:#d93025; border-color:#f3c7c3; }
.b-chip[data-accent="south-africa"]{ background:#e6f5ee; color:#007a4d; border-color:#c7ead8; }

.b-card{
  border: 1px solid rgba(211,224,243,.92);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(17,31,61,.08);
  backdrop-filter: blur(10px);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.b-card h3{ margin: 0 0 10px 0; font-size: 18px; letter-spacing: -0.01em; }
.b-card:hover{
  border-color: rgba(31,95,204,.40);
  box-shadow: 0 18px 44px rgba(17,31,61,.14);
  transform: translateY(-2px);
}
.b-card--feature p{ margin: 10px 0 14px 0; font-weight: 700; }
.b-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(31,95,204,.28);
  background: rgba(246,249,255,.88);
  color:#0a3a88;
  text-decoration:none;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.b-action:hover{
  transform: translateY(-1px);
  border-color: rgba(31,95,204,.45);
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 22px rgba(17,31,61,.12);
}
.b-card--list ul{
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: grid;
  gap: 8px;
}
.b-card--list li a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(211,224,243,.7);
  background: rgba(246,249,255,.7);
  text-decoration: none;
  font-weight: 700;
  color: #0a3a88;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.b-card--list li a::before{
  content:"";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-orange), var(--accent-red));
  box-shadow: 0 0 0 4px rgba(245,138,7,.14);
}
.b-card--list li a:hover{
  transform: translateY(-1px);
  border-color: rgba(31,95,204,.32);
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 24px rgba(17,31,61,.10);
}
.b-card--stats ul{
  list-style:none;
  padding: 0;
  margin: 12px 0 0 0;
  display:grid;
  gap: 10px;
}
.b-card--stats li{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(211,224,243,.9);
  background: rgba(246,249,255,.68);
}
.b-card--stats strong{
  font-size: 18px;
  letter-spacing: -0.02em;
  color:#0a3a88;
}
.b-card--stats span{
  color: #37567f;
  font-weight: 700;
}
.b-grid{ display:grid; gap:16px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.b-grid.b-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.b-grid.b-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }

.b-thumb{
  aspect-ratio: 16/9;
  width: 100%;
  background:#eef4ff;
  border-radius: 14px;
  overflow:hidden;
  border:1px solid rgba(211,224,243,.92);
  margin-bottom:10px;
  display:block;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.b-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.b-badge{ display:inline-block; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700; border:1px solid var(--border); background:#f1f6ff; color:#0a3a88; margin-bottom:8px; }
.b-badge[data-type="report"]{ background:#eaf1ff; color:#0a3a88; }
.b-badge[data-type="brief"]{ background:#fff3e3; color:#8a4a00; }
.b-badge[data-type="data"]{ background:#e8f8f0; color:#007a4d; }

.b-alt{
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(31,95,204,.12) 0%, transparent 60%),
    linear-gradient(180deg, #f7faff 0%, #f4f8ff 100%);
  border-top:1px solid rgba(211,224,243,.86);
  border-bottom:1px solid rgba(211,224,243,.86);
}
.b-section{ padding: 26px 0; }
.b-section .section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px; }
.b-section .section-head h2{ position:relative; padding-bottom:6px; }
.b-section .section-head h2::after{ content:""; position:absolute; left:0; bottom:0; width:120px; height:3px; border-radius:2px; background: linear-gradient(90deg,var(--accent-red),var(--accent-orange),var(--accent-za),var(--accent-green),var(--accent-blue)); opacity:.7; }

.muted{ color: var(--muted); }

.b-logo{ aspect-ratio: 1 / 1; width:100%; border:1px solid var(--border); border-radius:12px; background:#fff; display:grid; place-items:center; overflow:hidden; margin-bottom:10px; }
.b-logo img{ max-width:80%; max-height:80%; object-fit:contain; display:block; }

/* taxonomy tags on cards */
.b-tags{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 8px 0; }
.b-tag{ display:inline-block; font-size:12px; padding:3px 8px; border-radius:999px; background:#eef4ff; color:#0a3a88; border:1px solid var(--border); }
.b-tag.area{ background:#fff3e3; color:#8a4a00; }
.b-tag.country{ background:#eaf1ff; color:#0a3a88; }
.b-tag.sector{ background:#e8f8f0; color:#007a4d; }

/* FacetWP area on home */
.home .facetwp-facet{ margin-bottom:10px; }
.home .facetwp-template .b-card{ margin-bottom:12px; }

.b-form{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  margin-top: 12px;
}
.b-form__input{
  flex: 1 1 260px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(211,224,243,.92);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  outline: none;
}
.b-form__input:focus{
  border-color: rgba(31,95,204,.55);
  box-shadow: 0 0 0 4px rgba(31,95,204,.14);
}
.b-form__button{
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, #2a6cf0 0%, #1f5fcc 40%, #1548ab 100%);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(14,38,82,.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.b-form__button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(14,38,82,.22);
  filter: saturate(1.05);
}

@media (max-width: 980px){
  .b-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .b-grid.b-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .b-hero__content{ padding: 38px 24px 32px 24px; max-width: 100%; }
}
@media (max-width: 600px){
  .b-grid, .b-grid.b-3, .b-grid.b-2{ grid-template-columns: 1fr; }
  .b-hero{ padding: 16px 0 10px; }
  .b-hero__shell{ border-radius: 22px; }
  .b-hero h1{ font-size: clamp(30px, 8vw, 40px); }
}
