/* Research areas — premium infographic discipline showcase */

.res-areas {
  --ra-navy: #0c2340;
  --ra-teal: #1a6b7a;
  --ra-teal-light: #2d8f9e;
  --ra-muted: #5b6b7d;
  --ra-glass-bg: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
  background: linear-gradient(180deg, #eef4f8 0%, #e8f2f8 40%, #f5f9fc 100%);
  border-top: 1px solid rgba(12, 35, 64, 0.06);
  border-bottom: 1px solid rgba(12, 35, 64, 0.06);
}

.res-areas__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.res-areas__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(26, 107, 122, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(59, 130, 196, 0.08) 0%, transparent 50%);
}

.res-areas__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(26, 107, 122, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

.res-areas__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.res-areas__orb--1 {
  width: 380px;
  height: 380px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(45, 143, 158, 0.25) 0%, transparent 70%);
}

.res-areas__orb--2 {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: -60px;
  background: radial-gradient(circle, rgba(12, 35, 64, 0.12) 0%, transparent 70%);
}

.res-areas__shape--ring {
  position: absolute;
  top: 15%;
  left: 3%;
  width: 110px;
  height: 110px;
  border: 1.5px solid rgba(26, 107, 122, 0.14);
  border-radius: 50%;
  opacity: 0.6;
}

.res-areas__shape--nodes {
  position: absolute;
  bottom: 18%;
  right: 4%;
  width: 140px;
  height: 80px;
  opacity: 0.2;
  background:
    linear-gradient(90deg, transparent 48%, rgba(26, 107, 122, 0.4) 48%, rgba(26, 107, 122, 0.4) 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(26, 107, 122, 0.4) 48%, rgba(26, 107, 122, 0.4) 52%, transparent 52%);
  background-size: 35px 35px;
}

.res-areas .container {
  position: relative;
  z-index: 1;
}

/* Header */
.res-areas__header {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.res-areas__label {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ra-teal);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(26, 107, 122, 0.16);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.res-areas__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ra-navy);
  margin-bottom: 0.85rem;
}

.res-areas__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9375rem, 1.15vw, 1.02rem);
  line-height: 1.72;
  color: var(--ra-muted);
  margin: 0;
}

/* Infographic showcase */
.res-areas__showcase {
  position: relative;
  margin-bottom: 2.5rem;
}

.res-areas__eco-line {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(26, 107, 122, 0.2) 15%,
    rgba(26, 107, 122, 0.2) 85%,
    transparent 100%
  );
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.res-areas__eco-dots {
  position: absolute;
  inset: 8% 4%;
  background-image: radial-gradient(rgba(26, 107, 122, 0.15) 2px, transparent 2px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
}

/* 5 / 2 / 1 column grid */
.res-areas__infographic-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

/* Infographic card */
.res-areas__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100%;
  padding: 1.5rem 1rem 1.25rem;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    var(--ra-glass-bg),
    linear-gradient(165deg, rgba(255, 255, 255, 0.75) 0%, rgba(232, 244, 248, 0.45) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 4px 24px rgba(12, 35, 64, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s ease,
    background 0.45s ease;
}

.res-areas__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 143, 158, 0.08) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.res-areas__card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(45, 143, 158, 0.4), transparent 55%, rgba(26, 107, 122, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.res-areas__card-num {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(26, 107, 122, 0.35);
  transition: color 0.35s ease;
}

.res-areas__card-icon {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
  color: var(--ra-teal);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(220, 238, 244, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 20px rgba(45, 143, 158, 0.12),
    0 4px 16px rgba(12, 35, 64, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.45s ease,
    background 0.45s ease,
    box-shadow 0.45s ease;
}

/* FA6 solid (.fas) requires font-weight 900 — do not use 300 */
.res-areas__card-icon i {
  display: block;
  line-height: 1;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
  font-weight: 900;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
}

.res-areas__card-body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.res-areas__card-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ra-navy);
  margin: 0 0 0.35rem;
  transition: color 0.35s ease;
}

.res-areas__card-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ra-muted);
  margin: 0;
  transition: color 0.35s ease;
}

