* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #08547d;
  --primary-600: #0369a1;
  --primary-700: #0284c7;
  --primary-800: #0c4a6e;
  --primary-900: #082f49;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;
  --accent-800: #92400e;
  --accent-900: #78350f;
  --success: #ff6666;
  --warning: #f59e0b;
  --error: #ed2727;
  --info: #3b82f6;
  --primary-color: var(--primary-600);
  --primary-dark: var(--primary-800);
  --primary-light: var(--primary-400);
  --secondary-color: var(--gray-700);
  --secondary-dark: var(--gray-800);
  --bg: #ffffff;
  --bg-card: #ffffff;
  --surface-color: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #666666;
  --border: var(--gray-300);
  --border-color: var(--gray-300);
  --hover-bg: var(--gray-100);
  --gradient-primary: linear-gradient(135deg,
      var(--primary-500) 0%,
      var(--primary-500) 100%);
  --gradient-secondary: linear-gradient(135deg,
      var(--gray-600) 0%,
      var(--gray-700) 100%);
  --gradient-accent: linear-gradient(135deg,
      var(--accent-500) 0%,
      var(--accent-600) 100%);
  --gradient-hero: linear-gradient(135deg,
      var(--primary-500) 0%,
      var(--primary-500) 50%,
      var(--accent-600) 100%);
  --gradient-subtle: linear-gradient(135deg,
      var(--primary-50) 0%,
      var(--accent-50) 100%);
  --shadow-sm: 0 1px 2px 0 rgba(59, 130, 246, 0.03);
  --shadow:
    0 1px 2px 0 rgba(59, 130, 246, 0.05), 0 1px 1px 0 rgba(59, 130, 246, 0.03);
  --shadow-md:
    0 2px 4px -1px rgba(59, 130, 246, 0.06),
    0 1px 2px -1px rgba(59, 130, 246, 0.03);
  --shadow-lg:
    0 4px 8px -2px rgba(59, 130, 246, 0.06),
    0 2px 4px -2px rgba(59, 130, 246, 0.03);
  --shadow-xl:
    0 8px 15px -3px rgba(59, 130, 246, 0.06),
    0 4px 6px -3px rgba(59, 130, 246, 0.02);
  --shadow-2xl: 0 12px 25px -6px rgba(59, 130, 246, 0.12);
  --shadow-text: 0 1px 2px rgba(59, 130, 246, 0.2);
  --font-family-serif: "Playfair Display", Georgia, serif;
  --font-family-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors:
    color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  --animation-fade-in-up: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.darkmode {
  --primary-color: var(--primary-400);
  --primary-dark: var(--primary-300);
  --primary-light: var(--primary-200);
  --secondary-color: var(--gray-300);
  --secondary-dark: var(--gray-200);
  --bg: var(--gray-900);
  --bg-card: var(--gray-800);
  --surface-color: var(--gray-800);
  --text-primary: var(--gray-100);
  --text-secondary: var(--gray-300);
  --text-muted: var(--gray-400);
  --border: var(--gray-700);
  --border-color: var(--gray-700);
  --hover-bg: rgba(75, 85, 99, 0.3);
  --gradient-primary: linear-gradient(135deg,
      var(--primary-400) 0%,
      var(--primary-500) 100%);
  --gradient-secondary: linear-gradient(135deg,
      var(--gray-700) 0%,
      var(--gray-800) 100%);
  --gradient-hero: linear-gradient(135deg,
      var(--primary-400) 0%,
      var(--primary-500) 50%,
      var(--accent-500) 100%);
  --gradient-subtle: linear-gradient(135deg,
      var(--primary-900) 0%,
      var(--accent-900) 100%);
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  /* Fix Edge overscroll white space */
  overscroll-behavior: none;
  background-color: var(--bg);
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: var(--transition-colors);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Fix Edge overscroll and side margins */
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-serif);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition:
    var(--transition-colors),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  text-decoration: none;
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.025em;
}

.btn-primary {
  background: linear-gradient(135deg,
      var(--primary-600) 0%,
      var(--primary-700) 100%);
  color: #fff;
  box-shadow:
    0 4px 6px -1px #08547d33,
    0 2px 4px -1px #08547d1a;
  border: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fbbf241a, #fbbf2433);
  opacity: 0;
  transition: all var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 15px -3px #08547d4d,
    0 4px 6px -2px #fbbf2433;
  color: #fff;
  filter: brightness(1.05);
  border-color: #fbbf2466;
}

