/* ===========================
   🧭 Enhanced Navigation - SCOPED
   =========================== */

.enhanced-navigation {
  background: linear-gradient(
    135deg,
    rgba(74, 144, 226, 0.05) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border: 1px solid rgba(74, 144, 226, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.enhanced-navigation .nav-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(74, 144, 226, 0.1);
}

.enhanced-navigation .nav-title {
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enhanced-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.enhanced-navigation .nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(74, 144, 226, 0.1);
  border-radius: 6px;
  text-decoration: none;
  color: #6c757d;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.enhanced-navigation .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(74, 144, 226, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.enhanced-navigation .nav-link:hover::before {
  left: 100%;
}

.enhanced-navigation .nav-link:hover {
  background: rgba(74, 144, 226, 0.1);
  border-color: #4a90e2;
  color: #4a90e2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.enhanced-navigation .nav-link.active {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  border-color: #4a90e2;
  color: white;
  font-weight: 600;
}

.enhanced-navigation .nav-link.active:hover {
  background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
  transform: translateY(-1px);
}

.enhanced-navigation .nav-icon {
  font-size: 1.1rem;
  margin-right: 0.5rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.enhanced-navigation .nav-link:hover .nav-icon {
  transform: scale(1.1);
}

.enhanced-navigation .nav-text {
  font-weight: inherit;
}

.enhanced-navigation .nav-hub {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.1) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border-color: rgba(255, 193, 7, 0.3);
}

.enhanced-navigation .nav-hub:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.2) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border-color: #ffc107;
  color: #e0a800;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .enhanced-navigation .nav-links {
    gap: 0.3rem;
  }

  .enhanced-navigation .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .enhanced-navigation .nav-icon {
    font-size: 0.9rem;
    margin-right: 0.3rem;
  }

  .enhanced-navigation .nav-text {
    display: none; /* Hide text on very small screens, show only icons */
  }
}

@media (max-width: 480px) {
  .enhanced-navigation .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .enhanced-navigation .nav-link {
    flex-shrink: 0;
  }
}

/* Motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  .enhanced-navigation .nav-link,
  .enhanced-navigation .nav-link::before,
  .enhanced-navigation .nav-icon {
    transition: none;
  }

  .enhanced-navigation .nav-link:hover {
    transform: none;
  }
}

/* ===========================
   📝 Unified Text Styles
   =========================== */

/* Main Heading */
.text-heading-primary {
  color: #2c3e50 !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 1rem !important;
}

/* Subheading */
.text-heading-secondary {
  color: #2c3e50 !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin-bottom: 0.75rem !important;
}

