/* ── HOME PAGE SECTIONS ─────────────────────────────────────────────────── */

/* ── FORCE HEADER VISIBLE ── */
body > header,
header[role="banner"] {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
}

/* ── HERO ── */
.home-hero {
  background: linear-gradient(
    135deg,
    #3d1f08 0%,
    #6b3a12 35%,
    #9a5a22 65%,
    #c49040 100%
  );
  padding: 72px 28px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(0,0,0,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.home-hero::after {
  content: '✝';
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(120px, 18vw, 220px);
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
  letter-spacing: 0.04em;
}

.home-hero-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c49040;
  box-shadow: 0 0 8px rgba(196,144,64,0.8);
  flex-shrink: 0;
}

.home-hero-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.home-hero-sub {
  font-family: 'Noto Sans Myanmar', 'Padauk', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  line-height: 1.6;
}

.home-hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn-primary {
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 99px;
  padding: 13px 32px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-btn-primary:hover {
  background: #faf0e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.hero-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 99px;
  padding: 13px 32px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* ── STATS BAR ── */
.home-stats-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  box-shadow: 0 2px 12px var(--shadow);
  overflow-x: auto;
  scrollbar-width: none;
}

.home-stats-bar::-webkit-scrollbar {
  display: none;
}

.home-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 32px;
  border-right: 1px solid var(--border);
  min-width: 110px;
  flex-shrink: 0;
}

.home-stat-item:last-child {
  border-right: none;
}

.home-stat-num {
  font-family: 'Crimson Pro', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 3px;
}

.home-stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   FEATURE CARDS  (single source of truth — flex, responsive)
   ════════════════════════════════════════════════════════════════ */
.home-features {
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  padding: 40px 28px;
}

.home-features-title {
  text-align: center;
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.home-features-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 32px;
}

/* Flex layout: 3 per row on desktop, bottom row centered, wraps down on
   smaller screens. NO grid, NO !important, NO conflicting rules. */
.home-feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

.home-feature-card {
  flex: 0 1 240px;
  max-width: 240px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px 22px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  display: block;
  box-shadow: 0 2px 10px var(--shadow);
}

.home-feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--shadow);
  background: rgba(196,144,64,0.04);
}

.home-feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.home-feature-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.home-feature-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── STAT COUNTER ANIMATION ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-stat-num.animated {
  animation: countUp .5s ease forwards;
}

/* ── HEADER STAYS VISIBLE ABOVE HERO ── */
header {
  position: relative !important;
  z-index: 100 !important;
}

.home-hero {
  position: relative;
  z-index: 1;
}

/* ── HERO CLEAN WHITE STYLE ── */
.home-hero {
  background: none !important;
  padding: 40px 28px 32px;
}

.home-hero::before { display: none; }
.home-hero::after  { display: none; }

.home-hero-badge {
  background: var(--panel2);
  border-color: var(--border2);
  color: var(--muted);
}

.home-hero-badge span { background: var(--gold); }
.home-hero-title { color: var(--primary); }
.home-hero-sub   { color: var(--muted); }

.hero-btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(107,58,18,0.2);
}

.hero-btn-primary:hover {
  background: var(--primary2);
  transform: translateY(-2px);
}

.hero-btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border2);
  backdrop-filter: none;
}

.hero-btn-secondary:hover {
  background: var(--panel2);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE  (each @media is separate and properly closed)
   ════════════════════════════════════════════════════════════════ */

/* ── Tablet / small desktop ── */
@media (max-width: 820px) {
  .home-hero {
    padding: 50px 20px 44px;
  }
  .home-hero::after {
    font-size: 100px;
    opacity: 0.03;
  }
  .home-stats-bar {
    padding: 0 12px;
    justify-content: flex-start;
  }
  .home-stat-item {
    padding: 14px 20px;
    min-width: 90px;
  }
  .home-stat-num {
    font-size: 1.5rem;
  }
  .home-features {
    padding: 32px 16px;
  }
  .home-feature-grid {
    gap: 12px;
    max-width: 540px;   /* 2 cards per row */
  }
}

/* ── Mobile header compact ── */
@media (max-width: 820px) {
  #authBtn {
    margin-left: auto !important;
    margin-right: 0 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
  }
  header {
    padding: 10px 16px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .brand,
  .logo {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .logo-img,
  .brand-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }
  .logo-text h1,
  .brand h1 {
    font-size: 15px !important;
    white-space: nowrap !important;
  }
  .logo-text p,
  .brand p {
    display: none !important;
  }
  .header-right {
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  .header-right .nav-link {
    display: none !important;
  }
  .status-badge {
    display: none !important;
  }
}

/* ── Mobile stats bar compact ── */
@media (max-width: 820px) {
  .home-stats-bar {
    padding: 0 8px;
  }
  .home-stat-item {
    padding: 10px 12px;
    min-width: 70px;
  }
  .home-stat-num {
    font-size: 1.2rem;
  }
  .home-stat-label {
    font-size: 9px;
    letter-spacing: 0.03em;
  }
}

/* ── Mobile feature cards compact ── */
@media (max-width: 820px) {
  .home-features {
    padding: 20px 16px;
  }
  .home-features-title {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }
  .home-features-sub {
    font-size: 12px;
    margin-bottom: 16px;
  }
  .home-feature-grid {
    gap: 10px;
  }
  .home-feature-card {
    padding: 16px 12px 14px;
  }
  .home-feature-icon {
    font-size: 26px;
    margin-bottom: 8px;
  }
  .home-feature-name {
    font-size: 13px;
    margin-bottom: 4px;
  }
  .home-feature-desc {
    font-size: 11px;
    line-height: 1.5;
  }
}

/* ── Phone: stack cards full-width, no overflow ── */
/* ── Phone: 2 cards per row ── */
@media (max-width: 560px) {
  .home-feature-grid {
    max-width: 100%;
    gap: 10px;
    justify-content: space-between;
  }
  .home-feature-card {
    flex: 0 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
  }
  .home-hero-btns {
    flex-direction: column;
    align-items: center;
  }
  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}
/* ═══════════════════════════════════════════════════════════
   HEADER RIGHT — compact, consistent, no overflow
   ═══════════════════════════════════════════════════════════ */
.header-right {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  min-width: 0;
}

/* All header buttons share one compact size */
.header-right .btn,
.header-right #fbInboxBtn,
.header-right #fbAdminBtn,
.header-right #authBtn {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* User/Admin profile button — make it the clear accent */
.header-right #authBtn.active {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-right #authBtn.active:hover {
  background: var(--primary2);
}

/* Unread badges stay small and tucked in */
.header-right .fb-admin-badge {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
