/* ==========================================================================
   صندوق الحماية الاجتماعية - سلطنة عُمان | Social Protection Fund (SPF)
   Mobile-First Stylesheet (Antislop Compliant)
   Dials: ENERGY 2 / RHYTHM 2 / MOTION 1
   ========================================================================== */

/* --- 1. CSS Custom Properties / Design Tokens --- */
:root {
  /* Brand Color Palette */
  --color-primary-green: #415a4f;
  --color-primary-dark: #32473e;
  --color-surface-green: #4a6256;
  --color-card-bg: rgba(255, 255, 255, 0.05);
  --color-card-border: rgba(255, 255, 255, 0.15);
  --color-card-border-subtle: rgba(255, 255, 255, 0.08);

  /* Accent Gold for Call to Action */
  --color-accent-gold: #e4bc65;
  --color-accent-gold-hover: #d3ab53;
  --color-accent-gold-active: #c29941;
  --color-accent-gold-text: #ffffff;

  /* Typography Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #e2ece6;
  --color-text-muted: #a7beaf;
  --color-text-dark: #1b2621;

  /* Dividers & Borders */
  --color-divider: rgba(255, 255, 255, 0.22);
  --color-focus-ring: #f3ca76;

  /* Typography */
  --font-family-base: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --line-height-base: 1.6;

  /* Layout & Spacing Scale (8pt grid basis) */
  --space-2xs: 0.25rem;
  /* 4px */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 0.75rem;
  /* 12px */
  --space-md: 1rem;
  /* 16px */
  --space-lg: 1.5rem;
  /* 24px */
  --space-xl: 2rem;
  /* 32px */
  --space-2xl: 3rem;
  /* 48px */

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Motion Dial 1: Subtle, functional, no looping decoration */
  --transition-fast: 0.18s ease-in-out;
  --transition-normal: 0.26s ease-in-out;
}

/* --- 2. Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  font-weight: 400;
  line-height: var(--line-height-base);
  background-color: var(--color-primary-green);
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Body lock when mobile drawer or modal is open */
body.scroll-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* --- 3. Accessibility & Focus States --- */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -999px;
  right: var(--space-md);
  background: var(--color-accent-gold);
  color: var(--color-text-dark);
  padding: var(--space-sm) var(--space-md);
  font-weight: 700;
  border-radius: var(--radius-xs);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- 4. Header Styles (Mobile-First - Lampiran 1 Precision) --- */
.site-header {
  background-color: var(--color-primary-green);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Top bar: aligned to the right with [Globe] English | [التسجيل] */
.header-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.625rem 1rem 0.5rem;
  direction: ltr;
  /* Keeps [Globe] English to the left of [التسجيل] */
}

.top-actions-group {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-primary);
  min-height: 44px;
  padding: 0 0.25rem;
  border-radius: var(--radius-xs);
}

.lang-switch-btn:hover {
  color: var(--color-accent-gold);
}

.lang-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.top-bar-divider {
  width: 1px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.4);
  display: inline-block;
}

.btn-auth-register {
  background-color: var(--color-accent-gold);
  color: var(--color-accent-gold-text);
  font-size: 1.0625rem;
  font-weight: 700;
  padding: 0.45rem 1.35rem;
  border-radius: 4px;
  min-height: 44px;
  min-width: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: normal;
}

.btn-auth-register:hover {
  background-color: var(--color-accent-gold-hover);
}

.btn-auth-register:active {
  background-color: var(--color-accent-gold-active);
  transform: translateY(1px);
}

/* Thin horizontal line separating top utility bar and main navbar */
.header-separator {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.25);
}

/* Main Navigation Bar: Logo on LEFT, Hamburger on RIGHT */
.header-main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  min-height: 64px;
  direction: ltr;
  /* Ensures Logo is on LEFT and Hamburger is on RIGHT as in Lampiran 1 */
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Hamburger Menu Toggle (Three white horizontal bars) */
.menu-toggle-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  /* Right aligns the bars */
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px 6px;
  border-radius: var(--radius-xs);
}

.menu-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.menu-bar {
  display: block;
  height: 2.5px;
  background-color: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-normal), width var(--transition-normal);
}

.menu-bar:nth-child(1) {
  width: 22px;
}

.menu-bar:nth-child(2) {
  width: 15px;
  /* Shorter middle bar aligned right, matching reference */
}

.menu-bar:nth-child(3) {
  width: 22px;
}

