/*
 * Ponpes Online — Main CSS
 * Converted from HTML Mobile App
 * Palette: --deep-navy: #003354 | --teal-green: #148F87 | --warm-yellow: #FFB606
 * Font: Plus Jakarta Sans
 * Max-width: 480px (mobile-first)
 */

/* ══════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (VARIABLES)
   ══════════════════════════════════════════ */
:root {
  --deep-navy:     #003354;
  --teal-green:    #148F87;
  --warm-yellow:   #FFB606;

  /* Shades */
  --navy-light:    #004a7a;
  --navy-dark:     #00233a;
  --teal-light:    #1ab8ae;
  --teal-dark:     #0e6b65;
  --yellow-light:  #ffc233;
  --yellow-dark:   #e6a200;

  /* Neutrals */
  --white:         #ffffff;
  --gray-50:       #f9fafb;
  --gray-100:      #f3f4f6;
  --gray-200:      #e5e7eb;
  --gray-300:      #d1d5db;
  --gray-400:      #9ca3af;
  --gray-500:      #6b7280;
  --gray-600:      #4b5563;
  --gray-700:      #374151;
  --gray-800:      #1f2937;
  --gray-900:      #111827;

  /* Semantic */
  --success:       #22c55e;
  --error:         #ef4444;
  --warning:       #f59e0b;
  --info:          #3b82f6;

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

  /* Border radius */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.14);

  /* Transitions */
  --transition:    0.2s ease;

  /* Mobile container */
  --mobile-max:    480px;
}

/* ══════════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Mobile container wrapper */
.app-container {
  width: 100%;
  max-width: var(--mobile-max);
  min-height: 100vh;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg);
}

img { max-width: 100%; display: block; }
a { color: var(--teal-green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ══════════════════════════════════════════
   3. TYPOGRAPHY
   ══════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.text-navy  { color: var(--deep-navy); }
.text-teal  { color: var(--teal-green); }
.text-yellow{ color: var(--warm-yellow); }
.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-lg    { font-size: 1.125rem; }
.text-muted { color: var(--gray-500); }

/* ══════════════════════════════════════════
   4. HEADER / NAVBAR
   ══════════════════════════════════════════ */
.navbar {
  background: var(--deep-navy);
  color: var(--white);
  padding: 14px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--warm-yellow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-back {
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.navbar-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* ══════════════════════════════════════════
   5. BOTTOM NAVIGATION
   ══════════════════════════════════════════ */
/* Bottom nav — identik dengan referensi html_mobile (index/course/profile/alquran).
   Selector .nav-link + ikon Font Awesome. */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--mobile-max);
  height: 75px;
  background: var(--white);
  border-top: 1px solid rgba(0, 51, 84, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  width: 20%;
}

.nav-link.active { color: var(--deep-navy); }
.nav-link:hover { text-decoration: none; }
.nav-link i { font-size: 20px; }

/* ══════════════════════════════════════════
   6. MAIN CONTENT
   ══════════════════════════════════════════ */
.page-content {
  flex: 1;
  padding-bottom: 80px; /* space for bottom nav */
}

.section {
  padding: var(--space-md);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.section-link {
  font-size: 0.8rem;
  color: var(--teal-green);
  font-weight: 600;
}

/* ══════════════════════════════════════════
   7. HERO BANNER
   ══════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--teal-dark) 100%);
  padding: var(--space-xl) var(--space-md);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-greeting {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.hero-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.hero-name span { color: var(--warm-yellow); }

.hero-stats {
  display: flex;
  gap: var(--space-md);
}

.hero-stat {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  text-align: center;
}

.hero-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--warm-yellow);
}

.hero-stat .stat-label {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   8. COURSE CARD
   ══════════════════════════════════════════ */
.course-scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.course-scroll::-webkit-scrollbar { display: none; }

.course-card {
  min-width: 200px;
  max-width: 200px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.course-card-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: var(--gray-200);
}

.course-card-img-placeholder {
  width: 100%;
  height: 110px;
  background: linear-gradient(135deg, var(--teal-green), var(--deep-navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.course-card-body {
  padding: 12px;
}

.course-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-teacher {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.course-card-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-green);
}

.course-card-price.free {
  color: var(--success);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-premium { background: var(--warm-yellow); color: var(--gray-900); }
.badge-free    { background: #d1fae5; color: #065f46; }
.badge-navy    { background: var(--deep-navy); color: var(--white); }
.badge-teal    { background: var(--teal-green); color: var(--white); }

/* ══════════════════════════════════════════
   9. FEATURE MENU GRID
   ══════════════════════════════════════════ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
  text-decoration: none;
  color: var(--gray-700);
  cursor: pointer;
}

.feature-item:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--teal-green);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.feature-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  color: var(--gray-600);
}

/* ══════════════════════════════════════════
   10. FORM / AUTH
   ══════════════════════════════════════════ */
.auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-md);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--deep-navy);
}

.auth-logo-text span { color: var(--teal-green); }

.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--teal-green);
  box-shadow: 0 0 0 3px rgba(20, 143, 135, 0.12);
}

.form-control.is-invalid {
  border-color: var(--error);
}

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   11. BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  outline: none;
  line-height: 1;
}

.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--teal-green);
  color: var(--white);
}