.btn-primary:hover:before {
  opacity: 1;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow:
    0 2px 4px -1px #08547d1a,
    0 1px 2px -1px #08547d0f;
  position: relative;
}

.btn-secondary:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
  box-shadow:
    0 4px 6px -1px #08547d26,
    0 2px 4px -1px #08547d1a;
  border-color: #fbbf244d;
}

.btn.disabled,
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  background: var(--gray-200);
  color: var(--text-muted);
  border-color: var(--border);
}

.darkmode .btn.disabled,
.darkmode .btn:disabled,
.darkmode .btn[disabled] {
  background: rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
  opacity: 0.4 !important;
}

.darkmode .btn-secondary:hover {
  background: var(--gray-800) !important;
  border-color: #fbbf244d !important;
  color: #fbbf24 !important;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow:
    0 4px 6px -1px #08547d1a,
    0 2px 4px -1px #08547d0f,
    0 0 0 1px #fbbf240d;
  border: 1px solid var(--border);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(251, 191, 36, 0.7) 25%,
      rgba(251, 191, 36, 1) 50%,
      rgba(251, 191, 36, 0.7) 75%,
      transparent 100%);
  opacity: 0;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow:
    0 10px 15px -3px #08547d26,
    0 4px 6px -2px #08547d1a,
    0 0 0 1px #fbbf2426,
    0 0 25px #fbbf241a;
  transform: translateY(-4px);
  border-color: #fbbf2433;
}

.card:hover:before {
  opacity: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.header {
  background: linear-gradient(135deg,
      var(--primary-600) 0%,
      var(--primary-700) 25%,
      var(--primary-800) 50%,
      var(--primary-900) 75%,
      #1a2332 100%);
  color: #fff;
  padding: var(--space-4) 0;
  box-shadow:
    0 10px 25px -5px #08547d33,
    0 8px 10px -6px #08547d1a,
    inset 0 1px #ffffff1a;
  position: relative;
  overflow: hidden;
}

.header:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%,
      rgba(251, 191, 36, 0.15) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 20%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%),
    linear-gradient(45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 70%);
  opacity: 0.8;
}

.header:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(251, 191, 36, 0.5) 20%,
      rgba(251, 191, 36, 0.8) 50%,
      rgba(251, 191, 36, 0.5) 80%,
      transparent 100%);
}

.header .container {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  z-index: 2;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header h1 {
  font-family: var(--font-family-serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #fff, #f1f5f9, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #fff;
  position: relative;
  letter-spacing: -0.02em;
}

.header h1:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg,
      var(--accent-400) 0%,
      var(--accent-600) 100%);
  border-radius: var(--radius-full);
  opacity: 0.9;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  background: #ffffff14;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 8px 32px #0000001a,
    inset 0 1px #fff3;
  justify-self: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  color: #ffffffe6;
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  margin: 0;
  font-size: 0.95rem;
  position: relative;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid transparent;
}

.nav a:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fbbf2400, #fbbf241a, #fbbf2400);
  border-radius: var(--radius-md);
  opacity: 0;
  transition: all var(--transition-base);
  z-index: -1;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: #fbbf2426;
  border-color: #fbbf244d;
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px #fbbf2426,
    0 3px 12px #0000001a;
}

.nav a:hover:before,
.nav a.active:before {
  opacity: 1;
}

.nav a:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }

  .header .container {
    display: block;
    padding: 0 var(--space-3);
  }

  .desktop-header-content,
  .navigation-spacious,
  .header-controls {
    display: none !important;
  }

  /* Mobile specific adjustments to ensure no desktop bleed */
  .header {
    height: auto;
    padding: var(--space-2) 0;
  }

  .theme-switch {
    width: 44px;
    height: 44px;
  }

  .language-selector select,
  #language-select,
  #languageSelect {
    padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3);
    font-size: 0.85rem;
    min-width: 100px;
    padding-right: 35px;
  }

  .language-selector select:after,
  #language-select:after,
  #languageSelect:after {
    right: 8px;
    width: 12px;
    height: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .font-size-control {
    text-align: center;
    margin-top: var(--space-4);
  }

  .font-size-control label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
  }

  .font-size-buttons {
    display: flex;
    gap: var(--space-2);
    align-items: center;
  }

  .font-size-btn {
    min-width: 35px;
    padding: var(--space-1) var(--space-2);
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  body.font-small h1 {
    font-size: 1.5rem;
  }

  body.font-small h2 {
    font-size: 1.25rem;
  }

  body.font-small h3 {
    font-size: 1.125rem;
  }

  body.font-large h1 {
    font-size: 2.25rem;
  }

  body.font-large h2 {
    font-size: 1.875rem;
  }

  body.font-large h3 {
    font-size: 1.5rem;
  }

  body.font-xlarge h1 {
    font-size: 2.5rem;
  }

  body.font-xlarge h2 {
    font-size: 2rem;
  }

  body.font-xlarge h3 {
    font-size: 1.75rem;
  }
}

