/* ==========================================================================
   هیئت بدنسازی و پرورش اندام شهرستان فردیس - نسخه دوم (v2)
   Design Reference: photo_2026-10-05_21-08-30.jpg & photo_4_2026-10-06_10-05-24.jpg
   Theme: Luxury Sports Gold & Dark/Light Adaptive
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Common Brand Colors */
  --gold-primary: #d4af37;
  --gold-light: #f59e0b;
  --gold-dark: #b8860b;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  --gold-gradient-hover: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);

  /* Light Theme (photo_2026-10-05_21-08-30.jpg & photo_4_2026-10-06_10-05-24.jpg) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-card: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --header-bg: rgba(255, 255, 255, 0.96);
  --hero-bg: #0b0f19;
  --hero-contrast-overlay: linear-gradient(to left, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.60) 25%, rgba(255, 255, 255, 0.08) 45%, transparent 60%);
  --hero-text: #0f172a;
  --hero-muted: #475569;
  --card-fade-gradient: linear-gradient(to right, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.50) 22%, rgba(255, 255, 255, 0.05) 45%, transparent 62%);
  
  /* Reduced Softer Shadows for Cards (Light Mode) */
  --card-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.03), 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  --card-hover-shadow: 0 6px 16px -2px rgba(212, 175, 55, 0.14), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  
  --circle-arrow-bg: #ffffff;
  --circle-arrow-text: #0f172a;
  --circle-arrow-border: rgba(0, 0, 0, 0.08);
}

/* Dark Theme (ui-ux-promax.jpg & photo_2026-10-05_21-08-31.jpg) */
html.dark {
  --bg-main: #070a10;
  --bg-card: #0f1523;
  --bg-card-subtle: #172033;
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --header-bg: rgba(7, 10, 16, 0.94);
  --hero-bg: #070a10;
  --hero-contrast-overlay: linear-gradient(to left, rgba(7, 10, 16, 0.90) 0%, rgba(7, 10, 16, 0.60) 25%, rgba(7, 10, 16, 0.08) 45%, transparent 60%);
  --hero-text: #ffffff;
  --hero-muted: #94a3b8;
  --card-fade-gradient: linear-gradient(to right, rgba(15, 21, 35, 0.92) 0%, rgba(15, 21, 35, 0.50) 22%, rgba(15, 21, 35, 0.05) 45%, transparent 62%);
  
  /* Reduced Softer Shadows for Cards (Dark Mode) */
  --card-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --card-hover-shadow: 0 8px 18px -3px rgba(212, 175, 55, 0.16), 0 0 0 1px rgba(212, 175, 55, 0.25);
  
  --circle-arrow-bg: #1e293b;
  --circle-arrow-text: #ffffff;
  --circle-arrow-border: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: 74px; /* Space for Mobile Bottom Nav on small screens */
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

.fa-num {
  font-feature-settings: "ss01";
}

/* Gold Gradient Typography */
.text-gold-gradient {
  background: linear-gradient(135deg, #fef08a 0%, #d4af37 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html:not(.dark) .text-gold-gradient {
  background: linear-gradient(135deg, #b45309 0%, #d4af37 60%, #996515 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Gold Pill Button (CTA) */
.btn-gold {
  background: var(--gold-gradient);
  color: #0b0f19;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px -2px var(--gold-glow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-gold:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -2px rgba(212, 175, 55, 0.5);
  color: #000000;
}

.btn-gold:active {
  transform: translateY(0);
}

/* Gold Outline Button */
.btn-gold-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1.5px solid var(--gold-primary);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

html:not(.dark) .btn-gold-outline {
  color: #b45309;
  border-color: #d4af37;
}

.btn-gold-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-1px);
}

/* ==========================================================================
   FULL-WIDTH HERO SECTION
   ========================================================================== */
.hero-v2-fullwidth {
  position: relative;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  background-color: #070a10;
}

@media (min-width: 1024px) {
  .hero-v2-fullwidth {
    min-height: 460px;
  }
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Contrast Overlay */
.hero-contrast-mask {
  position: absolute;
  inset: 0;
  background: var(--hero-contrast-overlay);
  pointer-events: none;
}

/* Golden Decorative Wave at Bottom of Hero */
.hero-bottom-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45px;
  pointer-events: none;
  z-index: 5;
}

/* Page Sub-Hero Banner (For inner pages: gyms, services, seminars) */
.page-subhero {
  position: relative;
  width: 100%;
  padding: 48px 0 40px 0;
  background: linear-gradient(180deg, var(--bg-card-subtle) 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-card);
}

html.dark .page-subhero {
  background: linear-gradient(180deg, #0d1322 0%, #070a10 100%);
}

/* ==========================================================================
   FEATURE CARDS WITH FULL-HEIGHT IMAGE & HALO FADE
   ========================================================================== */
.feature-card-v2 {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  min-height: 120px;
  cursor: pointer;
}

.feature-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--gold-primary);
}

.feature-card-v2 .card-image-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 54%;
  overflow: hidden;
  pointer-events: none;
}

