/* =========================================================
   THEMATIC AREAS (UPDATED)
   - Header matches Partners/News style
   - Scoped styles to avoid Bootstrap card effects
   - Adds wave/pulse effect on pill buttons
   ========================================================= */

.thematic-areas-section{
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  margin: 0;

  background:
    radial-gradient(circle at 15% 25%, rgba(245, 123, 44, 0.07) 0%, transparent 38%),
    radial-gradient(circle at 80% 35%, rgba(11, 79, 102, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 55% 85%, rgba(20, 119, 109, 0.06) 0%, transparent 45%),
    linear-gradient(135deg,
      rgba(243, 250, 250, 0.96) 0%,
      rgba(255, 255, 255, 0.98) 35%,
      rgba(243, 250, 250, 0.96) 100%);
}

/* dot texture */
.thematic-areas-section::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(circle, rgba(11, 79, 102, 0.10) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  opacity: 0.14;
  pointer-events:none;
}

.thematic-areas-section .container{
  position: relative;
  z-index: 1;
}

/* =========================
   HEADER (NEWS/PARTNERS STYLE)
   ========================= */
.ta-title-wrap{
  text-align: center;
  max-width: 920px;
  margin: 0 auto 34px;
}

.ta-title-wrap h2{
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.1;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
}

.ta-title-wrap .t-primary{ color: var(--ahda-teal); }
.ta-title-wrap .t-accent{ color: var(--ahda-orange); }

.ta-underline{
  display: inline-block;
  width: min(260px, 62%);
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(245, 123, 44, 0.0) 0%,
    rgba(245, 123, 44, 0.9) 30%,
    rgba(245, 123, 44, 0.6) 55%,
    rgba(245, 123, 44, 0.0) 100%);
  position: relative;
}

.ta-underline::after{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  top:-3px;
  width:52px;
  height:12px;
  border-radius:999px;
  background: rgba(245, 123, 44, 0.18);
}

.ta-subtitle{
  margin: 10px auto 0;
  color: var(--ahda-text-gray);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 780px;
}

/* =========================
   GRID
   ========================= */
.ta-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* =========================
   CARD (Scoped, no bootstrap card look)
   ========================= */
.ta-card{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(11, 79, 102, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}

.ta-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background: linear-gradient(90deg, var(--ahda-teal), var(--ahda-green));
  opacity: .95;
  z-index: 2;
}

/* top line per type */
.ta-community::before{ background: linear-gradient(90deg, var(--ahda-maroon), var(--ahda-orange)); }
.ta-healthsys::before{ background: linear-gradient(90deg, var(--ahda-green), var(--ahda-teal)); }

.ta-card:hover{
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 123, 44, 0.25);
}

/* Media */
.ta-media{
  position: relative;
  height: 210px;
  width: 100%;
  overflow: hidden;
  background: rgba(11, 79, 102, 0.06);
}

.ta-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.ta-card:hover .ta-img{
  transform: scale(1.06);
}

/* Body */
.ta-body{
  padding: 20px 20px 24px;
}

.ta-card-title{
  margin: 0 0 10px;
  color: var(--primary-heading);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.35;
}

.ta-card-text{
  margin: 0;
  color: var(--ahda-text-gray);
  line-height: 1.65;
}

/* =========================
   WAVE BUTTON (PILL)
   ========================= */
.ta-pill{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;

  font-weight: 900;
  font-size: 0.85rem;
  color: var(--ahda-white);
  letter-spacing: .2px;

  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.18);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  overflow: visible;
}

/* Wave rings around pill */
.ta-pill::before,
.ta-pill::after{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.22);
  opacity: 0;
  animation: taPillWave 2.6s ease-out infinite;
  pointer-events:none;
}

.ta-pill::after{
  inset:-16px;
  animation-delay: .45s;
  opacity: 0;
}

@keyframes taPillWave{
  0%   { transform: scale(0.92); opacity: .55; }
  60%  { opacity: .18; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* Color variants */
.ta-pill-teal{
  background: linear-gradient(135deg, var(--ahda-teal), var(--ahda-green));
}

.ta-pill-maroon{
  background: linear-gradient(135deg, var(--ahda-maroon), var(--ahda-orange));
}

.ta-pill-green{
  background: linear-gradient(135deg, var(--ahda-green), var(--ahda-teal));
}

/* Hover: stronger wave + slight lift */
.ta-card:hover .ta-pill{
  transform: translateY(-1px);
  transition: transform .2s ease;
}

.ta-card:hover .ta-pill::before,
.ta-card:hover .ta-pill::after{
  border-color: rgba(245,123,44,0.28);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 992px){
  .thematic-areas-section{ padding: 60px 0; }
  .ta-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px){
  .thematic-areas-section{ padding: 52px 0; }
  .ta-grid{ grid-template-columns: 1fr; }
  .ta-media{ height: 200px; }
  .ta-body{ padding: 18px 18px 22px; }
  .ta-card-title{ font-size: 1.18rem; }
  .ta-subtitle{ font-size: .95rem; }
}

@media (max-width: 575.98px){
  .ta-title-wrap{ margin-bottom: 26px; }
  .ta-underline{ margin-top: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .ta-card,
  .ta-img{
    transition: none !important;
  }
  .ta-pill::before,
  .ta-pill::after{
    animation: none !important;
    opacity: .15;
  }
}