.font-size-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.font-size-control label {
  color: var(--gray-200);
  font-size: 1.125rem;
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-family: var(--font-family-serif);
  display: block;
  text-align: left;
}

.font-size-buttons {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  background: #ffffff14;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 12px #0000001a,
    inset 0 1px #fff3;
}

.font-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: var(--space-2);
  background: linear-gradient(135deg, #ffffff1a, #ffffff26);
  border: 2px solid rgba(8, 84, 125, 0.3);
  border-radius: var(--radius-md);
  color: #ffffffe6;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow:
    0 2px 8px #0000001a,
    inset 0 1px #fff3;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.font-size-btn:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #08547d1a, #08547d33);
  opacity: 0;
  transition: all var(--transition-base);
}

.font-size-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: #08547d99;
  background: linear-gradient(135deg, #ffffff26, #fff3);
  box-shadow:
    0 8px 25px #08547d33,
    0 4px 12px #00000026,
    inset 0 1px #ffffff4d;
  color: #fff;
}

.font-size-btn:hover:before {
  opacity: 1;
}

.font-size-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 4px 15px #08547d33,
    0 2px 8px #0000001a,
    inset 0 1px #fff3;
}

.font-size-btn.active {
  background: var(--primary-500);
  border-color: #08547de6;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 6px 20px #08547d66,
    0 3px 10px #0003,
    inset 0 1px #ffffff4d,
    inset 0 -1px #0000001a;
  transform: translateY(-1px);
}

.font-size-btn.active:before {
  opacity: 0;
}

.font-size-btn.changing {
  animation: fontSizePulse 0.3s ease-out;
}

@keyframes fontSizePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  to {
    transform: scale(1);
  }
}

.font-size-btn[data-size="small"] {
  font-size: 0.8rem;
  min-width: 36px;
  height: 36px;
}

.font-size-btn[data-size="medium"] {
  font-size: 0.9rem;
  min-width: 40px;
  height: 40px;
}

.font-size-btn[data-size="large"] {
  font-size: 1rem;
  min-width: 44px;
  height: 44px;
}

.font-size-btn[data-size="xlarge"] {
  font-size: 1.1rem;
  min-width: 48px;
  height: 48px;
}

.darkmode .font-size-control label {
  color: #ffffffe6;
}

.darkmode .font-size-buttons {
  background: #ffffff0d;
  border-color: #ffffff1a;
}