.feature-card-v2 .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  transition: transform 0.5s ease;
}

.feature-card-v2:hover .card-image-wrap img {
  transform: scale(1.08);
}

.feature-card-v2 .card-halo-gradient {
  position: absolute;
  inset: 0;
  background: var(--card-fade-gradient);
  pointer-events: none;
}

.feature-card-v2 .card-content {
  position: relative;
  z-index: 2;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  max-width: 62%;
  text-align: right;
}

.feature-card-v2 .card-gold-icon {
  width: 26px;
  height: 26px;
  color: var(--gold-primary);
  margin-bottom: 5px;
  transition: transform 0.3s ease;
}

.feature-card-v2:hover .card-gold-icon {
  transform: scale(1.12);
}

/* Directional Arrow Button on LEFT of card */
.feature-card-v2 .card-circle-arrow {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--circle-arrow-bg);
  color: var(--circle-arrow-text);
  border: 1px solid var(--circle-arrow-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all 0.25s ease;
}

.feature-card-v2:hover .card-circle-arrow {
  background: var(--gold-primary);
  color: #0b0f19;
  border-color: var(--gold-primary);
  transform: scale(1.08) translateX(-2px);
}

/* ==========================================================================
   LATEST NEWS SECTION (3 CARDS)
   ========================================================================== */
.news-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.news-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--gold-primary);
}

.news-card-v2 .image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.news-card-v2 .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card-v2:hover .image-container img {
  transform: scale(1.06);
}

.news-card-v2 .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 15, 25, 0.75) 100%);
  pointer-events: none;
}

.news-card-v2 .badge-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--gold-primary);
  color: #0b0f19;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.news-card-v2 .circle-action-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  z-index: 2;
}

.news-card-v2:hover .circle-action-btn {
  background: var(--gold-primary);
  color: #0b0f19;
  border-color: var(--gold-primary);
  transform: scale(1.1);
}

/* ==========================================================================
   LICENSED GYMS & SERVICES STYLES
   ========================================================================== */
.gym-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gym-card-v2:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: var(--card-hover-shadow);
}

.gym-grade-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gym-grade-1 {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.gym-grade-2 {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.verify-inquiry-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-subtle) 100%);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.verify-inquiry-box::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.service-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card-v2:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: var(--card-hover-shadow);
}

/* ==========================================================================
   SEMINAR SHOWCASE & REGISTRATION
   ========================================================================== */
.seminar-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.seminar-card-v2:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: var(--card-hover-shadow);
}

.seminar-score-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.entry-pass-card {
  background: linear-gradient(135deg, #0b0f19 0%, #151d30 100%);
  border: 1.5px solid #d4af37;
  border-radius: 20px;
  color: #ffffff;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.entry-pass-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold-gradient);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-card);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.mobile-bottom-nav .bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-bottom-nav .bottom-nav-item.active {
  color: var(--gold-primary);
}

.mobile-bottom-nav .bottom-nav-item.active svg {
  color: var(--gold-primary);
  transform: scale(1.15);
}

/* ==========================================================================
   HEADER BRAND LOGO & TITLE (Single Line, Never Wraps)
   ========================================================================== */
.header-brand-logo {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  text-decoration: none;
}

.header-brand-logo .brand-title-main {
  font-size: 0.8125rem; /* ~13px */
  font-weight: 800;
  white-space: nowrap !important;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .header-brand-logo .brand-title-main {
    font-size: 0.875rem; /* ~14px */
  }
}

@media (min-width: 1280px) {
  .header-brand-logo .brand-title-main {
    font-size: 0.9375rem; /* ~15px */
  }
}

.header-brand-logo .brand-title-sub {
  font-size: 0.6875rem; /* 11px */
  white-space: nowrap !important;
  line-height: 1.2;
}

/* ==========================================================================
   NAVIGATION LINKS & HEADER BUTTONS (Small Font & Single Line)
   ========================================================================== */
.nav-link-v2 {
  position: relative;
  padding: 6px 8px;
  font-size: 0.8125rem; /* ~13px */
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap !important; /* Prevents wrapping to next line */
  line-height: 1.2;
}

@media (min-width: 1280px) {
  .nav-link-v2 {
    padding: 6px 11px;
    font-size: 0.84rem;
  }
}

.nav-link-v2:hover {
  color: var(--gold-primary);
}

.nav-link-v2.active {
  color: var(--gold-primary);
  font-weight: 800;
}

html:not(.dark) .nav-link-v2.active {
  color: #b45309;
}

.nav-link-v2.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 8px;
  right: 8px;
  height: 2.5px;
  background: var(--gold-primary);
  border-radius: 2px;
}

