/* CLife-specific overrides */

/* Heart emoji bullet points */
.content-body ul, .article-body ul, .page-body ul, .video-body ul {
  list-style-type: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.content-body ul li, .article-body ul li, .page-body ul li, .video-body ul li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}
.content-body ul li::before, .article-body ul li::before, .page-body ul li::before, .video-body ul li::before {
  content: '\2764';
  color: var(--brand-accent);
  position: absolute;
  left: -1.2rem;
  top: 0;
  font-size: 1em;
  line-height: 1.6;
}

/* Wider container (not navbar) */
main .container,
.site-footer .container { width: 90%; max-width: 80%; }

/* Gradient body background (CLife signature) + sticky footer */
body {
  background: linear-gradient(to bottom, var(--brand-primary), var(--brand-accent)) !important;
  background-attachment: fixed !important;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

/* --- Dark theme overrides (match original CLife look) --- */

/* Global text: white on dark/gradient backgrounds */
body, p, li, span, div {
  color: #fff;
}

/* Links: gold like the original */
a {
  color: #ffd700;
}
a:hover {
  color: #fff;
}

/* Bold/strong text: pink accent */
strong, b {
  color: var(--brand-accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Headings: lemonchiffon like the original */
h1, h2, h3, h4, h5, h6 {
  color: #FFFACD;
  -webkit-text-fill-color: #FFFACD;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* --- Header: flat full-width dark bar (match original CLife) --- */
.site-header {
  width: 100%;
  max-width: none;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px 0 0;
}
.site-header .container {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  width: 90%;
  max-width: 1400px;
  padding-bottom: 16px;
}
/* Logo: remove badge bg/border, make larger, force dark variant (white text) for dark header */
.site-header .logo-badge {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  border-radius: 0;
}
.site-header .logo-wordmark {
  height: 90px;
}
/* Force dark logo (white text) since header bg is dark, regardless of theme */
.site-header .logo-wordmark--light {
  display: none !important;
}
.site-header .logo-wordmark--dark {
  display: inline !important;
}
/* Header text/links: white */
.site-header a,
.site-header .nav-link,
.site-header .search-toggle a {
  color: #fff !important;
}
.site-header a:hover {
  color: #ffd700 !important;
}
/* Show social icons in header, below logo, left-aligned to match original */
.header-social-icons {
  display: flex;
  width: auto;
  order: 10;
  padding-top: 8px;
  gap: 20px;
  flex-basis: 100%;
}
/* Social icon images: white/bright on dark header, except BMC gif */
.header-social-icons img {
  filter: brightness(10);
  opacity: 0.85;
  width: 24px;
  height: 24px;
}
.header-social-icons a:last-child img {
  filter: none;
  opacity: 1;
  width: 28px;
  height: 28px;
}
.header-social-icons a:hover img {
  opacity: 1;
}
/* Allow header container to wrap so social icons go to new line */
.site-header .container {
  flex-wrap: wrap;
}

/* Search toggle in header: subtle distinction */
.search-toggle a {
  padding: 8px 18px;
  min-width: 120px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px;
  box-shadow: none !important;
  transition: background 0.2s;
}
.search-toggle a:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* --- Hero section: gradient with hearts pattern overlay --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #663399, var(--brand-primary) 70%, var(--brand-accent) 100%) !important;
  border-color: transparent;
  overflow: hidden;
  text-align: center;
  padding: 56px 0;
}
/* Hearts SVG pattern overlay */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 30c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15zm-60 60c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15zm120 30c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 1.0;
  z-index: 1;
}
/* Hero content above the pattern overlay */
.hero .container {
  position: relative;
  z-index: 2;
}
/* Hero h1: Dancing Script cursive, lemonchiffon */
.hero h1 {
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: #FFFACD;
  -webkit-text-fill-color: #FFFACD;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.hero .lead {
  color: rgba(255, 255, 255, 0.9);
}
/* Hero lead text */
.hero .lead {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}
/* Home intro: dark semi-transparent box, centered */
.home-intro {
  background-color: rgba(0, 0, 0, 0.18);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 900px;
  margin: 0.75rem auto 0;
  text-align: center;
}
/* CTA wrapper: centered */
.home-cta {
  text-align: center;
}
/* CTA button */
.view-all-link {
  display: inline-block !important;
  padding: 0.3rem 0.8rem;
  background-color: #6D5EAC !important;
  color: #FFFACD !important;
  border-radius: 4px;
  font-size: 0.9rem;
}
.view-all-link:hover {
  background-color: #8A75C7 !important;
}

/* --- Content containers: dark semi-transparent panels (original style) --- */
.content-container {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Entry rows: subtle white tint cards with spacing */
.entry-row {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
}
.entry-row + .entry-row {
  margin-top: 12px;
}
/* Entry content: padding and white text */
.entry-content {
  padding: 24px;
}
/* Entry thumbnails: sized to fit entry rows */
.entry-thumbnail {
  display: block;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  flex-shrink: 0;
  align-self: center;
}
.entry-thumbnail img {
  width: 100%;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
}
/* Summary text: white on dark panels */
.summary,
.entry-row p,
.entry-row .summary {
  color: #fff !important;
}
/* Entry row layout: side by side when thumbnail exists */
.entry-row:not(.no-thumb) {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Blog table rows: dark theme with proper specificity */
.home-blogs .blog-table {
  gap: 8px !important;
}
.home-blogs .blog-row {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px;
  padding: 14px 18px;
  transition: background 0.2s, border-color 0.2s;
}
.home-blogs .blog-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.05) !important;
}
.home-blogs .blog-row:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
.home-blogs .blog-row .blog-summary {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.9rem;
}
.home-blogs .blog-title a {
  color: #ffd700 !important;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.home-blogs .blog-title a:hover {
  color: #fff !important;
  text-decoration: underline;
}
/* Featured cards */
.featured-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}
.featured-card h4 a {
  color: #ffd700;
}
.featured-card p {
  color: rgba(255, 255, 255, 0.85);
}
/* Read more links */
.read-more {
  color: var(--brand-accent) !important;
  font-weight: 600;
}
/* Tags in entry meta: visible purple pill on dark bg */
.tag {
  color: #fff;
  background: rgba(123, 79, 171, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
/* Tag items in tag cloud */
.tag-item {
  color: #ffd700;
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(123, 79, 171, 0.3) !important;
}
.tag-item:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff;
}
/* Date text */
.entry-meta .date {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Page header (article pages): dark treatment --- */
.page-header {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* --- Article/blog page: dark treatment --- */
article.content-container {
  background: rgba(0, 0, 0, 0.3) !important;
  padding: 32px;
}
/* Content header (title, meta, tags) */
.content-header {
  margin-bottom: 16px;
}
.content-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.content-meta {
  margin-bottom: 8px;
}
.content-meta .date {
  color: rgba(255, 255, 255, 0.7);
}
.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
/* Content hero image */
.content-hero {
  margin-bottom: 20px;
}
.content-hero .hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}
/* Content body (article text): dark panel */
.content-body,
.article-body,
.page-body {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 24px;
}
/* Article h2/h3: styled section headers */
.content-body > h2,
.content-body > h3 {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.content-body > h2 a,
.content-body > h3 a {
  color: #FFFACD !important;
}
/* Article paragraphs */
.content-body p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.92);
}
/* Links inside content bodies */
.content-body a:not(.tag):not(.btn):not(.tag-item),
.article-body a:not(.tag):not(.btn):not(.tag-item),
.page-body a:not(.tag):not(.btn):not(.tag-item) {
  color: #ffd700;
}
.content-body a:not(.tag):not(.btn):not(.tag-item):hover,
.article-body a:not(.tag):not(.btn):not(.tag-item):hover,
.page-body a:not(.tag):not(.btn):not(.tag-item):hover {
  color: #fff;
}
/* Content container links (on dark panels) */
.content-container a:not(.tag):not(.btn):not(.tag-item) {
  color: #ffd700;
}
.content-container a:not(.tag):not(.btn):not(.tag-item):hover {
  color: #fff;
}

/* --- Search box: match dark theme, centered in Browse by Tag --- */
.home-search {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.search-container {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
.search-container input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.search-container input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.search-container button {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Footer: gradient bg with hearts pattern (match hero) --- */
.site-footer {
  position: relative;
  background: linear-gradient(135deg, #663399, var(--brand-primary) 70%, var(--brand-accent) 100%) !important;
  overflow: hidden;
}
/* Hearts pattern on footer */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 30c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15zm-60 60c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15zm120 30c-2 3-4 1-6 1s-4 2-6-1c-8-10-20 5-9 15 9 8 15 17 15 17s6-9 15-17c11-10-1-25-9-15z' fill='%23000000' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 1;
  z-index: 1;
}
/* Footer content above pattern */
.site-footer .container,
.site-footer .footer-content,
.site-footer .footer-bottom {
  position: relative;
  z-index: 2;
}
.site-footer {
  color: rgba(255, 255, 255, 0.92);
}
.site-footer a,
.site-footer .footer-section h3 {
  color: #ffd700;
}
.site-footer h3 {
  color: #FFFACD;
  -webkit-text-fill-color: #FFFACD;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}
.site-footer .footer-bottom p {
  color: rgba(255, 255, 255, 0.8);
}
/* Footer social icons */
.site-footer .social-icon img {
  filter: brightness(1);
  opacity: 0.85;
}
.site-footer .social-icon:hover img {
  opacity: 1;
}

/* --- Cookie consent banner: dark treatment --- */
.cookie-consent {
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.cookie-consent, .cookie-consent p {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* --- Home content text (on gradient, outside panels) --- */
.home-content {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  padding: 0 5%;
}
.home-content a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}
.home-content a:hover {
  text-decoration-color: #fff;
}
.home-content strong, .home-content b {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --- Components: dark theme overrides (components page) --- */

/* Inline code: dark background for dark theme */
code {
  background: rgba(0, 0, 0, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffd700;
}
pre code {
  background: transparent !important;
  border: none !important;
  color: inherit;
}

/* Blockquote: visible left border */
blockquote {
  border-left: 4px solid var(--brand-accent) !important;
  background: rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.9);
}

/* Color palette swatches: use actual CSS var fills */
.color-card .color-swatch {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Callout boxes: distinct colored left borders and tinted backgrounds */
.callout-box {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-left: 4px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.9);
}
.callout-box h4 {
  color: #FFFACD;
}
.callout-box.callout-tip,
.callout-box.callout-success {
  border-left-color: #4caf50 !important;
  background: rgba(76, 175, 80, 0.12) !important;
}
.callout-box.callout-caution {
  border-left-color: #ff9800 !important;
  background: rgba(255, 152, 0, 0.12) !important;
}
.callout-box.callout-warning {
  border-left-color: #f44336 !important;
  background: rgba(244, 67, 54, 0.12) !important;
}
.callout-box.callout-note {
  border-left-color: var(--brand-primary) !important;
  background: rgba(123, 79, 171, 0.15) !important;
}
.callout-box.callout-info {
  border-left-color: #2196f3 !important;
  background: rgba(33, 150, 243, 0.12) !important;
}

/* Tabs: dark theme treatment */
.tab-nav {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.tab-nav-item {
  color: rgba(255, 255, 255, 0.7) !important;
}
.tab-nav-item.active {
  color: #ffd700 !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}
.tab-nav-item:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
.tab-content {
  background-color: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9);
}

/* FAQ accordion: dark theme */
.faq-accordion {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}
.faq-item {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.faq-question {
  background: transparent !important;
  color: #ffd700 !important;
}
.faq-question:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}
.faq-answer {
  color: rgba(255, 255, 255, 0.9) !important;
}
.faq-expand-all {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}
.faq-expand-all:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}
.faq-icon::before,
.faq-icon::after {
  background: #ffd700 !important;
}

/* Collapsible sections: dark theme */
.collapsible-label {
  color: rgba(255, 255, 255, 0.9);
}
.collapsible-icon::before {
  color: #ffd700 !important;
}
.collapsible-toggle {
  accent-color: var(--brand-primary);
}

/* Tables: dark theme */
table {
  border-color: rgba(255, 255, 255, 0.15);
}
th {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #FFFACD;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
td {
  background: rgba(0, 0, 0, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9);
}
tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.22) !important;
}

/* Tooltip icons */
.tooltip-icon {
  color: #ffd700 !important;
}

/* Strikethrough: more visible */
del, s {
  color: rgba(255, 255, 255, 0.5);
}

/* --- Back to top button --- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--brand-primary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 100;
}
.back-to-top:hover {
  opacity: 1;
  background-color: var(--brand-accent);
}
