/* BeginGently - Modern Design System */

:root {
  /* Color Palette */
  --primary: #2D5F4F;
  --primary-green: #2D5F4F; /* alias for library pages */
  --primary-light: #4A8B74;
  --cream: #F9F7F4;
  --sand: #E8E4DD;
  --text: #2C3832;
  --text-light: #5A6B63;
  --neutral-gray: #6B7B73;
  --neutral-light: #F2F0EB;
  --accent: #C9A87C;
  --accent-strong: #B58E5F;
  
  /* Shadows – layered for depth without heaviness */
  --shadow: 0 1px 3px rgba(44, 56, 50, 0.06), 0 4px 12px rgba(44, 56, 50, 0.04);
  --shadow-hover: 0 4px 12px rgba(44, 56, 50, 0.08), 0 12px 24px rgba(44, 56, 50, 0.06);
  --shadow-elevation: 0 8px 24px rgba(44, 56, 50, 0.08);
  --shadow-btn: 0 2px 8px rgba(45, 95, 79, 0.2);
  --shadow-btn-hover: 0 4px 14px rgba(45, 95, 79, 0.28);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

/* Dark mode */
[data-theme="dark"] {
  --primary: #6DB39E;
  --primary-green: #6DB39E;
  --primary-light: #7EC6AD;
  --cream: #1A1A1A;
  --sand: #2D2D2D;
  --text: #F0F0F0;
  --text-light: #D8D8D8;
  --neutral-gray: #C0C0C0;
  --neutral-light: #2A2A2A;
  --accent: #D4A574;
  --accent-strong: #C99563;
  
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 12px 24px rgba(0, 0, 0, 0.3);
  --shadow-elevation: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 2px 8px rgba(45, 95, 79, 0.4);
  --shadow-btn-hover: 0 4px 14px rgba(45, 95, 79, 0.5);
}

/* Brown mode */
[data-theme="brown"] {
  --primary: #7A5A3A;
  --primary-green: #7A5A3A;
  --primary-light: #9B7953;
  --cream: #F7F1E8;
  --sand: #E9DDCD;
  --text: #3A2C20;
  --text-light: #5C4B3A;
  --neutral-gray: #6F5B46;
  --neutral-light: #F2E8DC;
  --accent: #B78A58;
  --accent-strong: #9E6F3F;

  --shadow: 0 1px 3px rgba(58, 44, 32, 0.08), 0 4px 12px rgba(58, 44, 32, 0.06);
  --shadow-hover: 0 4px 12px rgba(58, 44, 32, 0.12), 0 12px 24px rgba(58, 44, 32, 0.08);
  --shadow-elevation: 0 8px 24px rgba(58, 44, 32, 0.1);
  --shadow-btn: 0 2px 8px rgba(122, 90, 58, 0.25);
  --shadow-btn-hover: 0 4px 14px rgba(122, 90, 58, 0.3);
}

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Focus visible for keyboard users */
a:focus-visible,
button:focus-visible,
.read-more-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Crimson Pro', 'Georgia', serif;
  background: linear-gradient(135deg, var(--cream) 0%, #FDFCFA 100%);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Subtle decorative background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.03;
  background-image: radial-gradient(circle at 2px 2px, var(--primary) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
nav {
  position: relative;
  z-index: 10;
  padding: 1.5rem 2rem;
  background: rgba(249, 247, 244, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand);
}

[data-theme="dark"] nav {
  background: rgba(26, 26, 26, 0.95);
  border-bottom-color: var(--sand);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.515rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-left: 2.4rem;
}

.logo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.9rem;
  height: 1.9rem;
  background: url('../images/logo-ba-green.svg') center/contain no-repeat;
}

.logo-subtitle {
  font-size: 0.6565rem;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  font-weight: 400;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Theme toggle switch - Professional */
.theme-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: #E3E3E3;
  border: 1px solid #D0D0D0;
  border-radius: 10px;
  cursor: pointer;
  margin-left: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  font-size: 8.08px;
  font-weight: 600;
  color: #666;
}

.theme-toggle::before {
  content: 'L';
  position: absolute;
  left: 4px;
  font-size: 7.07px;
  color: #888;
  transition: opacity 0.3s ease;
  letter-spacing: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  left: 2px;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover::after {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle {
  background: var(--primary);
  border-color: var(--primary);
}

[data-theme="brown"] .theme-toggle {
  background: #D3B08C;
  border-color: #C69A6A;
}

[data-theme="dark"] .theme-toggle::before {
  content: 'D';
  left: auto;
  right: 4px;
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="brown"] .theme-toggle::before {
  content: 'B';
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  color: #5c3f24;
}

[data-theme="dark"] .theme-toggle::after {
  left: 18px;
  background: white;
}

[data-theme="brown"] .theme-toggle::after {
  left: 10px;
  background: #fff7ec;
}

/* Read-more button – one per card, clear and tappable */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.88375rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid rgba(45, 95, 79, 0.35);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Crimson Pro', 'Georgia', serif;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.read-more-btn:hover {
  background: rgba(45, 95, 79, 0.08);
  border-color: var(--primary);
}

/* Page-level accessibility tools */
.access-tools {
  margin: 0 0 1.5rem;
}

.tts-toggle {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-family: 'Crimson Pro', 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tts-toggle:hover {
  background: rgba(45, 95, 79, 0.08);
}

.tts-toggle[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}


/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Main Content */
main {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 2rem;
  animation: fadeIn 0.8s ease-out;
}

.hero h1 {
  font-size: 3.535rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.3635rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  font-weight: 300;
}

.hero-cta {
  margin-bottom: 3rem;
}

.badge .badge-icon {
  color: var(--primary);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  font-weight: 500;
}

.back-link:hover {
  transform: translateX(-4px);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(74, 139, 116, 0.15), rgba(201, 168, 124, 0.1));
  border-radius: 50px;
  margin-bottom: 2rem;
  border: 1px solid rgba(74, 139, 116, 0.2);
}

.badge-text {
  font-size: 0.909rem;
  color: var(--primary);
  font-weight: 500;
}

/* Buttons – solid, clear hierarchy, no gimmicks */
button, .btn {
  padding: 0.875rem 2rem;
  font-size: 1.01rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Crimson Pro', 'Georgia', serif;
  text-decoration: none;
  min-height: 44px; /* Touch-friendly */
  -webkit-tap-highlight-color: transparent;
}

button:hover, .btn:hover {
  background: #264a3f;
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}

[data-theme="dark"] button:hover, 
[data-theme="dark"] .btn:hover {
  background: #3d7d69;
}

button:active, .btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(45, 95, 79, 0.2);
}

.btn-primary {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  background: white;
  color: var(--accent-strong);
  border: 1px solid rgba(181, 142, 95, 0.35);
  box-shadow: 0 1px 2px rgba(44, 56, 50, 0.04);
}

.btn-secondary:hover {
  background: var(--neutral-light);
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(44, 56, 50, 0.06);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-secondary {
  background: #242424;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #323232;
}

.btn-secondary.active {
  background: var(--accent-strong);
  color: white;
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-btn);
}

/* Message Box / Reassurance */
.message-box {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(44, 56, 50, 0.06);
}

[data-theme="dark"] .message-box {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.message-box p {
  margin-bottom: 1rem;
}

.message-box p:last-child {
  margin-bottom: 0;
}

/* Card – clean elevation, subtle hover */
.card {
  background: white;
  padding: 1.75rem 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(44, 56, 50, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: default;
}

[data-theme="dark"] .card {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 95, 79, 0.1);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 1.4rem;
  color: var(--text-light);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Icon Box – subtle, not decorative */
.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(45, 95, 79, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.icon-box svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.grid-large {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* Section Background Variations */
section {
  position: relative;
  z-index: 1;
}

section.bg-light {
  background: linear-gradient(135deg, rgba(45, 95, 79, 0.02), transparent);
}

/* Quote / Accent Box */
.accent-box {
  margin: 3rem 0;
  padding: 2.5rem;
  background: rgba(45, 95, 79, 0.05);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  text-align: center;
}

[data-theme="dark"] .accent-box {
  background: rgba(45, 95, 79, 0.15);
}

.accent-box p {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-weight: 300;
}

.accent-box .attribution {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
  font-style: normal;
}

/* Level Box */
.level-box {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(44, 56, 50, 0.06);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

[data-theme="dark"] .level-box {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

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

.level-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

/* responsive typography */
@media (max-width: 768px) {
  body {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 26px;
  }

  .message-box,
  .card p,
  .accent-box p {
    font-size: 26px;
  }

  .nav-links {
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 26px;
  }

  .container {
    padding: 0 1rem;
  }

  nav {
    padding: 1rem;
  }

  .badge {
    padding: 0.5rem 1.1rem;
  }

  .badge-text {
    font-size: 0.85rem;
  }

  .card h2 {
    font-size: 1.6rem;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .btn,
  button {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
  }

  .nav-links a {
    font-size: 1rem;
  }
}

.level-box p {
  color: var(--text-light);
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Heading Styles */
h1 {
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3 {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Body / Paragraph text */
p {
  font-size: 26px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Bullet points */
li {
  font-size: 26px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-light {
  color: var(--text-light);
  font-weight: 300;
}

.text-accent {
  color: var(--accent);
  font-weight: 600;
}

.text-primary {
  color: var(--primary);
  font-weight: 600;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Card CTA spacing */
.card-cta {
  margin-top: 1.5rem;
}

/* Section background alternate */
section.bg-neutral {
  background: var(--neutral-light);
}

/* Section lead paragraph (centered, subdued) */
.section-lead {
  font-size: 1.05rem;
  color: var(--neutral-gray);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Single-column grid (e.g. FAQ) */
.grid.grid-single {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card .card-title-sm {
  font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Footer */
footer {
  margin-top: 5rem;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-light);
  border-top: 1px solid var(--sand);
  font-weight: 300;
  background: rgba(249, 247, 244, 0.5);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] footer {
  background: rgba(26, 26, 26, 0.7);
  border-top-color: var(--sand);
  color: var(--text-light);
}

footer p {
  margin: 0;
  line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .container {
    padding: 0 1.5rem;
  }

  nav {
    padding: 1rem 1rem;
  }

  .navbar {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .logo {
    font-size: 1.35rem;
  }

  .logo-subtitle {
    font-size: 0.6rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .hero {
    padding-top: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.25rem;
  }

  .hero p {
    font-size: 1.2rem;
    line-height: 1.7;
  }

  h1 {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 1.25rem;
  }

  h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
  }

  h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }

  p {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    padding: 0.5rem 0.25rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
  }

  .tts-toggle {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    min-height: 44px;
    min-width: 140px;
  }

  .access-tools {
    margin: 0 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .card p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  button, .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 48px;
  }

  .accent-box {
    padding: 1.5rem;
    font-size: 1rem;
  }

  .message-box {
    padding: 1.5rem;
    font-size: 1rem;
  }

  .steps {
    padding: 1.5rem;
    gap: 1rem;
  }

  .step p {
    font-size: 1rem;
    line-height: 1.6;
  }

  footer {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  .container {
    padding: 0 1rem;
  }

  nav {
    padding: 0.75rem 1rem;
  }

  .navbar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .logo {
    font-size: 1.2rem;
    align-items: center;
    padding-left: 0;
    padding-top: 2.1rem;
  }

  .logo::before {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

  .logo-subtitle {
    font-size: 0.55rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    justify-content: center;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .tts-toggle {
    font-size: 0.85rem;
    padding: 0.7rem 1.2rem;
    min-height: 48px;
    min-width: 150px;
    margin: 0.5rem 0;
  }

  .access-tools {
    margin: 0 0 1.5rem;
    text-align: center;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding-top: 1rem;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 20px;
    line-height: 1.7;
  }

  h1 {
    font-size: 38px;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: 38px;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.15;
  }

  h3 {
    font-size: 38px;
    font-weight: 600;
    margin-bottom: 0.65rem;
    line-height: 1.15;
  }

  h4 {
    font-size: 38px;
    font-weight: 600;
    margin-bottom: 0.65rem;
    line-height: 1.15;
  }

  p {
    font-size: 26px;
    line-height: 1.65;
    margin-bottom: 0.9rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }

  .card h2 {
    font-size: 32px;
    margin-bottom: 0.65rem;
  }

  .card h3 {
    font-size: 32px;
    margin-bottom: 0.5rem;
  }

  .card p {
    font-size: 26px;
    line-height: 1.65;
    margin-bottom: 0.65rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .grid-large {
    grid-template-columns: 1fr;
  }

  button, .btn {
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .accent-box {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .message-box {
    padding: 1.25rem;
    font-size: 0.95rem;
  }

  .steps {
    padding: 1rem;
    gap: 0.75rem;
  }

  .step p {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .step-number {
    min-width: 28px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .encouragement {
    padding: 1.25rem;
  }

  .encouragement p {
    font-size: 1rem;
    line-height: 1.65;
  }

  footer {
    padding: 1.5rem 1rem;
    margin-top: 2.5rem;
    font-size: 0.9rem;
  }
}

/* Ultra Mobile - Extra Small Devices (360px and below) */
@media (max-width: 360px) {
  body {
    font-size: 14px;
    line-height: 1.55;
  }

  .container {
    padding: 0 0.75rem;
  }

  nav {
    padding: 0.75rem 0.75rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-subtitle {
    font-size: 0.5rem;
  }

  main {
    padding: 1.25rem 0.75rem;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.05;
    margin-bottom: 0.85rem;
  }

  .hero p {
    font-size: 18px;
    line-height: 1.6;
  }

  h1 {
    font-size: 38px;
    line-height: 1.05;
    margin-bottom: 0.85rem;
  }

  h2 {
    font-size: 38px;
    margin-top: 1rem;
    margin-bottom: 0.65rem;
    line-height: 1.1;
  }

  h3 {
    font-size: 38px;
    margin-bottom: 0.55rem;
    line-height: 1.1;
  }

  h4 {
    font-size: 38px;
    margin-bottom: 0.55rem;
  }

  p {
    font-size: 26px;
    line-height: 1.6;
    margin-bottom: 0.8rem;
  }

  .card {
    padding: 1rem;
  }

  .card h2 {
    font-size: 32px;
    margin-bottom: 0.65rem;
  }

  .card h3 {
    font-size: 32px;
    margin-bottom: 0.45rem;
  }

  .card p {
    font-size: 26px;
    line-height: 1.6;
    margin-bottom: 0.55rem;
  }

  button, .btn {
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    min-height: 42px;
  }

  .accent-box {
    padding: 0.9rem;
    font-size: 0.9rem;
  }

  .message-box {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .steps {
    padding: 0.9rem;
    gap: 0.65rem;
  }

  .step p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .step-number {
    min-width: 26px;
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  footer {
    padding: 1.25rem 0.75rem;
    margin-top: 2rem;
    font-size: 0.85rem;
  }
}

/* Numbered Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  background: var(--cream);
  padding: 2rem;
  border-radius: 14px;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-number {
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step p {
  color: var(--text);
  font-weight: 300;
  line-height: 1.6;
  margin: 0.25rem 0;
  font-size: 1.05rem;
}

/* Encouragement Box */
.encouragement {
  padding: 1.75rem;
  background: rgba(201, 168, 124, 0.08);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
}

.encouragement p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

.external-link::after {
  content: " \2197";
  font-size: 0.88em;
  opacity: 0.75;
}

/* Prayer Times Widget */
.prayer-section {
  margin: 3rem 0;
}

.prayer-times-widget {
  background: var(--neutral-light);
  border: 1px solid var(--sand);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.prayer-times-widget h3 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1.25rem;
  text-align: center;
}

.prayer-times-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.prayer-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--sand);
  transition: var(--transition);
}

.prayer-time:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.prayer-time.next-prayer {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-btn);
}

.prayer-time.passed {
  opacity: 0.6;
  background: var(--sand);
}

.prayer-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.prayer-name {
  font-weight: 600;
  flex: 1;
}

.prayer-time-display {
  font-weight: 500;
  font-family: 'Crimson Pro', monospace;
}

.next-badge {
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.next-prayer-info {
  text-align: center;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 0.5rem;
}

.loading-prayer-times {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.location-status {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.location-status p {
  margin: 0;
  font-size: 0.9rem;
}

.location-status strong {
  color: var(--text);
}

/* Qibla Compass Widget */
.qibla-section {
  margin: 3rem 0;
}

.qibla-compass-widget {
  background: var(--neutral-light);
  border: 1px solid var(--sand);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.qibla-compass-widget h3 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1.25rem;
  text-align: center;
}

.compass-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.compass-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cream), var(--sand));
  border: 2px solid var(--primary);
  position: relative;
  box-shadow: 0 4px 16px rgba(44, 56, 50, 0.1);
  transition: transform 0.2s ease;
  overflow: visible;
}

.compass-circle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(44, 56, 50, 0.15);
}

/* Mobile responsive manual compass */
@media (max-width: 768px) {
  .compass-circle {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .compass-circle {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 360px) {
  .compass-circle {
    width: 40px;
    height: 40px;
  }
  
  .needle-north {
    top: 2px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-bottom-width: 12px;
  }
  
  .needle-south {
    bottom: 2px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 12px;
  }
  
  .needle-qibla {
    width: 3px;
    height: 25px;
  }
  
  .mark {
    font-size: 0.6rem;
  }
}

.compass-needle {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: transform 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

.needle-north {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 20px solid #e74c3c;
  z-index: 100;
  background: #e74c3c;
}

.needle-south {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 20px solid #34495e;
  z-index: 100;
  background: #34495e;
}

.needle-qibla {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 45px;
  background: linear-gradient(to top, #27ae60, #27ae60);
  border-radius: 3px;
  box-shadow: 0 0 15px rgba(39, 174, 96, 0.8);
  z-index: 105;
  border: 2px solid #27ae60;
}

.compass-markings {
  width: 100%;
  height: 100%;
  position: absolute;
}

.mark {
  position: absolute;
  font-weight: bold;
  font-size: 0.65rem;
  color: var(--primary);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mark-n {
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.mark-s {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.mark-e {
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.mark-w {
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.qibla-info {
  background: var(--cream);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sand);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--text-light);
}

.info-value {
  font-weight: 500;
  color: var(--text);
  font-family: 'Crimson Pro', monospace;
}

.compass-instructions {
  background: var(--primary);
  color: white;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.compass-instructions p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.api-compass-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  position: relative;
}

.api-compass-image {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 16px rgba(44, 56, 50, 0.1);
  transition: transform 0.2s ease;
}

.api-compass-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(44, 56, 50, 0.15);
}

/* Mobile responsive compass */
@media (max-width: 768px) {
  .api-compass-image {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .api-compass-image {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 360px) {
  .api-compass-image {
    width: 30px;
    height: 30px;
  }
}

.compass-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.loading-qibla {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.compass-activate-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin: 1rem 0;
  display: block;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.compass-activate-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

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

.install-app-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--accent-strong);
  color: #1f2d28;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.install-app-btn:hover {
  background: var(--accent);
}

/* Share Khair Section */
.share-section {
  background: linear-gradient(135deg, #f8fafb 0%, #f1f5f9 100%);
  padding: 4rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(45, 95, 79, 0.1);
}

.share-section .container {
  text-align: center;
  max-width: 600px;
}

.share-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.share-section p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hadith-box {
  background: white;
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hadith {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.hadith-source {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  justify-content: center;
}

.whatsapp-btn {
  background: #25d366;
  color: white;
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.telegram-btn {
  background: #0088cc;
  color: white;
}

.telegram-btn:hover {
  background: #006699;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.copy-btn {
  background: var(--accent);
  color: white;
}

.copy-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 95, 79, 0.3);
}

.share-btn span {
  font-size: 1.2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .share-section {
    padding: 3rem 0;
  }
  
  .share-section h2 {
    font-size: 2rem;
  }
  
  .share-section p {
    font-size: 1.1rem;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .share-btn {
    width: 100%;
    max-width: 280px;
  }
  
  .hadith-box {
    margin: 1.5rem 0;
    padding: 1.25rem;
  }
  
  .hadith {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .share-section {
    padding: 2rem 0;
  }
  
  .share-section h2 {
    font-size: 1.8rem;
  }
  
  .share-section p {
    font-size: 1rem;
  }
}

/* Daily Reminder Section */
.reminder-section {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 4rem 0;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.reminder-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="100" fill="rgba(0,0,0,0.03)">💫</text></svg>');
  background-size: 200px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  pointer-events: none;
}

.reminder-section .container {
  text-align: center;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.reminder-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.reminder-section > p {
  font-size: 1.25rem;
  color: #92400e;
  margin-bottom: 2rem;
  font-weight: 500;
}

.reminder-tabs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tab-btn {
  background: white;
  border: 2px solid #fbbf24;
  color: #92400e;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(146, 64, 14, 0.1);
}

.tab-btn:hover {
  background: #fef3c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(146, 64, 14, 0.2);
}

.tab-btn.active {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.reminder-content {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(146, 64, 14, 0.15);
  margin-bottom: 2rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reminder-item {
  display: none;
  animation: fadeIn 0.5s ease;
}

.reminder-item.active {
  display: block;
}

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

.reminder-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1rem;
  font-style: italic;
  font-weight: 500;
}

.reminder-source {
  font-size: 1rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 1rem;
}

.reminder-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.refresh-btn, .share-reminder-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  justify-content: center;
}

.refresh-btn {
  background: #10b981;
  color: white;
}

.refresh-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.share-reminder-btn {
  background: #8b5cf6;
  color: white;
}

.share-reminder-btn:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.reminder-note {
  background: rgba(146, 64, 14, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
}

.reminder-note p {
  margin: 0;
  font-size: 1rem;
  color: #92400e;
  font-weight: 500;
}

/* Mobile Responsive for Reminder */
@media (max-width: 768px) {
  .reminder-section {
    padding: 3rem 0;
  }
  
  .reminder-section h2 {
    font-size: 2rem;
  }
  
  .reminder-section > p {
    font-size: 1.1rem;
  }
  
  .reminder-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .tab-btn {
    width: 100%;
    max-width: 280px;
  }
  
  .reminder-content {
    padding: 2rem;
    min-height: 180px;
  }
  
  .reminder-text {
    font-size: 1.2rem;
  }
  
  .reminder-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .refresh-btn, .share-reminder-btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .reminder-section {
    padding: 2rem 0;
  }
  
  .reminder-section h2 {
    font-size: 1.8rem;
  }
  
  .reminder-section > p {
    font-size: 1rem;
  }
  
  .reminder-content {
    padding: 1.5rem;
    min-height: 160px;
  }
  
  .reminder-text {
    font-size: 1.1rem;
  }
  
  .reminder-source {
    font-size: 0.9rem;
  }
}