.menu-toggle-btn[aria-expanded="true"] {
  align-items: center;
}

.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  width: 22px;
}

.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
  width: 22px;
}

/* Desktop navigation links - hidden on mobile */
.desktop-nav-links {
  display: none;
}

/* --- 5. Mobile Navigation Drawer --- */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 82%;
  max-width: 340px;
  background-color: var(--color-primary-dark);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

[dir="ltr"] .mobile-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
}

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

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--color-divider);
}

.mobile-drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.drawer-close-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-primary);
  border-radius: var(--radius-xs);
}

.drawer-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-accent-gold);
}

.mobile-nav-list {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--color-card-border-subtle);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  min-height: 48px;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-accent-gold);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding: 1.5rem;
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-auth-btn {
  width: 100%;
  min-height: 44px;
  background-color: var(--color-accent-gold);
  color: var(--color-accent-gold-text);
  font-weight: 700;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 6. Main Content Area (Banner & Benefits Cards) --- */
.main-content {
  flex: 1 0 auto;
  width: 100%;
}

.hero-banner-section {
  width: 100%;
  padding: 0;
  background-color: var(--color-primary-green);
}

.banner-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 2000 / 1240;
}

/* ==========================================================================
   Beneficiary Registration Section (تسجيل منتفع)
   Mobile-First 2-Column Grid (User Requested Compact Height)
   ========================================================================== */
