/* ==========================================================================
   APNA HCI Accessibility & Bilingual (English / Urdu) Design System
   WCAG 2.1 Compliant Text Resizing & Localization Engine
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Font Scaling (HCI 3-Tier Font System)
   -------------------------------------------------------------------------- */
html {
  transition: font-size 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tier 1: Standard / Default (100% - 16px) */
html[data-font-size="small"] {
  font-size: 14.5px !important;
}

/* Tier 2: Medium / Standard (+10% - 16px) */
html[data-font-size="medium"],
html:not([data-font-size]) {
  font-size: 16px !important;
}

/* Tier 3: Large / High Accessibility (+25% - 19px) */
html[data-font-size="large"] {
  font-size: 18.5px !important;
}

/* --------------------------------------------------------------------------
   2. Top Accessibility & Language Utility Bar
   -------------------------------------------------------------------------- */
.apna-access-bar {
  background: #080c14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 0;
  font-size: 0.8rem;
  color: #94a3b8;
  z-index: 1040;
  position: relative;
}

.apna-access-bar .access-label {
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.apna-access-bar .access-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* Font Size Selector Buttons (A- / A / A+) */
.font-size-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-font-size {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.4;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-font-size:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-font-size.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.4);
}

/* Language Toggle Buttons (English / اردو) */
.lang-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-lang-toggle {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-lang-toggle .lang-flag {
  font-size: 0.85rem;
  line-height: 1;
}

.btn-lang-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-lang-toggle.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.4);
}

/* --------------------------------------------------------------------------
   3. Floating Quick Accessibility Widget (Mobile & Deep Scroll)
   -------------------------------------------------------------------------- */
.apna-floating-access-btn {
  position: fixed;
  bottom: 85px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  z-index: 1025;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.15rem;
}

.apna-floating-access-btn:hover {
  transform: scale(1.08) translateY(-2px);
  background: #4338ca;
  color: #ffffff;
}

.apna-access-popup {
  position: fixed;
  bottom: 140px;
  right: 22px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  z-index: 1030;
  width: 270px;
  display: none;
  animation: accessPopupFade 0.2s ease forwards;
}

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

.apna-access-popup.show {
  display: block;
}

.apna-access-popup .popup-title {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apna-access-popup .popup-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
}

.apna-access-popup .popup-section-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   4. Urdu / RTL Mode Typography & Layout Styles
   -------------------------------------------------------------------------- */
html.urdu-mode,
html.urdu-mode body {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', -apple-system, sans-serif !important;
  direction: rtl !important;
  text-align: right !important;
}

html.urdu-mode h1,
html.urdu-mode h2,
html.urdu-mode h3,
html.urdu-mode h4,
html.urdu-mode h5,
html.urdu-mode h6,
html.urdu-mode .font-heading {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif !important;
  line-height: 1.95 !important;
  letter-spacing: 0 !important;
}

html.urdu-mode p,
html.urdu-mode span,
html.urdu-mode li,
html.urdu-mode a,
html.urdu-mode button,
html.urdu-mode input,
html.urdu-mode select {
  line-height: 2.1 !important;
}

/* RTL Navigation Alignment */
html.urdu-mode .modern-navmenu ul {
  flex-direction: row-reverse;
}

html.urdu-mode .modern-header .logo {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html.urdu-mode .header-auth-group {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html.urdu-mode .footer-links ul {
  padding-right: 0 !important;
}

html.urdu-mode .footer-links ul li i {
  transform: rotate(180deg);
  display: inline-block;
}

html.urdu-mode .social-links a {
  margin-right: 0 !important;
  margin-left: 8px !important;
}

html.urdu-mode .me-1,
html.urdu-mode .me-2,
html.urdu-mode .me-3 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

html.urdu-mode .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

/* --------------------------------------------------------------------------
   5. Clean Google Translate Engine Rules (Hide Default Google Bar & Toolbar)
   -------------------------------------------------------------------------- */
#google_translate_element {
  display: none !important;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body {
  top: 0px !important;
  position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#goog-gt-tt {
  display: none !important;
  visibility: hidden !important;
}

.skiptranslate iframe {
  display: none !important;
}

/* Make sure header doesn't overlap body with access bar */
body.index-page, body {
  padding-top: 104px;
}
@media (max-width: 991px) {
  body.index-page, body {
    padding-top: 96px;
  }
}
