/*
  Global site theme variants.
  Classic mode keeps existing template styling unchanged.
  Premium Cards mode applies card polish plus full-page visual balance
  on public pages.
*/

body[data-site-theme="premium_cards"][data-is-admin="false"] {
  --premium-bg-top: #f8fbf8;
  --premium-bg-bottom: #e7eeea;
  --premium-surface: rgba(255, 255, 255, 0.84);
  --premium-surface-strong: rgba(255, 255, 255, 0.94);
  --premium-border: rgba(86, 112, 96, 0.28);
  --premium-text: #172435;
  --premium-muted: #45556a;
  --premium-accent: #4f6f59;
  --premium-card-a: rgba(30, 41, 59, 0.97);
  --premium-card-b: rgba(94, 122, 103, 0.94);
  --premium-card-border: rgba(244, 233, 205, 0.42);
  --premium-card-muted: rgba(241, 245, 249, 0.9);
}

/* Option A: Illumination Header Animations */
@keyframes premiumLogoGlow {
  0% { filter: drop-shadow(0 0 2px rgba(244, 233, 205, 0.1)); }
  50% { filter: drop-shadow(0 0 12px rgba(244, 233, 205, 0.5)); transform: scale(1.02); }
  100% { filter: drop-shadow(0 0 2px rgba(244, 233, 205, 0.1)); }
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .premium-logo-glow {
  animation: premiumLogoGlow 8s infinite ease-in-out;
  transform-origin: center;
}

@keyframes premiumTextShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .premium-text-shimmer {
  background: linear-gradient(
    to right,
    var(--premium-text) 20%,
    rgba(101, 129, 109, 0.8) 40%,
    rgba(244, 233, 205, 0.9) 50%,
    rgba(101, 129, 109, 0.8) 60%,
    var(--premium-text) 80%
  );
  background-size: 200% auto;
  color: transparent !important;
  -webkit-background-clip: text;
  background-clip: text;
  animation: premiumTextShimmer 12s infinite linear;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] {
  background:
    radial-gradient(circle at 15% 16%, rgba(79, 111, 89, 0.14), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(30, 41, 59, 0.1), transparent 38%),
    linear-gradient(180deg, var(--premium-bg-top), var(--premium-bg-bottom) 74%) !important;
  color: var(--premium-text);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .min-h-screen {
  background: transparent;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] section[class*="bg-white"] {
  background-color: #ffffff !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] section[class*="bg-stone"] {
  background-color: #f4f7f5 !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] section[class*="bg-stone/"] {
  background-color: #faf9f6 !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .text-charcoal {
  color: var(--premium-text) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .text-slate {
  color: var(--premium-muted) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .border-border-color {
  border-color: var(--premium-border) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .bg-white {
  background-color: var(--premium-surface-strong);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .bg-stone,
body[data-site-theme="premium_cards"][data-is-admin="false"] [class*="bg-stone/"] {
  background-color: var(--premium-surface) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] header {
  background: rgba(248, 252, 250, 0.86) !important;
  border-color: var(--premium-border) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] footer {
  background: rgba(251, 253, 252, 0.9) !important;
  border-color: var(--premium-border) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .text-sage-green,
body[data-site-theme="premium_cards"][data-is-admin="false"] .nav-link-active {
  color: var(--premium-accent) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] a:not(.text-white):not(.bg-sage-green) {
  color: #365169;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] a:not(.text-white):not(.bg-sage-green):hover {
  color: #1c3147;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .bg-sage-green {
  background-color: var(--premium-accent) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .bg-sage-green:hover {
  background-color: var(--premium-card-a) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2), 0 4px 6px -2px rgba(15, 23, 42, 0.1) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] strong {
  color: #102033;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] em {
  color: #3f6655;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content {
  color: var(--premium-text);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content>main {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content>main>header {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content :is(h1, h2, h3, h4, h5, strong) {
  color: var(--premium-text);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content :is(p, li, figcaption, span) {
  color: var(--premium-muted);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #action .grid,
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #conclusion .grid {
  overflow: visible;
  padding: 0.42rem 0.32rem 1.2rem;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #action .grid>div,
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #conclusion .grid>div {
  overflow: visible;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #action,
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #conclusion {
  overflow: visible;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #glossary .max-w-3xl {
  overflow: visible;
  padding: 0.4rem 0.2rem 1rem;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card {
  background: linear-gradient(160deg, var(--premium-card-a), var(--premium-card-b)) !important;
  border-color: var(--premium-card-border) !important;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card :is(.text-charcoal, h3, strong) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card :is(.text-slate, p, em) {
  color: var(--premium-card-muted) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card a {
  color: #f4e9cd !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card a:hover {
  color: #ffffff !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] #infographics .featured-infographic-card img {
  filter: saturate(0.92) contrast(1.02) brightness(0.95);
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-archive-infographics-grid {
  padding-top: 0.4rem;
  padding-bottom: 1rem;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-archive-infographic-shell {
  padding: 0.38rem 0.28rem 0.92rem;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) {
  background: linear-gradient(160deg, var(--premium-card-a), var(--premium-card-b)) !important;
  border-color: var(--premium-card-border) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26) !important;
  color: #f8fafc;
  transition: box-shadow 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content :is(.bg-white.rounded-lg.shadow-sm.border-t-4,
  .bg-white.rounded-xl.shadow-sm.border-t-4) {
  background: linear-gradient(160deg, var(--premium-card-a), var(--premium-card-b)) !important;
  border-color: var(--premium-card-border) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content :is(.bg-white.rounded-lg.shadow-sm.border-t-4,
  .bg-white.rounded-xl.shadow-sm.border-t-4) :is(.text-charcoal, .text-slate, h2, h3, h4, p, strong) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border):hover {
  border-color: rgba(244, 233, 205, 0.58) !important;
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.34) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .group:hover h2.group-hover\:text-sage-green {
  color: #f4e9cd !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(.text-charcoal, h1, h2, h3, h4, h5, strong) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) .text-sage-green {
  color: #f4e9cd !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(.text-slate, p, li, small, label, em) {
  color: var(--premium-card-muted) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(.bg-stone,
  .bg-white,
  [class*="bg-stone/30"],
  [class*="bg-stone/40"],
  [class*="bg-stone/50"],
  [class*="bg-stone/60"]) {
  background: rgba(15, 23, 42, 0.18) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content details[class*="bg-stone/50"] summary,
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content details[class*="bg-stone/50"] summary span,
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content details[class*="bg-stone/50"] p {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content details[class*="bg-stone/50"] .text-slate {
  color: rgba(241, 245, 249, 0.96) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content details[class*="bg-stone/50"] .border-border-color {
  border-color: rgba(244, 233, 205, 0.26) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #glossary details {
  background: rgba(15, 23, 42, 0.24) !important;
  border-color: rgba(244, 233, 205, 0.34) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content #glossary details :is(summary,
  summary span,
  p,
  .text-slate,
  .text-sage-green) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(.bg-gray-100, [class*="bg-sage-green/10"]) {
  background: rgba(244, 233, 205, 0.18) !important;
  border-color: rgba(244, 233, 205, 0.42) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(.bg-gray-100.text-slate,
  .bg-gray-100 .text-slate,
  [class*="bg-sage-green/10"].text-sage-green,
  [class*="bg-sage-green/10"] .text-sage-green) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) a:not(.bg-sage-green):not(.text-white) {
  color: #f4e9cd;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) a:not(.bg-sage-green):not(.text-white):hover {
  color: #ffffff;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(input, textarea, select) {
  background: rgba(248, 250, 252, 0.95) !important;
  color: #1e293b !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) :is(input::placeholder, textarea::placeholder) {
  color: #64748b !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) .prose :is(h1, h2, h3, h4, strong, blockquote) {
  color: #f8fafc !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
  .bg-white.rounded-xl.border,
  .bg-white.rounded-2xl.border) .prose :is(p, li, ul, ol, em, span) {
  color: var(--premium-card-muted) !important;
}

@media (prefers-reduced-motion: reduce) {

  body[data-site-theme="premium_cards"][data-is-admin="false"] :is(.bg-white.rounded-lg.border,
    .bg-white.rounded-xl.border,
    .bg-white.rounded-2xl.border) {
    transition: none;
  }
}

/* Ensure Hover Icons are Visible in Premium Mode */
body[data-site-theme="premium_cards"][data-is-admin="false"] .group:hover img.absolute.inset-0.opacity-0 {
  opacity: 100 !important;
  /* Forces your '-hover.png' icons to show  */
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .group:hover img.absolute.inset-0.transition-opacity:not(.opacity-0) {
  opacity: 0 !important;
  /* Hides the base icon on hover [cite: 2155] */
}

/* Timeline of Faith: stable shadow rendering in premium mode across desktop and mobile. */
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith :is(.relative.max-w-xl.mx-auto.px-6,
  .relative.max-w-xl.mx-auto.px-6 > .relative.flex.flex-col.space-y-24,
  .relative.max-w-xl.mx-auto.px-6 > .relative.flex.flex-col.space-y-24 > .relative.w-full.flex,
  .relative.max-w-xl.mx-auto.px-6 > .relative.flex.flex-col.space-y-24 > .relative.w-full.flex > [class~="w-1/2"]) {
  overflow: visible !important;
}

/* Fix for Timeline Card Shadow Clipping */
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content .relative.max-w-xl.mx-auto.px-4.overflow-x-hidden {
  overflow: visible !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Ensure the individual card rows don't clip their own children */
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content [data-aos="fade-right"],
body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content [data-aos="fade-left"] {
  overflow: visible !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.relative.flex.flex-col.space-y-24 {
  padding-bottom: 1.15rem !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6 [class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6 [class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border:hover {
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18) !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6 [class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border :is(.text-charcoal, p, .text-slate) {
  color: #1e293b !important;
}

body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6 [class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border .text-sage-green {
  color: #4f6f59 !important;
}

@media (min-width: 768px) {
  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith [data-aos="fade-right"]>[class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border {
    margin-left: 0.8rem !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith [data-aos="fade-left"]>[class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border {
    margin-right: 0.8rem !important;
  }

/* Interactive Glossary Tooltips (Global but styled for Premium) */
.glossary-term {
  position: relative;
  display: inline-block;
  border-bottom: 2px dashed var(--premium-accent, #65816D);
  cursor: pointer;
  color: inherit;
  font-weight: 600;
  font-style: normal !important;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.glossary-term:hover,
.glossary-term:focus,
.glossary-term:active {
  color: var(--premium-accent, #65816D);
}

.glossary-term::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: max-content;
  max-width: 250px;
  background-color: var(--premium-card-a, #1E293B);
  color: #f8fafc;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
}

.glossary-term::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border-width: 6px;
  border-style: solid;
  border-color: var(--premium-card-a, #1E293B) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  pointer-events: none;
}

.glossary-term:hover::after,
.glossary-term:hover::before,
.glossary-term:focus::after,
.glossary-term:focus::before,
.glossary-term:active::after,
.glossary-term:active::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
}

@media (max-width: 767px) {
  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6 {
    padding-left: 0.95rem !important;
    padding-right: 0.95rem !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.absolute.left-1\/2,
  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.relative.flex.flex-col.space-y-24>.relative.w-full.flex>.absolute.left-1\/2 {
    left: 1rem !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.relative.flex.flex-col.space-y-24> :is([data-aos="fade-right"], [data-aos="fade-left"]) {
    justify-content: flex-start !important;
    padding-left: 2.1rem !important;
    padding-right: 0.9rem !important;
    overflow: visible !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.relative.flex.flex-col.space-y-24> :is([data-aos="fade-right"], [data-aos="fade-left"])>[class~="w-1/2"] {
    width: 100% !important;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith [data-aos="fade-right"]>[class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border,
  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith [data-aos="fade-left"]>[class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border {
    margin: 0 !important;
  }

  body[data-site-theme="premium_cards"][data-is-admin="false"] .theme-content-timeline-of-faith .relative.max-w-xl.mx-auto.px-6>.relative.flex.flex-col.space-y-24> :is([data-aos="fade-right"], [data-aos="fade-left"])>[class~="w-1/2"]>.bg-white.rounded-lg.shadow-sm.border :is(h3, p, .text-charcoal, .text-slate) {
    text-align: left !important;
  }
}