.benefits-section {
  width: 100%;
  background-color: #f6f8f7;
  padding: 2rem 0.75rem 2.5rem;
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Ornamental Title Header with Diamond Accent Lines */
.section-ornamental-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ornamental-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.section-main-title {
  font-size: clamp(1.25rem, 5vw, 1.85rem);
  font-weight: 800;
  color: #2b4237;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.section-subtitle {
  font-size: clamp(0.875rem, 3.5vw, 1.125rem);
  font-weight: 700;
  color: #425c50;
  margin-top: 0.25rem;
}

.ornament-line {
  flex: 1;
  max-width: 80px;
  height: 1.5px;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.line-start {
  background: linear-gradient(to right, transparent, #dca743);
  justify-content: flex-end;
}

.line-end {
  background: linear-gradient(to left, transparent, #dca743);
  justify-content: flex-start;
}

.diamond {
  color: #dca743;
  font-size: 0.8rem;
  line-height: 0;
  transform: translateY(-0.5px);
}

/* 2-Column Mobile Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}

/* Benefit Card (Compact mobile proportion) */
.benefit-card {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.benefit-card-body {
  padding: 1rem 0.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 0 auto;
}

/* Circle Icon Wrapper */
.benefit-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  flex-shrink: 0;
}

.icon-bg-elderly {
  background-color: #fcedd8;
}

.icon-bg-disability {
  background-color: #e0f2ec;
}

.icon-bg-orphans {
  background-color: #e0f1f7;
}

.icon-bg-students {
  background-color: #fde8e4;
}

.benefit-svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* Card Typography */
.benefit-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f352a;
  line-height: 1.26;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2rem;
}

.benefit-desc {
  font-size: 0.725rem;
  color: #556f62;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Bottom & Curved Scoop with Circular Button */
.benefit-card-bottom {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.benefit-cta-btn {
  position: absolute;
  top: -16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #dca743;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.benefit-cta-btn:hover {
  background-color: #cca33c;
  transform: translateY(-2px);
}

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

.cta-arrow {
  width: 17px;
  height: 17px;
}

.benefit-curve-shape {
  width: 100%;
  height: 24px;
  background-color: #3b5549;
  border-top-left-radius: 50% 12px;
  border-top-right-radius: 50% 12px;
}

/* --- 7. Footer Styles (Mobile-First as in Lampiran 2) --- */
.site-footer {
  background-color: var(--color-primary-green);
  width: 100%;
  padding: 1.75rem 1rem 1.25rem;
  position: relative;
}

/* The framed inner card matching Lampiran 2 */
.footer-card {
  background-color: #485f54;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 2.25rem 1.25rem 1.75rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

/* Oman Vision 2040 Logo Wrapper */
.footer-logo-wrapper {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-vision-logo {
  width: 146px;
  height: auto;
  max-height: 104px;
  object-fit: contain;
}

/* Footer Navigation Sections */
.footer-nav-groups {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 0.875rem;
  letter-spacing: normal;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.footer-link-item {
  display: inline-block;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #edf3f0;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  /* R-03: Minimum 44px touch target */
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xs);
  line-height: 1.4;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--color-accent-gold);
}

/* Social Media Section */
.social-links-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  direction: ltr;
  /* Keeps Facebook, YouTube, Instagram, X in that order */
}

.social-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  /* R-03: Touch target */
  height: 44px;
  color: var(--color-text-primary);
  border-radius: 50%;
  background-color: transparent;
  transition: color var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
}

.social-link-btn:hover {
  color: var(--color-accent-gold);
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- 8. Footer Bottom Bar (Copyright & Visitor Stats) --- */
.footer-bottom-bar {
  margin-top: 1.5rem;
  text-align: center;
  color: #b5c7bc;
  font-size: 0.875rem;
  max-width: 500px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.copyright-text {
  font-size: 0.875rem;
  color: #b5c7bc;
  font-weight: 500;
}

.site-meta-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #b5c7bc;
  direction: rtl;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.stat-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.85;
}

.stat-divider {
  color: var(--color-divider);
  opacity: 0.6;
}

/* --- 9. Modal Dialog (Registration & Sign In) --- */
.auth-dialog {
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  background-color: var(--color-primary-dark);
  color: var(--color-text-primary);
  max-width: 440px;
  width: 90%;
  margin: auto;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast);
}

/* --- 9b. Multi-Step Auth Flow (Step Indicator, Step Sections, Success, Loader) --- */

/* Progress Indicator */
.auth-step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem 0.25rem;
  list-style: none;
  direction: ltr;
  /* dots 1→2→3→4 tetap urut kiri-ke-kanan walau layout RTL */
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-card-border);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.step-dot.completed {
  background-color: var(--color-accent-gold-active);
  color: var(--color-accent-gold-text);
  border-color: transparent;
}

.step-dot.active {
  background-color: var(--color-accent-gold);
  color: var(--color-accent-gold-text);
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(228, 188, 101, 0.25);
}

/* Step Sections */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: stepFadeIn var(--transition-normal);
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Deskripsi singkat tiap step */
.auth-step-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 0.25rem;
  text-align: center;
}

/* OTP input — spasi lebar agar terbaca per-digit */
.form-input-otp {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.6em;
  padding-inline-end: 0.6em;
  /* kompensasi letter-spacing di kanan */
  direction: ltr;
}

/* Error text bawah input (merah lembut, selaras tema) */
.form-error-text {
  font-size: 0.75rem;
  color: #f87171;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.form-input.is-invalid,
.phone-input-group:has(.phone-input-field.is-invalid) {
  border-color: #f87171;
}

/* Tombol sekunder (Kembali / Back) */
.btn-form-back {
  min-height: 44px;
  background-color: transparent;
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn-form-back:hover {
  color: var(--color-accent-gold);
  border-color: var(--color-accent-gold);
  background-color: rgba(228, 188, 101, 0.06);
}

/* Panel Sukses (Step 4) */
.auth-success-panel {
  padding: 2rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.auth-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(134, 239, 172, 0.12);
  color: #86efac;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.auth-success-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.auth-success-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  max-width: 30ch;
}

.auth-success-panel .btn-form-submit {
  width: 100%;
  margin-top: 1rem;
}

/* Loader Overlay */
.loader-screen {
  position: fixed;
  inset: 0;
  background-color: rgba(27, 38, 33, 0.65);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--color-accent-gold);
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility: visually hidden (untuk label aksesibel di loader) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Subtle micro-bounce when user clicks backdrop instead of 'x' */
@keyframes modalStaticShake {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.auth-dialog.modal-static-shake {
  animation: modalStaticShake 0.25s ease-in-out;
}

.auth-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.auth-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-divider);
}

.auth-dialog-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent-gold);
}

.auth-dialog-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-primary);
  border-radius: var(--radius-xs);
}

.auth-dialog-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.auth-form {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-xs);
  color: var(--color-text-primary);
}

.form-input:focus {
  outline: 2px solid var(--color-focus-ring);
  border-color: transparent;
}

/* Phone input with country code group */
.phone-input-group {
  display: flex;
  direction: ltr;
  /* Keeps +968 on the left and 8-digit number on the right */
  align-items: center;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  min-height: 44px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.phone-input-group:focus-within {
  outline: 2px solid var(--color-focus-ring);
  border-color: transparent;
}

.country-code-addon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-accent-gold);
  background-color: rgba(0, 0, 0, 0.25);
  border-right: 1px solid var(--color-card-border);
  height: 44px;
  user-select: none;
}