/* Nav Login / Portal Button */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap !important;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.nav-login-btn:hover {
  background: var(--gold-gradient);
  color: #0b0f19;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--gold-glow);
}

html:not(.dark) .nav-login-btn {
  background: rgba(180, 83, 9, 0.08);
  color: #b45309;
  border-color: rgba(212, 175, 55, 0.5);
}

html:not(.dark) .nav-login-btn:hover {
  color: #000000;
}

/* ==========================================================================
   PORTAL GATEWAY LINK CARDS (خلوت و شیک برای صفحه اصلی)
   ========================================================================== */
.gateway-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.gateway-card-v2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gateway-card-v2:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--card-hover-shadow);
}

.gateway-card-v2:hover::before {
  opacity: 1;
}

.gateway-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 14px;
  transition: transform 0.3s ease;
}

.gateway-card-v2:hover .gateway-icon-badge {
  transform: scale(1.08);
}

/* ==========================================================================
   USER AUTH & LOGIN / REGISTER STYLES
   ========================================================================== */
.auth-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 26px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: all 0.3s ease;
}

html.dark .auth-card-v2 {
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
  border-color: rgba(212, 175, 55, 0.2);
}

.auth-tab-btn {
  flex: 1;
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
}

html:not(.dark) .auth-tab-btn.active {
  color: #b45309;
  border-bottom-color: #b45309;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-card);
  color: var(--text-main);
  outline: none;
  transition: all 0.25s ease;
}

.auth-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* Beautified Hamburger Drawer */
.drawer-section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  padding: 10px 10px 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
  width: 100%;
  text-align: right;
  border: none;
  cursor: pointer;
}

.drawer-link-item:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-primary);
  transform: translateX(-3px);
}

.drawer-link-item.active {
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-primary);
  border-right: 3px solid var(--gold-primary);
}

/* ==========================================================================
   MODALS & DRAWER BACKDROP
   ========================================================================== */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 16, 0.85);
  backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  overflow-y: auto;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.7);
  z-index: 10;
  padding: 24px;
}

@media (min-width: 640px) {
  .modal-box {
    padding: 32px;
  }
}

html.dark .modal-box {
  border-color: rgba(212, 175, 55, 0.25);
}

.mobile-drawer-v2 {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-v2.open {
  visibility: visible;
  opacity: 1;
}

.mobile-drawer-v2 .drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 16, 0.8);
  backdrop-filter: blur(6px);
}

.mobile-drawer-v2 .drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 330px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-card);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.3);
}

.mobile-drawer-v2.open .drawer-content {
  transform: translateX(0);
}

/* ==========================================================================
   FEDERATION V3 PORTAL STYLES (Matching iranbbf.ir & portal.iranbbf.ir)
   ========================================================================== */

/* 1. Top Utility Strip */
.portal-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  font-size: 11.5px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

/* 2. Official Federation Header Banner */
.federation-header-banner {
  background: #2b0409 url('../images/header-federation-banner.jpg') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #d4af37;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
  min-height: 84px;
}

@media (min-width: 640px) {
  .federation-header-banner {
    min-height: 140px;
  }
}

@media (min-width: 768px) {
  .federation-header-banner {
    min-height: 190px;
  }
}

.federation-header-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 60%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

.banner-pattern-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  pointer-events: none;
}