.darkmode .font-size-btn {
  background: linear-gradient(135deg, #ffffff14, #ffffff1f);
  border-color: #08547d66;
  color: #ffffffe6;
}

.darkmode .font-size-btn:hover {
  background: linear-gradient(135deg, #ffffff1f, #ffffff2e);
  border-color: #08547db3;
}

.darkmode .font-size-btn.active {
  background: var(--primary-500);
  border-color: #08547de6;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .header .container {
    grid-template-columns: 1fr 2fr auto auto;
    gap: var(--space-6);
  }

  .header h1 {
    font-size: 2rem;
    justify-self: start;
  }

  .nav {
    justify-self: center;
  }

  .header-controls {
    justify-self: end;
    gap: var(--space-4);
  }

  .header .search-container {
    justify-self: end;
    max-width: 200px;
  }
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000c;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 2rem;
  animation: fadeIn 0.3s ease-out;
}

.search-overlay.active {
  display: flex;
}

.search-overlay-content {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 25px 50px #0000004d;
  border: 1px solid var(--border);
  animation: slideInUp 0.3s ease-out;
}

.search-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.search-overlay-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.search-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.search-close-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.search-overlay .search-box {
  position: relative;
  margin-bottom: 2rem;
}

.search-overlay .search-input-wrapper {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.search-overlay .search-input-wrapper:focus-within {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px #fbbf241a;
}

.search-overlay .search-input {
  font-size: 1.2rem;
  padding: 0.5rem 0;
  width: 100%;
}

#overlay-search-input:-webkit-autofill,
#overlay-search-input:-webkit-autofill:hover,
#overlay-search-input:-webkit-autofill:focus,
#overlay-search-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #333 !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.darkmode #overlay-search-input:-webkit-autofill,
.darkmode #overlay-search-input:-webkit-autofill:hover,
.darkmode #overlay-search-input:-webkit-autofill:focus,
.darkmode #overlay-search-input:-webkit-autofill:active {
  -webkit-box-shadow: none !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

/* Hide loading indicator in header search (not overlay) */
.header-controls .search-loading-indicator,
.search-container:not(.search-overlay) .search-loading-indicator {
  display: none !important;
}

.search-overlay .search-button {
  color: #d97706 !important;
  padding: 0.5rem;
}

.search-overlay .search-results {
  margin-top: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-overlay .search-result-item {
  background: var(--bg);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.search-overlay .search-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px #0000001a;
  border-color: var(--accent-400);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.darkmode .search-overlay {
  background: #000000e6;
}

.darkmode .search-overlay-content {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

.darkmode .search-overlay .search-input-wrapper {
  background: var(--gray-900);
  border-color: var(--gray-700);
}

.darkmode .search-overlay .search-input-wrapper:focus-within {
  border-color: var(--accent-400);
}

.darkmode .search-overlay .search-result-item {
  background: var(--gray-900);
  border-color: var(--gray-700);
}

.header .search-container {
  position: relative;
  z-index: 1000;
  max-width: 280px;
  background: none;
  padding: 0;
  margin-top: 0;
}

.header .search-box {
  position: relative;
}

.header .search-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff26;
  border-radius: var(--radius-lg);
  padding: 0.4rem 0.8rem;
  box-shadow: 0 2px 8px #0000001a;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header .search-input-wrapper:focus-within {
  background: #ffffff40;
  box-shadow: 0 4px 15px #fbbf2433;
  border-color: #fbbf2466;
  transform: translateY(-1px);
}

.header .search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  background: transparent;
  color: #fff;
  min-width: 0;
}

.header .search-input::placeholder {
  color: #ffffffb3;
}

.header .search-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: #fff !important;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-left: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.header .search-button:hover {
  background: #fbbf2433;
  color: #fff !important;
  transform: scale(1.1);
}

.darkmode .header .search-input-wrapper {
  background: #ffffff1a;
  border-color: #ffffff26;
}

.darkmode .header .search-input-wrapper:focus-within {
  background: #ffffff26;
  border-color: #fbbf2480;
}

.header-controls .search-container {
  margin-top: 0;
  position: relative;
  z-index: 1000;
  flex: 1;
  max-width: 280px;
  margin-right: var(--space-3);
  background: none;
  padding: 0;
}

.header-controls .search-box {
  position: relative;
}

.header-controls .search-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff26;
  border-radius: var(--radius-lg);
  padding: 0.4rem 0.8rem;
  box-shadow: 0 2px 8px #0000001a;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-controls .search-input-wrapper:focus-within {
  background: #ffffff40;
  box-shadow: 0 4px 15px #fbbf2433;
  border-color: #fbbf2466;
  transform: translateY(-1px);
}

.header-controls .search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  background: transparent;
  color: #fff;
  min-width: 0;
}

.header-controls .search-input::placeholder {
  color: #ffffffb3;
}

.header-controls .search-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: #fffc;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-left: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.header-controls .search-button:hover {
  background: #fbbf2433;
  color: #fff;
  transform: scale(1.1);
}

.header-controls .search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 20px #00000026;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1001;
  border: 1px solid var(--border);
  border-top: none;
}

.header-controls .search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border-radius: 15px;
  padding: 1rem;
  box-shadow: 0 4px 20px #00000026;
  border: 1px solid var(--border);
  z-index: 1000;
  min-width: 350px;
}

.darkmode .header-controls .search-input-wrapper {
  background: #ffffff1a;
  border-color: #ffffff26;
}

.darkmode .header-controls .search-input-wrapper:focus-within {
  background: #ffffff26;
  border-color: #fbbf2480;
}

