/* ============================================================
   HOMEPAGE REDESIGN — loaded ONLY on the front page (is_front_page())
   All selectors below are prefixed "hp-" and are unique to this file,
   so nothing here can collide with styles used on other templates.
   ============================================================ */

/* ---------- HERO ---------- */
.hp-hero {
  position: relative;
  overflow: hidden;
  background: var(--black);
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% 100%, rgba(244,123,32,.35) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 0%, rgba(244,123,32,.18) 0%, transparent 55%),
    linear-gradient(135deg, #2a1204 0%, #1a0a00 55%, #000 100%);
  background-size: cover;
  background-position: center;
}
/* Decorative dot texture — only shows when no hero photo has been uploaded yet */
.hp-hero-bg:not([style*="url"])::before {
  content: '';
  position: absolute; inset: 0;
  opacity: .12;
  background-image: radial-gradient(circle, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hp-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.15) 100%);
}
.hp-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 90px 0 70px;
  max-width: 1180px;
  margin: 0 auto;
  width: 92%;
}
.hp-hero-text { max-width: 620px; flex: 1 1 auto; }
.hp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 6px 14px; border-radius: 4px; margin-bottom: 22px;
}
.hp-hero-text h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin-bottom: 18px;
}
.hp-hero-text p { color: rgba(255,255,255,.8); font-size: 15px; max-width: 460px; margin-bottom: 30px; }
.hp-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hp-hero-sidebar { display: flex; flex-direction: column; gap: 14px;  flex-shrink: 0; }
.hp-hero-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(20,14,10,.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 14px 18px 14px 14px;
  min-height: 108px;
  transition: all var(--transition);
}
.hp-hero-card:hover { border-color: var(--primary); transform: translateX(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.hp-hero-card-img {
  width: 80px; height: 80px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255,255,255,.06);
}
.hp-hero-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hp-hero-card-img--placeholder { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.3); font-size: 24px; }
.hp-hero-card-body { flex: 1; min-width: 0; }
.hp-hero-card-label {
  display: inline-block; font-family: var(--font-ui); font-size: 10.5px; font-weight: 700;
  color: var(--primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.hp-hero-card-body h4 {
  color: #fff; font-family: var(--font-ui); font-size: 14.5px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-hero-card-arrow { color: var(--primary); font-size: 14px; flex-shrink: 0; }

/* ---------- STATS STRIP ---------- */
.hp-stats-strip { background: #fff; border-bottom: 1px solid var(--border); padding: 26px 0; position: relative; z-index: 3; box-shadow: 0 -12px 24px rgba(0,0,0,.15); }
.hp-stats-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.hp-stat { display: flex; align-items: center; gap: 14px; position: relative; padding-left: 4px; }
.hp-stat:not(:last-child)::after {
  content: '';
  position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 32px; background: var(--border);
}
.hp-stat-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.hp-stat-num { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--text-dark); line-height: 1.2; }
.hp-stat-lbl { font-size: 11.5px; color: var(--text-light); font-family: var(--font-ui); }

/* ---------- EXPLORE BY INTEREST ---------- */
.hp-interest-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.hp-interest-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 26px 16px; text-align: center; transition: all var(--transition);
}
.hp-interest-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.hp-interest-icon {
  display: flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--primary-light); font-size: 28px;
}
.hp-interest-card h4 { font-size: 14px; margin-bottom: 6px; }
.hp-interest-card p { font-size: 12px; color: var(--text-light); margin: 0; }

/* icon tone variants, cycled across interest cards / district placeholders */
.hp-tone-0 { background: #FDE9DC; }
.hp-tone-1 { background: #E4E7FB; }
.hp-tone-2 { background: #E1F0FF; }
.hp-tone-3 { background: #EAE2FB; }

/* ---------- LATEST STORIES ---------- */
.hp-latest-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.hp-story-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-tab {
  padding: 8px 18px; border-radius: 50px; background: #fff; border: 1.5px solid var(--border);
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--text-mid);
  transition: all var(--transition);
}
.hp-tab:hover { border-color: var(--primary); color: var(--primary); }
.hp-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.hp-latest-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.hp-latest-main { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.hp-story-featured {
  grid-column: 1 / 2; grid-row: 1 / 3;
  background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.hp-story-featured-img { position: relative; display: block; height: 240px; overflow: hidden; }
.hp-story-featured-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.hp-story-featured:hover .hp-story-featured-img img { transform: scale(1.05); }
.hp-story-featured-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, transparent 22%);
  pointer-events: none;
}
.hp-story-featured-img .category-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.hp-story-featured-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.hp-story-featured-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.hp-story-featured-body p { font-size: 13.5px; margin-bottom: 14px; flex: 1; }

.hp-story-row {
  grid-column: 2 / 3;
  display: flex; gap: 14px; align-items: center;
  background: #fff; border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-sm);
  border: 1px solid transparent; transition: all var(--transition);
  min-height: 100px;
}
.hp-story-row:hover { border-color: var(--border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hp-story-row-img { width: 96px; height: 76px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.hp-story-row-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hp-row-label {
  display: inline-block; font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  color: var(--primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.hp-story-row-body h4 {
  font-size: 13.5px; margin-bottom: 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-story-row.hp-hidden { display: none; }
.hp-story-featured.hp-hidden { display: none; }

.hp-latest-sidebar { display: flex; flex-direction: column; gap: 20px; }
.hp-newsletter-card, .hp-follow-card {
  background: #fff; border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm);
}
.hp-newsletter-card h4 { margin-bottom: 6px; }
.hp-newsletter-card p { font-size: 13px; margin-bottom: 16px; }
.hp-newsletter-card .newsletter-form { flex-direction: column; }
.hp-follow-card h4 { margin-bottom: 16px; }
.hp-follow-card ul { display: flex; flex-direction: column; gap: 4px; }
.hp-follow-card li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-family: var(--font-ui);
}
.hp-follow-card li:last-child a { border-bottom: none; }
.hp-follow-card li a span { display: flex; align-items: center; gap: 10px; color: var(--text-mid); }
.hp-follow-card li a strong { color: var(--text-dark); }

/* ---------- TRENDING REELS ---------- */
.hp-reels-section { background: var(--black); padding: 50px 0 40px; overflow: hidden; }
.hp-reels-section .section-header { margin-bottom: 26px; }
.hp-reels-section .view-all { color: var(--primary); }
.hp-reels-track-wrap { position: relative; padding: 0 20px; display: flex; justify-content: center; }
.hp-reels-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth;
  padding: 0 0 6px; max-width: var(--container); width: max-content;
  margin: 0 auto;
  scrollbar-width: none;
}
.hp-reels-track::-webkit-scrollbar { display: none; }
.hp-reel-card {
  flex: 0 0 200px; background: #1a1a1a; border-radius: var(--radius-md); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hp-reel-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.hp-reel-thumb {
  position: relative; height: 280px;
  background: linear-gradient(135deg,#3a2410,#1a1a1a);
}
.hp-reel-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 45%);
}
.hp-reel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-reel-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(4px); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
  z-index: 2;
}
.hp-reel-play i { margin-left: 2px; } /* optically center the play triangle */
.hp-reel-body { padding: 12px; }
.hp-reel-body h5 { color: #fff; font-size: 13px; margin-bottom: 6px; line-height: 1.3; }
.hp-reel-body span { color: #999; font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.hp-reels-arrow {
  position: absolute; top: 130px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.hp-reels-arrow.prev { left: 0; }
.hp-reels-arrow.next { right: 0; }

/* ---------- DISTRICTS ---------- */
.hp-district-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.hp-district-card { display: block; border-radius: var(--radius-md); overflow: hidden; }
.hp-district-img { height: 110px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 10px; }
.hp-district-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hp-district-card:hover .hp-district-img img { transform: scale(1.08); }
.hp-district-img--placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 24px;
}
.hp-district-name { font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 5px; }
.hp-district-name i { color: var(--primary); font-size: 11px; }
.hp-district-count { font-size: 11.5px; color: var(--text-light); margin-left: 16px; }
.hp-district-card:hover .hp-district-name { color: var(--primary); }

/* ---------- CTA CARDS ---------- */
.hp-cta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-cta-card { background: #fff; border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-sm); border-top: 3px solid transparent; transition: all var(--transition); }
.hp-cta-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.hp-cta-icon-badge {
  width: 46px; height: 46px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; margin-bottom: 16px;
}
.hp-cta-icon-badge.community { background: #25D366; }
.hp-cta-icon-badge.story { background: #4A6CF7; }
.hp-cta-icon-badge.shop { background: var(--primary); }
.hp-cta-text h4 { margin-bottom: 8px; }
.hp-cta-text p { font-size: 13px; margin-bottom: 18px; }
.hp-cta-btns { display: flex; gap: 10px; }
.hp-cta-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; transition: transform var(--transition);
}
.hp-cta-icon-btn:hover { transform: translateY(-3px); color: #fff; }
.hp-cta-icon-btn.wa { background: #25D366; }
.hp-cta-icon-btn.tg { background: #229ED9; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .hp-stats-inner { grid-template-columns: repeat(3, 1fr); }
  .hp-interest-grid { grid-template-columns: repeat(3, 1fr); }
  .hp-district-grid { grid-template-columns: repeat(3, 1fr); }
  .hp-latest-layout { grid-template-columns: 1fr; }
  .hp-cta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hp-hero-inner { flex-direction: column; align-items: flex-start; padding: 60px 0 40px; width: 90%; }
  .hp-hero-sidebar { flex-direction: row; width: 100%; overflow-x: auto; }
  .hp-hero-card { min-width: 260px; }
  .hp-latest-main { grid-template-columns: 1fr; }
  .hp-story-featured { grid-column: 1; grid-row: auto; }
  .hp-story-row { grid-column: 1; }
}
@media (max-width: 640px) {
  .hp-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hp-interest-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-district-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-hero-sidebar { flex-direction: column; }
  .hp-reels-arrow { display: none; }
}
