/* ========================================================
   RetreatRX — Design System & Styles
   by Elijah Broke the Gate Apothecary Division
   ======================================================== */

/* --- CSS Variables / Tokens --- */
:root {
  /* Brand Colors */
  --deep-navy: #00456f;
  --teal: #4ca5ad;
  --rose: #bc5572;
  --forest-green: #245e2b;
  --gold: #dfd951;
  --ice-blue: #e9f7f8;
  --lavender: #896895;
  --sky-blue: #1fb1da;
  --sage: #7b995b;

  /* Neutral */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #e8ecef;
  --mid-gray: #8a9aab;
  --dark-gray: #3a4a5c;
  --near-black: #1a2332;

  /* Semantic */
  --bg-primary: var(--white);
  --bg-secondary: var(--ice-blue);
  --bg-card: var(--white);
  --text-primary: var(--near-black);
  --text-secondary: var(--dark-gray);
  --text-muted: var(--mid-gray);
  --accent-primary: var(--deep-navy);
  --accent-secondary: var(--teal);
  --accent-warm: var(--rose);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 69, 111, 0.08);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* --- App Shell --- */
.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
}

/* --- Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--deep-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 2.5px solid var(--rose);
  box-shadow: 0 2px 8px rgba(188, 85, 114, 0.3);
}

.header-title-group {
  display: flex;
  flex-direction: column;
}

.header-app-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.header-brand {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.header-ebtg-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* --- Navigation Cards (Top, above fold) --- */
.nav-cards-section {
  padding: 16px 16px 8px;
  background: linear-gradient(180deg, var(--deep-navy) 0%, var(--ice-blue) 100%);
}

.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  text-align: center;
}

.nav-card:active {
  transform: scale(0.96);
}

.nav-card-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--ice-blue);
}

.nav-card[data-tab="products"] .nav-card-icon { background: #e8f5e9; }
.nav-card[data-tab="interactions"] .nav-card-icon { background: #fce4ec; }
.nav-card[data-tab="documentary"] .nav-card-icon { background: #e3f2fd; }
.nav-card[data-tab="consultations"] .nav-card-icon { background: #fff3e0; }
.nav-card[data-tab="community"] .nav-card-icon { background: #f3e5f5; }
.nav-card[data-tab="about"] .nav-card-icon { background: #e0f2f1; }

.nav-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* --- Tab Content --- */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Home Tab --- */
.home-hero {
  position: relative;
  cursor: pointer;
}

.home-hero-poster {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.home-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--white);
}

.home-hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.home-hero-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.3);
  transition: transform var(--transition-fast);
}

.play-badge svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
  margin-left: 3px;
}

.home-hero:active .play-badge {
  transform: translate(-50%, -50%) scale(0.9);
}

/* --- Section Title --- */
.section-header {
  padding: 24px 16px 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Products Tab --- */
.products-grid {
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--light-gray);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-card:active {
  transform: scale(0.97);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--light-gray);
}

.product-info {
  padding: 10px 12px 12px;
}

.product-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.product-category {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-primary);
}

.products-cta {
  text-align: center;
  padding: 0 16px 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--deep-navy);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}

.btn-primary:active {
  transform: scale(0.97);
  background: #003a5e;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-primary);
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:active {
  background: var(--accent-primary);
  color: var(--white);
}

/* --- Interaction Checker --- */
.interactions-section {
  padding: 0 16px 24px;
}

.search-container {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-lg);
  font-size: 15px;
  background: var(--bg-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--text-primary);
}

.search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(76, 165, 173, 0.15);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid var(--teal);
}

.interaction-card.risk-major {
  border-left-color: #e53935;
}

.interaction-card.risk-moderate {
  border-left-color: #ff9800;
}

.interaction-card.risk-low {
  border-left-color: var(--sage);
}

.interaction-herb-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.interaction-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.risk-major .interaction-risk-badge {
  background: #ffebee;
  color: #c62828;
}

.risk-moderate .interaction-risk-badge {
  background: #fff3e0;
  color: #e65100;
}

.risk-low .interaction-risk-badge {
  background: #e8f5e9;
  color: #2e7d32;
}

.interaction-details {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.interaction-meds {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.interaction-meds strong {
  color: var(--text-secondary);
}

.interaction-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.interaction-source:hover {
  text-decoration: underline;
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.search-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.search-empty h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.search-empty p {
  font-size: 13px;
}

/* --- Documentary Tab --- */
.documentary-section {
  padding: 0 16px 24px;
}

.documentary-poster-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.documentary-poster-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.documentary-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.documentary-play-overlay:active {
  background: rgba(0,0,0,0.45);
}

.documentary-play-btn {
  width: 72px;
  height: 72px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.3);
}

.documentary-play-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
  margin-left: 4px;
}

.documentary-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.documentary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-watch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--deep-navy);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-watch:active {
  transform: scale(0.97);
}

.btn-donate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: var(--rose);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--rose);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-donate:active {
  background: var(--rose);
  color: var(--white);
}

/* --- Consultations Tab --- */
.consultations-section {
  padding: 0 16px 24px;
}

.consult-intro {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.team-section {
  margin-bottom: 24px;
}

.team-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--light-gray);
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--ice-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: var(--deep-navy);
  font-weight: 700;
  font-family: var(--font-display);
}

.team-info {
  flex: 1;
}

.team-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.team-role {
  font-size: 12px;
  color: var(--teal);
  font-weight: 500;
}