.darkmode .header-controls .search-suggestions {
  background: var(--gray-800);
  border-color: var(--border);
}

.search-container:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%,
      rgba(251, 191, 36, 0.1) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 20%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%);
  opacity: 0.8;
}

.search-container .container {
  position: relative;
  z-index: 2;
}

.search-box {
  position: relative;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #fffffff2;
  border-radius: 25px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 4px 20px #00000026;
  transition: all 0.3s ease;
  max-width: 600px;
  margin: 0 auto;
}

.search-input-wrapper:focus-within {
  background: #fff;
  box-shadow: 0 8px 30px #0003;
  transform: translateY(-2px);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.5rem 0;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: 400;
}

.search-input::placeholder {
  color: #888;
  font-weight: 400;
}

.search-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary-600);
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background: #fbbf241a;
  transform: scale(1.1);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 30px #00000026;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1001;
  border: 1px solid var(--border);
}

.search-suggestion {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.search-suggestion:hover {
  background: var(--accent-50);
}

.search-suggestion:last-child {
  border-bottom: none;
  border-radius: 0 0 15px 15px;
}

.search-results {
  margin-top: var(--space-6);
  background: var(--bg-card);
  border-radius: 15px;
  padding: var(--space-6);
  box-shadow: 0 4px 20px #0000001a;
  border: 1px solid var(--border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--accent-200);
}

.search-results-header h3 {
  margin: 0;
  color: var(--primary-600);
  font-size: 1.25rem;
}

.search-results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.search-result-item {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: var(--space-3);
  transition: all 0.3s ease;
  cursor: pointer;
  background: var(--bg-card);
}

.search-result-item:hover {
  border-color: var(--primary-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px #08547d26;
}

.search-result-date {
  font-size: 0.9rem;
  color: var(--primary-600);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.search-result-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.search-result-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.search-result-highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-weight: 600;
  padding: 0 4px;
  border-radius: 4px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-no-results {
  text-align: center;
  padding: var(--space-8);
  color: var(--text-muted);
}

.search-no-results-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  opacity: 0.5;
  color: var(--text-muted);
}

.search-no-results-icon svg {
  width: 64px;
  height: 64px;
}

.search-no-results h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.darkmode .search-input-wrapper {
  background: #ffffff1a;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.darkmode .search-input-wrapper:focus-within {
  background: #ffffff26;
}

.darkmode .search-input {
  color: #fff;
}

.darkmode .search-input::placeholder {
  color: #ffffffb3;
}

.darkmode .search-suggestions {
  background: var(--gray-800);
  border: 1px solid var(--border);
}

.darkmode .search-suggestion {
  border-bottom-color: var(--border);
  color: #fff;
}

.darkmode .search-suggestion:hover {
  background: var(--gray-700);
}

.breadcrumb {
  display: flex;
  align-items: center;
  list-style: none;
  margin: var(--space-4) auto;
  padding: 0 var(--space-4);
  max-width: 1400px;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li+li:before {
  content: "/";
  margin: 0 var(--space-2);
  color: var(--text-quaternary);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.breadcrumb li:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-6) auto;
  max-width: 400px;
  max-height: 60px;
  background: var(--bg-card);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  pointer-events: none;
}

.date-navigation span {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

.date-navigation button,
.date-navigation a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  display: flex;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
}

.date-navigation .nav-arrow {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-600);
  line-height: 1;
}

@media (hover: hover) {

  .date-navigation button:hover,
  .date-navigation a:hover {
    transform: translateY(-1px) scale(1.05);
    background-color: var(--primary-50);
  }
}

.date-navigation button:active,
.date-navigation a:active {
  transform: scale(0.95);
  background-color: var(--primary-100);
}

.date-navigation button:disabled,
.date-navigation a.disabled {
  opacity: 0.6 !important;
  background-color: var(--gray-100) !important;
  border-color: var(--border) !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

@media (max-width: 480px) {
  .date-navigation span {
    white-space: normal;
    min-width: 0;
    line-height: 1.2;
    font-size: 1rem;
  }
}

.hero {
  background: linear-gradient(135deg,
      var(--primary-600) 0%,
      var(--accent-500) 100%);
  color: #fff;
  text-align: center;
  padding: var(--space-20) 0;
  margin-bottom: var(--space-8);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  text-shadow: var(--shadow-text);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  .devocional-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-8);
  }
}

.devocional-main {
  margin-bottom: var(--space-12);
}

