/* Water Baptism Study Pages Styles */

.study-layout {
  display: flex;
  gap: 40px;
  /* Optimized gap for wider content */
  padding: 15px 0 100px;
  /* Pulled up for tighter integration with header */
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.study-sidebar {
  width: 280px;
  /* Reduced for elegant text fit */
  flex-shrink: 0;
}

.sidebar-nav {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 28px;
  position: sticky;
  top: 140px;
  /* Clears navbar + breadcrumbs */
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 28px;
  position: sticky;
  top: 94px;
  /* 64px nav + 30px breathing room */
  border: 1px solid rgba(0, 0, 0, 0.04);
  /* Scrollbar removed per user request - expanding naturally */
}

/* Custom scrollbar styling */
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4a574 0%, #c69563 100%);
  border-radius: 4px;
  transition: background 0.2s;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c69563 0%, #b88552 100%);
}

/* Firefox scrollbar */
.sidebar-nav {
  scrollbar-color: #d4a574 transparent;
  scrollbar-width: thin;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #1a3a52;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #d4a574;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin-bottom: 8px;
}

.sidebar-list a {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  font-size: 0.9rem;
  color: #555;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
  /* Tighter for wrapped text */
}

.sidebar-list a:hover {
  background: #f5f7fa;
  color: #1a3a52;
  transform: translateX(3px);
}

.sidebar-list a.active {
  background: linear-gradient(135deg, #1a3a52 0%, #2a5278 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.25);
}

.sidebar-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 20px;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.sidebar-back:hover {
  color: #1a3a52;
}

.sidebar-back svg {
  width: 16px;
  height: 16px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: #f5f7fa;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-toggle a {
  flex: 1;
  text-align: center;
  padding: 11px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  color: #666;
}

.lang-toggle a:hover {
  color: #1a3a52;
}

.lang-toggle a.active {
  background: linear-gradient(135deg, #1a3a52 0%, #2a5278 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.3);
}

.study-main {
  flex: 1;
  min-width: 0;
}

.study-body {
  background: white;
  padding: 60px;
  /* Standardized symmetric padding */
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.study-title {
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  font-size: 1.8rem;
  color: #1a3a52;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #d4a574;
}

.study-body h3 {
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  font-size: 1.2rem;
  color: #1a3a52;
  margin: 35px 0 15px;
}

.study-body p {
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  line-height: 2.0;
  color: #444;
  margin-bottom: 20px;
  text-align: justify !important;
  max-width: none !important;
  width: 100%;
  display: block;
}

.study-body ul,
.study-body ol {
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  line-height: 2.0;
  color: #444;
  margin: 20px 0 20px 25px;
}

.study-body * {
  text-align: justify !important;
}

.study-body h1,
.study-body h2,
.study-body h3,
.study-body h4 {
  text-align: left !important;
  text-wrap: auto !important;
  /* Override global 'balance' to prevent premature wrapping */
}

.study-body li {
  margin-bottom: 10px;
}

.scripture-ref {
  background: linear-gradient(135deg, #f8f9fb 0%, #f0f3f7 100%);
  padding: 20px 25px;
  border-radius: 12px;
  border-left: 4px solid #d4a574;
  margin: 25px 0;
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  color: #555;
  line-height: 2;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1a3a52 0%, #2a5278 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
}

/* Page Nav Button Hover Bridge */
.page-nav-btn::after {
  content: '';
  position: absolute;
  inset: -5px;
  background: transparent;
  z-index: -1;
}

.page-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 58, 82, 0.3);
}

.page-nav-btn svg {
  width: 18px;
  height: 18px;
}

.page-nav-btn.secondary {
  background: #f5f7fa;
  color: #1a3a52;
}

.page-nav-btn.secondary:hover {
  background: #eef1f5;
  box-shadow: none;
  transform: none;
}

/* Mobile responsive */
@media (max-width: 900px) {
  .study-layout {
    flex-direction: column;
  }

  .study-sidebar {
    width: 100%;
  }

  .sidebar-nav {
    position: static;
  }

  .study-body {
    padding: 35px 25px;
  }

  .study-title {
    font-size: 1.5rem;
  }

  .page-nav {
    flex-direction: column;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .study-body {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .study-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .study-body h3 {
    font-size: 1.05rem;
    margin: 25px 0 12px;
  }

  .scripture-ref {
    padding: 16px 18px;
    margin: 18px 0;
  }

  .page-nav-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  .sidebar-nav {
    padding: 20px;
  }

  .sidebar-list a {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .lang-toggle a {
    padding: 9px 10px;
    font-size: 0.8rem;
  }
}

/* F-14: Readable line length for content paragraphs on wide screens */
/* Limit line length removed per user request to fit container width */
.study-body p {
  max-width: 100%;
}