/* Body Text */
.text-body-primary {
  color: #6c757d !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

/* Lead Text */
.text-lead {
  color: #6c757d !important;
  font-size: 1.2rem !important;
  line-height: 1.6 !important;
  max-width: 700px !important;
  margin: 0 auto !important;
}

/* Card Titles */
.text-card-title {
  color: #2c3e50 !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  margin-bottom: 0.75rem !important;
}

.text-card-title a {
  color: #2c3e50 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.text-card-title a:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Card Text */
.text-card-body {
  color: #6c757d !important;
  font-size: 0.94rem !important;
  line-height: 1.5 !important;
}

/* Navigation Text */
.text-nav-title {
  color: #2c3e50 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  margin-bottom: 0 !important;
}

/* Heading Links */
.text-heading-primary a,
.text-heading-secondary a {
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.text-heading-primary a:hover,
.text-heading-secondary a:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Ultra-specific overrides for letter pages */
.col-lg-6 .card h3 a:hover,
.col-lg-6 .card .text-card-title a:hover,
.col-lg-6 .card .card-body h3 a:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Override any theme-specific hover colors */
.card-body a:hover,
.card-body h3 a:hover,
.card-body .card-title a:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Force Blue Hover for All Links - High Specificity */
a.text-link:hover,
.text-card-title a:hover,
.text-heading-primary a:hover,
.text-heading-secondary a:hover,
h3 a:hover,
.card-title a:hover,
.text-link:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Override any Bootstrap or theme colors */
a:hover {
  color: #4a90e2 !important;
}

/* Specific override for card titles */
.card h3 a:hover,
.card .card-title a:hover {
  color: #4a90e2 !important;
  text-decoration: none !important;
}

/* Muted Text */
.text-muted-custom {
  color: #6c757d !important;
  font-size: 0.875rem !important;
}

/* Small Text */
.text-small {
  font-size: 0.875rem !important;
  color: #6c757d !important;
}

/* Text gradient now in components.css */

/* ===========================
   Component Styles
   Now using tokens.css and components.css
   =========================== */

/* ===========================
   🎯 Letter Chips Navigation - PREMIUM POLISH
   =========================== */

/* ========= Letter Nav – polish pass ========= */

/* Card */
.letter-nav {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(18, 38, 63, 0.06);
  transition: box-shadow 0.25s ease;
}
.letter-nav:hover {
  box-shadow: 0 4px 16px rgba(18, 38, 63, 0.09);
}

/* Header row + divider */
.letter-nav .nav-header {
  border-bottom: 1px solid #e9eef5;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

/* Title */
.letter-nav .nav-title {
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 0.95rem;
  color: #2c3e50;
  text-transform: uppercase;
}

/* Segmented buttons now in components.css */

/* ---------- Chip grid ---------- */
/* from flex → grid for equal widths + rhythm */
.nav-links.nav-links-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 0.25rem;
}

/* Nav pills now in components.css */

/* Appendices subtle dot */
.nav-pill-appendix {
  position: relative;
  padding-left: 2rem;
}
.nav-pill-appendix::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  background: #ffd54d;
  box-shadow: 0 0 0 3px rgba(255, 213, 77, 0.25);
}

/* Responsive tweaks */
@media (max-width: 992px) {
  .nav-links.nav-links-chips {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.7rem;
  }
  .nav-pill {
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
  }
}
@media (max-width: 576px) {
  .btn-segmented .btn {
    font-size: 0.76rem !important;
    padding: 0.4rem 0.7rem !important;
  }
  .letter-nav {
    padding: 1rem;
  }
}

/* ========= Compact Layout Option A ========= */
/* Compact layout */
.letter-nav.is-compact {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.letter-nav.is-compact .nav-header {
  margin-bottom: 0.5rem;
}
.letter-nav.is-compact .nav-title {
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}
.letter-nav.is-compact .btn-segmented .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

/* Turn chips into a compact grid */
.letter-nav.is-compact .nav-links.nav-links-chips {
  display: grid;
  grid-template-columns: 1fr; /* mobile: 1 column */
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}
@media (min-width: 768px) {
  .letter-nav.is-compact .nav-links.nav-links-chips {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1200px) {
  .letter-nav.is-compact .nav-links.nav-links-chips {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Make each chip fill its grid cell */
.letter-nav.is-compact .nav-links.nav-links-chips a {
  display: block;
}
.letter-nav.is-compact .nav-pill {
  width: 100%;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.letter-nav.is-compact .nav-link.active .nav-pill {
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
}

/* Tiny polish */
.letter-nav .nav-header {
  border-bottom: 1px solid #eef2f6;
}
.single-blog-item .blog-item-content h1 {
  margin-top: 1.25rem;
}

/* ===== Letter page – ultra compact header ===== */

/* Trim the theme's big top padding only on this page */
.section.blog-wrap {
  padding-top: 18px !important;
}
@media (min-width: 992px) {
  .section.blog-wrap {
    padding-top: 22px !important;
  }
}

/* The white article card is very padded via .p-5; keep it comfy but tighter */
.single-blog-item .blog-item-content {
  padding: 1.75rem !important;
}
@media (min-width: 992px) {
  .single-blog-item .blog-item-content {
    padding: 2rem !important;
  }
}

/* Make the section widget minimal */
.letter-nav.is-tight {
  margin-bottom: 0.75rem;
  border-radius: 12px;
}
.letter-nav.is-compact {
  padding: 0.6rem 0.8rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.letter-nav .nav-header {
  margin-bottom: 0.35rem;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 0.35rem;
}
.letter-nav .nav-title {
  font-size: 0.82rem;
  letter-spacing: 0.35px;
}

/* Segmented HUB/PDF buttons – smaller */
.letter-nav .btn-segmented .btn {
  padding: 0.32rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(74, 144, 226, 0.18);
  color: #334155;
}
.letter-nav .btn-segmented .btn:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

/* Chips in one visual row with scroll if needed */
.letter-nav.is-scroll .nav-links.nav-links-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.45rem;
  padding-bottom: 0.2rem;
  margin-top: 0.2rem;
  scrollbar-width: thin;
}
.letter-nav.is-scroll .nav-links.nav-links-chips::-webkit-scrollbar {
  height: 6px;
}
.letter-nav.is-scroll .nav-links.nav-links-chips::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

/* Chip size + weight */
.letter-nav .nav-pill {
  white-space: nowrap;
  padding: 0.38rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(74, 144, 226, 0.12);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.letter-nav .nav-link.active .nav-pill {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
}

/* Tighten spacing before the article H1 */
.single-blog-item .blog-item-content h1 {
  margin-top: 0.75rem !important;
}

/* Optional: compact the grey page background gutters for this page only */
.blog-wrap.bg-gray {
  padding-bottom: 40px !important;
}

/* ===== Micro-tweaks for ultra-polish ===== */

/* Remove the old yellow dot if it exists anywhere */
.nav-pill-appendix::before {
  display: none !important;
}

/* Appendices look distinct but consistent */
.nav-pill--appendix {
  background: #fff;
  border: 1px dashed rgba(74, 144, 226, 0.45);
  color: #334155;
  font-style: italic;
  font-weight: 500;
  transition: all 0.25s ease;
}

/* Blue highlight over "APP A" text only */
.nav-pill--appendix strong {
  color: #4a90e2;
  background: rgba(74, 144, 226, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Hover interaction */
.nav-pill--appendix:hover {
  background: rgba(74, 144, 226, 0.06);
  border-color: #4a90e2;
  color: #2c3e50;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.15);
}

/* Active appendix (same glow as main parts) */
.nav-link.active .nav-pill--appendix {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  border-style: solid;
  border-color: #4a90e2;
  font-style: normal;
}
.nav-link.active .nav-pill--appendix strong {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Lower chip height & make scroll track subtle */
.letter-nav .nav-pill {
  padding: 0.34rem 0.66rem !important;
  font-size: 0.83rem !important;
  border-radius: 10px !important;
}

/* Hide scrollbar but keep scrolling (WebKit) */
.letter-nav.is-scroll .nav-links.nav-links-chips::-webkit-scrollbar {
  height: 6px;
  background: transparent;
}
.letter-nav.is-scroll .nav-links.nav-links-chips::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}
@media (max-width: 992px) {
  .letter-nav.is-scroll .nav-links.nav-links-chips::-webkit-scrollbar {
    display: none;
  }
}

/* Slightly smaller segmented buttons */
.letter-nav .btn-segmented .btn {
  padding: 0.28rem 0.55rem !important;
  font-size: 0.74rem !important;
}

/* Pull the nav closer and shrink the header line */
.letter-nav.is-compact {
  padding: 0.5rem 0.7rem !important;
}
.letter-nav .nav-header {
  margin-bottom: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}
.letter-nav .nav-title {
  font-size: 0.8rem !important;
  letter-spacing: 0.3px !important;
}

/* Reduce the big page padding a touch more */
.section.blog-wrap {
  padding-top: 14px !important;
}
.single-blog-item .blog-item-content h1 {
  margin-top: 0.6rem !important;
}

/* Motion sensitivity now in components.css */

/* Navigation and footer styles - keeping page-specific overrides */

.site-footer {
  background: var(--bg-dark-light, #222328);
  color: var(--muted-light, #cfd3da);
  padding: 40px 0 30px;
  border-top: 1px solid rgba(74, 144, 226, 0.25);
  font-size: var(--font-sm, 0.95rem);
  line-height: var(--leading-relaxed, 1.6);
}

.site-footer a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition-slow);
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .footer-verse {
  color: #a5a9b1;
  font-style: italic;
}

.site-footer small {
  display: block;
  margin-top: 0.25rem;
}

.site-footer h6 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.site-footer .footer-links {
  margin: 0;
  padding: 0;
}

.site-footer .footer-links li {
  margin-bottom: 0.5rem;
}

.site-footer .footer-links a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer .footer-links a:hover {
  color: var(--brand-blue);
  padding-left: 4px;
}

.site-footer .footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--footer-text);
  font-size: 0.9rem;
}

.site-footer .social-link i {
  font-size: 1.1rem;
  color: var(--brand-blue);
}

.site-footer .social-link:hover {
  color: var(--brand-blue);
}

.site-footer .social-link:hover i {
  color: #ffffff;
}

/* Enhanced Email Link Styling */
.site-footer .footer-email {
  margin-top: 0.5rem;
}

.site-footer .email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.25);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.site-footer .email-link i {
  font-size: 1.15rem;
  color: var(--brand-blue);
  transition: all 0.3s ease;
}

.site-footer .email-link span {
  letter-spacing: 0.2px;
}

.site-footer .email-link:hover {
  background: rgba(74, 144, 226, 0.2);
  border-color: var(--brand-blue);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

.site-footer .email-link:hover i {
  color: #ffffff;
  transform: scale(1.1);
}

.site-footer .footer-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 2rem 0 1.5rem;
}

.site-footer .footer-verse {
  color: #a5a9b1;
  font-style: italic;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .site-footer .footer-social {
    justify-content: flex-start;
  }
  
  .site-footer .email-link {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
  }
}

@media (max-width: 576px) {
  .site-footer {
    font-size: 0.875rem;
    padding: 30px 0 25px;
  }
  
  .site-footer .footer-links {
    margin-bottom: 1.5rem;
  }
  
  .site-footer .email-link {
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    gap: 0.5rem;
  }
  
  .site-footer .email-link i {
    font-size: 1rem;
  }
}

/* RTL (Arabic) Footer Styles */
[dir="rtl"] .site-footer {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .site-footer .footer-links a {
  padding-left: 0;
  padding-right: 0;
  transition: color 0.2s ease, padding-right 0.2s ease;
}

[dir="rtl"] .site-footer .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}

[dir="rtl"] .site-footer .footer-social {
  justify-content: flex-start;
}

[dir="rtl"] .site-footer .col-md-6.text-md-left {
  text-align: right !important;
}

[dir="rtl"] .site-footer .col-md-6.text-md-right {
  text-align: left !important;
}

[dir="rtl"] .site-footer .social-link,
[dir="rtl"] .site-footer .email-link {
  direction: rtl;
}

[dir="rtl"] .site-footer .email-link i,
[dir="rtl"] .site-footer .social-link i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* ===========================
   Contextual Links
   Reusable style for contextual/inline links in content
   =========================== */

.link-contextual {
  color: var(--brand-blue, #4a90e2);
  text-decoration: none;
  transition: all 0.2s ease;
}

.link-contextual:hover {
  color: var(--brand-blue-dark, #357abd);
  font-weight: 600;
}

/* ===========================
   CTA Band - Black Background Section
   Used for invitation sections like "We'd love to hear from you"
   =========================== */

.cta-band {
  background-color: #1f2431;
  color: #eaf0f7;
  border-radius: 18px;
  padding: 24px 32px;
  margin: 2rem 0;
}

.cta-band h4,
.cta-band h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.cta-band p {
  color: #eaf0f7;
  margin-bottom: 0;
}

.cta-band .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cta-band {
    padding: 20px 24px;
    text-align: center;
  }
  
  .cta-band .btn {
    width: 100%;
    margin-top: 1rem;
  }
}