.devocional-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.devocional-header {
  text-align: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--primary-100);
}

.devocional-date {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.devocional-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: var(--space-4);
}

.devocional-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
}

.verse-section {
  margin: var(--space-8) 0;
}

.verse-card {
  background: linear-gradient(135deg,
      var(--primary-50) 0%,
      var(--accent-50) 100%);
  border-left: 4px solid var(--primary-500);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-sm);
}

.verse-text {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--primary-700);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.verse-reference {
  font-weight: 600;
  color: var(--primary-600);
  text-align: right;
  display: block;
}

.reflexao-section {
  margin: var(--space-8) 0;
}

.reflexao-content {
  line-height: 1.8;
  color: var(--text-primary);
}

.reflexao-content p {
  margin-bottom: var(--space-4);
}

.aplicacao-section {
  background: var(--accent-50);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  border-left: 4px solid var(--accent-500);
}

.oracao-section {
  background: var(--primary-50);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  text-align: center;
}

.oracao-text {
  font-style: italic;
  font-size: 1.125rem;
  color: var(--primary-700);
  line-height: 1.7;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-height: fit-content;
  position: sticky;
  top: var(--space-4);
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.sidebar-card h3 {
  color: var(--primary-600);
  margin-bottom: var(--space-4);
  font-size: 1.25rem;
  font-weight: 600;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.nav-btn {
  flex: 1;
  max-width: 200px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
  text-decoration: none;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-btn.prev {
  flex-direction: row;
}

.nav-btn.next {
  flex-direction: row-reverse;
}

.quick-verse {
  text-align: center;
  padding: var(--space-4);
  background: linear-gradient(135deg,
      var(--primary-100) 0%,
      var(--accent-100) 100%);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.quick-verse-text {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--primary-700);
  margin-bottom: var(--space-2);
}

.quick-verse-ref {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-600);
}

.prayer-request {
  text-align: center;
}

.prayer-btn {
  width: 100%;
  margin-top: var(--space-4);
}

.topics-list {
  list-style: none;
  padding: 0;
}

.topics-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.topics-list li:last-child {
  border-bottom: none;
}

.topics-list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-colors);
}

.topics-list a:hover {
  color: var(--primary-600);
}

.personal-reflection {
  text-align: left;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.personal-reflection h3 {
  color: var(--primary-600);
  margin-bottom: var(--space-4);
  font-size: 1.25rem;
  font-weight: 600;
}

.personal-reflection p {
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-weight: 500;
}

.personal-reflection ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.personal-reflection li {
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 3px solid var(--primary-200);
  padding-left: var(--space-3);
  margin-bottom: var(--space-2);
  transition: all var(--transition-fast);
}

.personal-reflection li:hover {
  border-left-color: var(--primary-500);
  color: var(--text-primary);
  transform: translate(2px);
}

.reading-plan {
  text-align: left;
}

.reading-plan p {
  margin-bottom: var(--space-3);
  color: var(--text-primary);
  font-weight: 500;
}

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reading-list li {
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-fast);
}

.reading-list li:last-child {
  border-bottom: none;
  color: var(--primary-600);
  font-weight: 600;
}

.reading-list li:hover {
  color: var(--primary-600);
}

.darkmode .personal-reflection {
  background: var(--gray-800);
  border-color: var(--gray-600);
}

.darkmode .personal-reflection h3 {
  color: var(--primary-400);
}

.darkmode .personal-reflection li {
  border-left-color: var(--primary-400);
  color: var(--gray-300);
}

.darkmode .personal-reflection li:hover {
  border-left-color: var(--primary-300);
  color: var(--gray-100);
}

.darkmode .reading-list li {
  color: var(--gray-300);
}

.darkmode .reading-list li:last-child {
  color: var(--primary-400);
}

.darkmode .reading-list li:hover {
  color: var(--primary-600);
}

.related {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
}