.services-section {
  margin-bottom: 24px;
}

.services-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--ice-blue);
  border-radius: var(--radius-md);
}

.service-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: var(--radius-sm);
}

.service-text {
  flex: 1;
}

.service-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.service-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.consult-booking {
  text-align: center;
  padding: 20px 0;
}

.consult-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.4;
}

/* --- Community / Rest Circle --- */
.community-section {
  padding: 0 16px 24px;
}

.community-intro {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Agreement Modal */
.community-agreement-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.community-agreement-overlay.active {
  display: flex;
}

.agreement-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.agreement-modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 16px;
  text-align: center;
}

.agreement-rules {
  margin-bottom: 20px;
}

.agreement-rule {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.agreement-rule-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.agreement-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Forum Tabs */
.forum-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.forum-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--light-gray);
  color: var(--text-secondary);
  background: var(--white);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.forum-tab.active {
  background: var(--deep-navy);
  color: var(--white);
  border-color: var(--deep-navy);
}

/* Post Creator */
.post-creator {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--light-gray);
}

.post-creator textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  resize: vertical;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  padding: 0;
  line-height: 1.5;
}

.post-creator textarea:focus {
  outline: none;
}

.post-creator textarea::placeholder {
  color: var(--text-muted);
}

.post-creator-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--light-gray);
  margin-top: 10px;
}

.btn-post {
  padding: 8px 20px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.btn-post:active {
  background: #3d8f96;
}

/* Posts Feed */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--light-gray);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--deep-navy);
}

.post-meta {
  flex: 1;
}

.post-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.post-time {
  font-size: 11px;
  color: var(--text-muted);
}

.post-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.post-actions {
  display: flex;
  gap: 16px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.post-action-btn:active {
  color: var(--teal);
}

.post-action-btn.liked {
  color: var(--rose);
}

/* Admin controls */
.admin-badge {
  position: relative;
}

.admin-notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--rose);
  border-radius: 50%;
  display: none;
}

.admin-notification-dot.active {
  display: block;
}

/* Admin Modal */
.admin-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-overlay.active {
  display: flex;
}

.admin-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.admin-modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.admin-password-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 12px;
}

.admin-password-input:focus {
  outline: none;
  border-color: var(--teal);
}

.admin-log {
  margin-top: 16px;
}

.admin-log-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: 13px;
  color: var(--text-secondary);
}

.admin-log-item:last-child {
  border-bottom: none;
}

.admin-log-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- About Tab --- */
.about-section {
  padding: 0 16px 32px;
}

.about-logo-container {
  text-align: center;
  margin-bottom: 24px;
}

.about-logo {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(188, 85, 114, 0.2);
  border: 3px solid var(--rose);
}

.about-app-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.about-byline {
  font-size: 13px;
  color: var(--text-muted);
}

.about-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.about-ebtg-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--ice-blue);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.about-ebtg-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.about-ebtg-info h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.about-ebtg-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.about-contact {
  margin-bottom: 24px;
}

.about-contact-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-item-icon {
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ice-blue);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--teal);
  text-decoration: none;
}

/* --- Bottom Tab Bar --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--white);
  border-top: 1px solid var(--light-gray);
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  position: relative;
}

.bottom-nav-item.active {
  color: var(--deep-navy);
}

.bottom-nav-item .nav-icon {
  font-size: 20px;
}

.bottom-nav-item .nav-label {
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Bottom spacing for fixed nav */
.app-content {
  padding-bottom: 72px;
}

/* --- Footer --- */
.app-footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--light-gray);
}

.app-footer a {
  color: var(--teal);
  text-decoration: none;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Content filter toast --- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--near-black);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--light-gray);
  border-radius: 4px;
}

/* --- Responsive fine-tuning --- */
@media (max-width: 360px) {
  .nav-cards-grid {
    gap: 8px;
  }
  .nav-card {
    padding: 10px 4px;
  }
  .nav-card-icon {
    font-size: 18px;
    width: 34px;
    height: 34px;
  }
  .nav-card-label {
    font-size: 10px;
  }
  .header-app-name {
    font-size: 18px;
  }
  .header-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
  .header-ebtg-logo {
    width: 44px;
    height: 44px;
  }
}

/* Flag button on posts */
.post-flag-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  margin-left: auto;
}

.post-flag-btn:active {
  color: var(--rose);
}

/* --- Reply / Comment Thread Styles --- */
.replies-section {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--light-gray);
}

.reply-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--light-gray);
}

.reply-card:last-child {
  border-bottom: none;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.reply-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ice-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--deep-navy);
  flex-shrink: 0;
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.reply-author {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
}

.reply-time {
  font-size: 10px;
  color: var(--text-muted);
}

.reply-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding-left: 34px;
}

.reply-box {
  margin-top: 10px;
  padding: 10px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
}

.reply-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  resize: vertical;
}

.reply-input:focus {
  outline: none;
  border-color: var(--teal);
}

.reply-input::placeholder {
  color: var(--text-muted);
}

.reply-box-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-reply {
  padding: 6px 16px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-reply:active {
  background: #3d8f96;
}

/* --- Product Image Placeholder --- */
.product-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--ice-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-placeholder-icon {
  font-size: 36px;
  opacity: 0.5;
}

/* Disclaimer */
.disclaimer {
  padding: 16px;
  margin: 0 16px 16px;
  background: #fff8e1;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.disclaimer strong {
  color: var(--text-primary);
}