/* Hover */
.res-areas__card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 143, 158, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(224, 240, 246, 0.7) 100%);
  box-shadow:
    0 0 0 1px rgba(45, 143, 158, 0.15),
    0 0 32px rgba(45, 143, 158, 0.18),
    0 18px 48px rgba(12, 35, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.res-areas__card:hover::before {
  opacity: 1;
}

.res-areas__card:hover::after {
  opacity: 1;
}

.res-areas__card:hover .res-areas__card-num {
  color: var(--ra-teal-light);
}

.res-areas__card:hover .res-areas__card-icon {
  transform: scale(1.08) translateY(-2px);
  color: #fff;
  background: linear-gradient(135deg, var(--ra-teal-light) 0%, var(--ra-navy) 100%);
  border-color: transparent;
  box-shadow:
    0 0 28px rgba(45, 143, 158, 0.35),
    0 6px 20px rgba(12, 35, 64, 0.15);
}

.res-areas__card:hover .res-areas__card-title {
  color: var(--ra-teal);
}

.res-areas__card:hover .res-areas__card-label {
  color: var(--ra-navy);
}

/* CTA */
.res-areas__cta {
  position: relative;
  padding: 1.75rem 2.5rem;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 40px rgba(30, 41, 59, 0.22);
}

.res-areas__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(100, 116, 139, 0.12) 0%, transparent 40%, rgba(148, 163, 184, 0.08) 100%);
  pointer-events: none;
}

.res-areas__cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.res-areas__cta-left {
  flex: 1;
  text-align: left;
}

.res-areas__cta-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.res-areas__cta-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.res-areas__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b !important;
  background: #fff;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.res-areas__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  color: #1e293b !important;
}

/* Scroll reveal */
.res-areas-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.res-areas-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.res-areas-reveal[data-delay="1"] { transition-delay: 0.05s; }
.res-areas-reveal[data-delay="2"] { transition-delay: 0.1s; }
.res-areas-reveal[data-delay="3"] { transition-delay: 0.15s; }
.res-areas-reveal[data-delay="4"] { transition-delay: 0.2s; }
.res-areas-reveal[data-delay="5"] { transition-delay: 0.25s; }
.res-areas-reveal[data-delay="6"] { transition-delay: 0.3s; }
.res-areas-reveal[data-delay="7"] { transition-delay: 0.35s; }
.res-areas-reveal[data-delay="8"] { transition-delay: 0.4s; }
.res-areas-reveal[data-delay="9"] { transition-delay: 0.45s; }
.res-areas-reveal[data-delay="10"] { transition-delay: 0.5s; }
.res-areas-reveal[data-delay="11"] { transition-delay: 0.12s; }

/* Tablet — 2 columns */
@media (max-width: 1199.98px) {
  .res-areas__infographic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .res-areas__eco-line {
    display: none;
  }
}

/* Mobile — 1 column */
@media (max-width: 575.98px) {
  .res-areas {
    padding: 2.5rem 0;
  }

  .res-areas__header {
    margin-bottom: 1.75rem;
  }

  .res-areas__infographic-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .res-areas__card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1.25rem 1.15rem;
  }

  .res-areas__card-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin-bottom: 0;
    font-size: 1.2rem;
  }

  .res-areas__card-body {
    text-align: left;
  }

  .res-areas__card-num {
    top: 0.5rem;
    right: 0.6rem;
  }

  .res-areas__card-title {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }

  .res-areas__eco-dots,
  .res-areas__shape--ring,
  .res-areas__shape--nodes {
    display: none;
  }

  .res-areas__cta {
    padding: 1.75rem 1.25rem;
  }
  .res-areas__cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .res-areas__cta-left {
    text-align: center;
  }
  .res-areas__cta-text {
    margin-bottom: 1rem;
  }
  .res-areas__cta-btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
  .res-areas {
    padding: 3.5rem 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  .res-areas__card:hover {
    transform: none;
  }

  .res-areas__card:active {
    transform: translateY(-4px);
    border-color: rgba(45, 143, 158, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .res-areas-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .res-areas__card,
  .res-areas__card-icon,
  .res-areas__cta-btn {
    transition: none;
  }

  .res-areas__card:hover,
  .res-areas__card:active {
    transform: none;
  }

  .res-areas__card:hover .res-areas__card-icon {
    transform: none;
  }
}
