/* ==========================================================================
   Featured Community Card (Main Community)
   ========================================================================== */
.featured-section {
  position: relative;
  z-index: 4;
  max-width: 1280px;
  margin: 2rem auto 4rem;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}

.featured-card {
  position: relative;
  background: linear-gradient(135deg, var(--emerald-deep) 0%, var(--ink) 100%);
  border-radius: 28px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow: hidden;
  border: 1px solid rgba(216, 173, 107, 0.15);
}

/* Ambient pattern */
.featured-card::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 100%; height: 150%;
  background-color: var(--gold-light);
  -webkit-mask-image: url('../svg/pattern/rub-el-hizb.svg');
  mask-image: url('../svg/pattern/rub-el-hizb.svg');
  -webkit-mask-size: 140px 140px;
  mask-size: 140px 140px;
  opacity: 0.05;
  pointer-events: none;
  transform: rotate(15deg);
}

.featured-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-accent);
  color: var(--gold-light);
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  background: rgba(216, 173, 107, 0.12);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 173, 107, 0.25);
}

.featured-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  color: #ffffff;
}

.featured-content p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: rgba(238, 240, 238, 0.85);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  box-shadow: 0 10px 20px -5px rgba(184, 134, 59, 0.35);
}

.featured-cta:hover {
  background: var(--gold-light);
  transform: translateY(-4px);
  box-shadow: 0 15px 25px -5px rgba(184, 134, 59, 0.5);
}

.featured-cta .icon-mask {
  width: 18px; height: 18px;
}

.featured-visual {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 45%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.featured-visual::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: -15%;
  width: 100%;
  height: 140%;
  background-image: url('../images/flags/flag-gold.png');
  background-size: contain;
  background-position: bottom left;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to right, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
  opacity: 0.35;
}

/* Header for the sub-cards below */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--emerald-deep);
  margin-bottom: 0.6rem;
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

@media (max-width: 880px) {
  .featured-section {
    margin-top: 2rem;
  }
  .featured-card {
    text-align: center;
    align-items: center;
    padding: 3rem 1.5rem;
  }
  .featured-visual {
    display: none; /* Hide complex image on mobile to keep it elegant and fast */
  }
}

@media (min-width: 881px) {
  .featured-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