.btn-primary:hover { background: var(--teal-dark); color: var(--white); }

.btn-navy {
  background: var(--deep-navy);
  color: var(--white);
}

.btn-yellow {
  background: var(--warm-yellow);
  color: var(--gray-900);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--teal-green);
  color: var(--teal-green);
}

.btn-ghost {
  background: transparent;
  color: var(--teal-green);
  padding: 8px 16px;
}

.btn-block { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* ══════════════════════════════════════════
   12. CARDS
   ══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body {
  padding: var(--space-md);
}

/* ══════════════════════════════════════════
   13. ALERT MESSAGES
   ══════════════════════════════════════════ */
.alert {
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: var(--space-md);
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* ══════════════════════════════════════════
   14. ISLAMIC ELEMENTS (Al-Qur'an UI)
   ══════════════════════════════════════════ */
.arabic-text {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.4rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: var(--gray-900);
}

.ayah-row {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-100);
}

.ayah-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--teal-green);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.latin-text {
  font-size: 0.875rem;
  color: var(--teal-dark);
  font-style: italic;
  margin-top: 6px;
}

.translation-text {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 4px;
}

/* Prayer checklist */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  text-align: center;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.prayer-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.prayer-check.checked {
  background: var(--teal-green);
  border-color: var(--teal-green);
  color: white;
}

.prayer-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-600);
}

/* ══════════════════════════════════════════
   15. PROGRESS BAR
   ══════════════════════════════════════════ */
.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-green), var(--teal-light));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* ══════════════════════════════════════════
   16. INTRO / SPLASH
   ══════════════════════════════════════════ */
.intro-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--deep-navy) 0%, var(--teal-dark) 60%, var(--teal-green) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  color: var(--white);
  text-align: center;
}

.intro-logo {
  width: 80px;
  height: 80px;
  background: var(--warm-yellow);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: var(--space-xl);
  box-shadow: 0 8px 32px rgba(255, 182, 6, 0.4);
}

.intro-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.intro-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 280px;
  margin: 0 auto var(--space-2xl);
}

/* ══════════════════════════════════════════
   17. UTILITIES
   ══════════════════════════════════════════ */
.d-flex        { display: flex; }
.flex-col      { flex-direction: column; }
.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm        { gap: var(--space-sm); }
.gap-md        { gap: var(--space-md); }
.mt-sm         { margin-top: var(--space-sm); }
.mt-md         { margin-top: var(--space-md); }
.mb-md         { margin-bottom: var(--space-md); }
.p-md          { padding: var(--space-md); }
.w-full        { width: 100%; }
.text-center   { text-align: center; }
.hidden        { display: none !important; }
.rounded       { border-radius: var(--radius-md); }
.rounded-full  { border-radius: var(--radius-full); }
.divider { height: 1px; background: var(--gray-200); margin: var(--space-md) 0; }