.related h3 {
  color: var(--primary-600);
  margin-bottom: var(--space-4);
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

.related .related-list {
  padding: 0;
  margin: 0;
}

.related .scripture-toggle-item {
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: var(--primary-700);
}

.related .scripture-toggle-item:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.related .scripture-toggle-item.expanded {
  background: var(--primary-100);
  border-color: var(--primary-400);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.related .arrow {
  font-size: 1rem;
  color: var(--primary-600);
  transition: transform var(--transition-fast);
  font-weight: 700;
}

.related .scripture-toggle-item.expanded .arrow {
  transform: rotate(180deg);
}

.related .scripture {
  background: var(--bg-card);
  border: 1px solid var(--primary-300);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0 var(--space-4);
  margin-bottom: 0;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

.related .scripture-toggle-item.expanded+.scripture {
  max-height: 1000px;
  opacity: 1;
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border-top: 1px solid var(--primary-100);
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.darkmode .related h3 {
  color: var(--primary-400);
}

.darkmode .related .scripture-toggle-item {
  background: var(--gray-800);
  border-color: var(--gray-600);
  color: var(--primary-300);
}

.darkmode .related .scripture-toggle-item:hover,
.darkmode .related .scripture-toggle-item.expanded {
  background: var(--gray-700);
  border-color: var(--primary-400);
}

.darkmode .related .scripture {
  background: var(--gray-800);
  border-color: var(--primary-400);
  color: var(--gray-200);
}

.darkmode .related .scripture-toggle-item.expanded+.scripture {
  border-top-color: rgba(14, 165, 233, 0.2);
}

.devocional-content {
  animation: var(--animation-fade-in-up);
}

.verse-card {
  animation: var(--animation-fade-in-up);
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.sidebar-card {
  animation: var(--animation-fade-in-up);
  animation-delay: 0.4s;
  animation-fill-mode: both;
}

.prayer-section {
  background: var(--gradient-subtle);
  padding: var(--space-12) var(--space-4);
  margin: var(--space-12) 0;
  border-radius: var(--radius-xl);
}

.prayer-container {
  max-width: 800px;
  margin: 0 auto;
}

.prayer-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.prayer-header h2 {
  font-family: var(--font-family-serif);
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.prayer-verse {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-500);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow);
}

.prayer-verse blockquote {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: var(--space-3);
  color: var(--primary-700);
}

.prayer-verse cite {
  font-weight: 600;
  color: var(--primary-600);
}

.prayer-form {
  background: var(--bg-card);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.darkmode .form-input:-webkit-autofill,
.darkmode .form-input:-webkit-autofill:hover,
.darkmode .form-input:-webkit-autofill:focus,
.darkmode .form-input:-webkit-autofill:active,
.darkmode .search-input:-webkit-autofill,
.darkmode .search-input:-webkit-autofill:hover,
.darkmode .search-input:-webkit-autofill:focus,
.darkmode .search-input:-webkit-autofill:active {
  -webkit-box-shadow: var(--bg-card) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--text-primary) !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px #096c6c1a;
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-help {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-help:before {
  content: none;
}

.checkbox-group {
  margin: var(--space-6) 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-checkbox {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.form-checkbox:checked+.checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.form-checkbox:checked+.checkbox-custom:after {
  content: "?";
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.form-actions {
  text-align: center;
  margin-top: var(--space-8);
}

.prayer-submit {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 250px;
  justify-content: center;
}

.form-note {
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

.prayer-success {
  background: var(--bg-card);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--success);
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--success), var(--primary-color));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.success-icon:after {
  content: "?";
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.prayer-success h3 {
  color: var(--success);
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
}

.prayer-success p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: var(--space-6);
  color: var(--text-secondary);
}

.darkmode .prayer-verse {
  background: var(--gray-800);
}

.darkmode .prayer-verse blockquote {
  color: var(--primary-300);
}

.darkmode .prayer-verse cite {
  color: var(--primary-400);
}

.pdf-download-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}

.pdf-download-container:hover {
  border-color: var(--accent-400);
  box-shadow: 0 4px 20px #f59e0b26;
  transform: translateY(-2px);
}

.pdf-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg,
      var(--accent-500) 0%,
      var(--accent-600) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.pdf-download-btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s;
}

.pdf-download-btn:hover:before {
  left: 100%;
}

.pdf-download-btn:hover {
  background: linear-gradient(135deg,
      var(--accent-600) 0%,
      var(--accent-700) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px #f59e0b4d;
}

.pdf-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px #f59e0b33;
}

.pdf-download-btn svg {
  transition: transform 0.3s ease;
}

.pdf-download-btn:hover svg {
  transform: scale(1.1);
}

.download-icon {
  margin-left: auto;
  opacity: 0.8;
}

.pdf-description {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

[data-theme="dark"] .pdf-download-container {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .pdf-download-container:hover {
  border-color: var(--primary-400);
  box-shadow: 0 4px 20px #08547d26;
}

[data-theme="dark"] .pdf-download-btn {
  background: linear-gradient(135deg,
      var(--primary-500) 0%,
      var(--primary-600) 100%);
}

[data-theme="dark"] .pdf-download-btn:hover {
  background: linear-gradient(135deg,
      var(--primary-600) 0%,
      var(--primary-700) 100%);
  box-shadow: 0 8px 25px #08547d4d;
}

[data-theme="dark"] .pdf-download-btn:active {
  box-shadow: 0 4px 15px #08547d33;
}

.pdf-download-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.pdf-download-btn.loading span {
  opacity: 0.6;
}

.pdf-download-btn.loading .download-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .pdf-download-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .pdf-download-container {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
}

.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}

.page-header {
  text-align: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-family: var(--font-family-serif);
}

.last-updated {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9rem;
}

.legal-content {
  line-height: 1.7;
}

.legal-content section {
  margin-bottom: var(--space-8);
}

.legal-content h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
  margin-top: var(--space-6);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: var(--space-3);
  margin-top: var(--space-5);
}

.legal-content p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.legal-content ul {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.legal-content li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.legal-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.legal-content a:hover {
  border-bottom-color: var(--primary-color);
}

@media (max-width: 768px) {
  .legal-page {
    padding: var(--space-6) var(--space-3);
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .legal-content h2 {
    font-size: 1.3rem;
  }

  .legal-content ul {
    padding-left: var(--space-4);
  }
}

.loading-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
  color: var(--text-color);
}

.loading-state.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color, #e2e8f0);
  border-top-color: var(--primary-color, #08547d);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#print-overlay {
  display: none;
}

@media print {
  body>*:not(#print-overlay) {
    display: none !important;
  }

  #print-overlay {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    color: #000;
    font-family:
      Times New Roman,
      serif;
    padding: 40px;
  }

  .print-header {
    background-color: #08547d !important;
    color: #fff !important;
    padding: 20px;
    margin-bottom: 20px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-header h1,
  .print-header h2 {
    color: #fff !important;
    margin: 0;
  }

  .print-header h1 {
    font-size: 24pt;
    margin-bottom: 5px;
  }

  .print-header h2 {
    font-size: 14pt;
    font-weight: 400;
  }

  .print-meta {
    text-align: right;
    color: #666;
    font-size: 10pt;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
  }

  .p-title {
    font-size: 22pt;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
  }

  .p-subtitle {
    font-size: 14pt;
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
  }

  .p-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
  }

  .p-section h3 {
    color: #08547d;
    font-size: 14pt;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
  }

  .p-verse-box {
    padding: 0;
    margin: 20px 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .p-prayer-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .italic {
    font-style: italic;
  }

  .print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 8pt;
    color: #999;
    border-top: 1px solid #ddd;
    padding-top: 10px;
  }

  ul,
  ol {
    padding-left: 20px;
  }

  li {
    margin-bottom: 5px;
  }
}

@media (max-width: 768px) {
  .date-navigation {
    width: calc(100% - 2rem);
    max-width: 360px;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-4);
    margin: var(--space-6) auto;
    box-shadow:
      0 4px 12px #08547d1a,
      0 1px 3px #0000000d;
  }

  .date-navigation span {
    font-size: 1rem;
    min-width: auto;
    flex: 1;
  }

  .date-navigation button,
  .date-navigation a {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: flex !important;
    flex-shrink: 0 !important;
  }

  .verse-card {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow:
      0 4px 16px #08547d1a,
      0 2px 4px #0000000f;
  }

  .verse-text {
    font-size: 1.125rem;
    line-height: 1.75;
  }

  .prayer-section {
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-xl);
  }

  .prayer-form {
    padding: var(--space-6);
  }

  .form-input,
  .form-textarea {
    min-height: 48px;
    font-size: 1rem;
  }

  .prayer-submit {
    width: 100%;
    min-height: 52px;
  }
}

.search-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 50%;
  line-height: 1;
}

.devocional-content {
  min-height: 80vh;
  position: relative;
  transition: opacity 0.3s ease;
}

.devocional-content.is-loading {
  opacity: 0.4;
  pointer-events: none;
}

#devotionalLoadingState {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.darkmode .search-overlay .search-button {
  color: #fbbf2480 !important;
}