.country-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.country-dial-code {
  font-family: inherit;
  letter-spacing: 0.5px;
}

.phone-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
  direction: ltr;
  letter-spacing: 0.8px;
}

.phone-input-field::placeholder {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  letter-spacing: normal;
}

.form-helper-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.btn-form-submit {
  min-height: 44px;
  background-color: var(--color-accent-gold);
  color: var(--color-accent-gold-text);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-form-submit:hover {
  background-color: var(--color-accent-gold-hover);
}

.auth-feedback-msg {
  font-size: 0.875rem;
  color: #a3e635;
  text-align: center;
  min-height: 1.25rem;
}

/* --- 10. Responsive Breakpoints (Tablet & Desktop Progressive Enhancement) --- */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .site-header {
    padding: 0 1.5rem;
  }

  .header-top-bar {
    padding: 0.625rem 0;
  }

  .header-main-nav {
    padding: 0.875rem 0;
  }

  .brand-logo-img {
    height: 50px;
  }

  /* Benefits Grid on Tablet: 4 columns in a row */
  .benefits-section {
    padding: 3rem 1.5rem 3.5rem;
  }

  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .benefit-card-body {
    padding: 1.25rem 0.75rem 0.5rem;
  }

  .benefit-icon-circle {
    width: 56px;
    height: 56px;
  }

  .benefit-svg {
    width: 36px;
    height: 36px;
  }

  .benefit-title {
    font-size: 0.9375rem;
    min-height: 2.5rem;
  }

  .benefit-desc {
    font-size: 0.775rem;
  }

  /* Reflow footer card for tablets: wider with balanced two-column groups */
  .site-footer {
    padding: 2.5rem 1.5rem 2rem;
  }

  .footer-card {
    max-width: 720px;
    padding: 2.5rem 2rem 2rem;
  }

  .footer-nav-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    row-gap: 2.25rem;
  }

  .footer-nav-group:nth-child(3) {
    grid-column: 1 / 2;
  }

  .footer-nav-group:nth-child(4) {
    grid-column: 2 / 3;
  }

  .footer-bottom-bar {
    max-width: 720px;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .site-header {
    padding: 0 2rem;
  }

  .brand-logo-img {
    height: 56px;
  }

  /* Show desktop navigation bar and keep mobile menu toggle as backup or hidden */
  .desktop-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .desktop-nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.5rem 0.25rem;
    position: relative;
  }

  .desktop-nav-link:hover,
  .desktop-nav-link:focus-visible {
    color: var(--color-accent-gold);
  }

  .menu-toggle-btn {
    display: none;
  }

  .banner-container {
    max-width: 1440px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  /* Benefits Grid on Desktop */
  .benefits-section {
    padding: 3.5rem 2rem 4rem;
  }

  .benefits-grid {
    gap: 1.5rem;
  }

  .benefit-card-body {
    padding: 1.5rem 1rem 0.6rem;
  }

  .benefit-icon-circle {
    width: 62px;
    height: 62px;
    margin-bottom: 0.85rem;
  }

  .benefit-svg {
    width: 40px;
    height: 40px;
  }

  .benefit-title {
    font-size: 1.05rem;
    min-height: 2.8rem;
    margin-bottom: 0.5rem;
  }

  .benefit-desc {
    font-size: 0.825rem;
  }

  .benefit-cta-btn {
    width: 40px;
    height: 40px;
    top: -18px;
  }

  .benefit-curve-shape {
    height: 28px;
  }

  .hero-banner-section {
    padding: 1rem 2rem;
  }

  /* Reflow footer card to 4 columns on large screens */
  .footer-card {
    max-width: 1080px;
    padding: 3rem 2.5rem 2.5rem;
  }

  .footer-nav-groups {
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    text-align: right;
  }

  [dir="ltr"] .footer-nav-groups {
    text-align: left;
  }

  .footer-nav-group {
    align-items: flex-start;
  }

  .footer-links-list {
    align-items: flex-start;
  }

  .footer-group-title {
    align-self: flex-start;
  }

  .social-links-list {
    justify-content: flex-start;
  }

  .footer-bottom-bar {
    max-width: 1080px;
  }
}