/* 3. Dark Navy Portal Navbar */
.portal-nav-bar {
  background: #0f172a;
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

html.dark .portal-nav-bar {
  background: #090d16;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.portal-nav-link {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.portal-nav-link:hover, .portal-nav-link.active {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.06);
}

/* 4. Section Ribbon Title */
.ribbon-header-wrap {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #b91c1c;
}

.ribbon-tag {
  background: #b91c1c;
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  padding: 6px 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  position: relative;
  letter-spacing: 0.3px;
}

/* 5. Colored Service Tiles (Signature portal buttons) */
.service-tile-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 10px;
  padding: 14px 16px;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  box-sizing: border-box;
}

.service-tile-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  filter: brightness(1.05);
}

.service-tile-box .tile-subtext {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 3px;
  display: block;
}

.service-tile-box .tile-maintext {
  font-size: 15px;
  font-weight: 900;
  display: block;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .service-tile-box {
    padding: 10px 10px;
    border-radius: 10px;
    min-height: 64px;
  }
  .service-tile-box .tile-subtext {
    font-size: 9px;
    margin-bottom: 2px;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .service-tile-box .tile-maintext {
    font-size: 12.5px;
    line-height: 1.25;
  }
}

.tile-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.tile-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.tile-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.tile-crimson {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.tile-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tile-navy {
  background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
}

.tile-green {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.tile-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* 6. Hero Top Stories Grid */
.hero-grid-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  background: #000;
}

.hero-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.hero-grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-grid-card:hover img {
  transform: scale(1.03);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.1) 80%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

/* 6.1 Hero Interactive Slider */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  height: 340px;
  background: #0b0f19;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
@media (min-width: 640px) {
  .hero-slider-wrap {
    height: 410px;
  }
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.02);
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}
.hero-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  opacity: 0;
}
.hero-slider-wrap:hover .hero-slider-nav-btn {
  opacity: 1;
}
.hero-slider-nav-btn:hover {
  background: #f59e0b;
  color: #0b0f19;
  border-color: #f59e0b;
}
.hero-slider-dots {
  position: absolute;
  bottom: 14px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}
.hero-slider-dot.active {
  width: 24px;
  background: #f59e0b;
}

/* 7. Horizontal News Item Card */
.news-item-horizontal {
  display: flex;
  flex-direction: row-reverse;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-card);
  transition: all 0.2s ease;
}

.news-item-horizontal:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-item-thumb {
  width: 140px;
  height: 95px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-item-horizontal:hover .news-item-thumb img {
  transform: scale(1.05);
}

/* 8. Direct Contact Ribbon */
.contact-president-ribbon {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  color: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
  transition: all 0.25s ease;
}

.contact-president-ribbon:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 8px 25px rgba(185, 28, 28, 0.45);
}

/* 9. Portal 2-Column Login Card (login-layout.png) */
.portal-login-card-v3 {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

html.dark .portal-login-card-v3 {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.portal-guide-link {
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 700;
  display: block;
  line-height: 1.8;
  transition: color 0.2s ease;
  text-decoration: none;
}

.portal-guide-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

html.dark .portal-guide-link {
  color: #60a5fa;
}

html.dark .portal-guide-link:hover {
  color: #93c5fd;
}

.btn-portal-blue {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =========================================================================
   8. ROLE-BASED AUTH & APPLE-STYLE SELECTORS
   ========================================================================= */
.role-choice-card {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  position: relative;
  overflow: hidden;
  text-align: right;
  font-family: inherit;
  outline: none;
}

button.role-choice-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
  font-family: inherit;
  outline: none;
}

html.dark .role-choice-card {
  background: #1e293b;
  border-color: #334155;
}

.role-choice-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1);
}

.role-choice-card.active {
  border-color: #2563eb !important;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.08) 0%, rgba(217, 119, 6, 0.05) 100%) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 8px 24px rgba(37, 99, 235, 0.12);
}

html.dark .role-choice-card.active {
  border-color: #60a5fa !important;
  background: rgba(30, 58, 138, 0.3) !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.apple-date-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

html.dark .apple-date-select {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

.apple-date-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.toggle-pill-btn {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

html.dark .toggle-pill-btn {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

.toggle-pill-btn.active-yes {
  background: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.toggle-pill-btn.active-no {
  background: #64748b !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

.dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

html.dark .dropzone-box {
  border-color: #334155;
  background: #0f172a;
}

.dropzone-box:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

html.dark .dropzone-box:hover {
  border-color: #60a5fa;
  background: rgba(30, 58, 138, 0.15);
}

.dropzone-box.has-file {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.btn-portal-blue:hover {
  background: #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

