:root {
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 1);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
  /* Very subtle shadow */
  --accent-color: #8b5cf6;
  /* Softer purple matching the reference */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-color: #f5f3ff;
  /* Lavender background */
  --nav-pill-bg: rgba(255, 255, 255, 0.7);
}

body {
  /* Simpler, lighter lavender gradient matching reference */
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Make footer blend into page background instead of dark block */
footer.bg-secondary {
  background: transparent !important;
}

footer.bg-secondary .section {
  padding-top: 24px;
  padding-bottom: 32px;
}

footer.bg-secondary .text-center {
  padding-bottom: 24px;
}

/* Global override of theme's peach secondary background (used on inner pages) */
.bg-secondary {
  background: transparent !important;
}

/* Main Glass Container */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  /* Large premium radius */
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.01),
    0 2px 4px -1px rgba(0, 0, 0, 0.01),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  padding: 40px;
  margin-top: 20px;
}

/* Navigation */
.navigation {
  padding: 30px 0 10px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary) !important;
  background: white;
  padding: 10px 24px;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-right: 30px;
  display: flex;
  align-items: center;
}

.nav-item .nav-link {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px !important;
  margin: 0 6px;
  background: var(--nav-pill-bg);
  border-radius: 100px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item .nav-link:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Search Bar in header (if used) */
.search-box {
  border: none;
  background: #f1f5f9;
  border-radius: 100px;
  padding: 12px 24px;
  width: 300px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.search-box:focus {
  background: white;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  outline: none;
}

/* Hero Section */
.hero-section {
  padding-bottom: 40px;
  /* Override theme's white-to-peach gradient */
  background: transparent !important;
}

/* Remove theme sticky header solid background so gradient shows through */
.headroom {
  background: transparent !important;
  box-shadow: none !important;
}

.hero-top-row {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 12px;
  margin-bottom: 32px;
}

.hero-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.18s ease;
}

.hero-chip:hover {
  background: white;
  color: var(--text-primary);
  transform: translateY(-1px);
}

.hero-chip-active {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.hero-search {
  width: 100%;
}

.hero-search-input {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 11px 40px 11px 18px;
  font-size: 0.85rem;
  background: rgba(248, 250, 252, 0.95);
  color: var(--text-secondary);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.2),
    0 10px 25px rgba(15, 23, 42, 0.05);
}

.hero-search-input::placeholder {
  color: #9ca3af;
}

.hero-search-input:focus {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.4),
    0 18px 40px rgba(79, 70, 229, 0.28);
  background: white;
}

.hero-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
}

.featured-post {
  position: relative;
  /* No background on the post itself, it sits on the glass card */
}

.featured-post-inner {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(248, 250, 252, 0.95);
  padding: 28px 32px;
}

.featured-post-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 24px;
}

.tag-best {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 3px solid var(--accent-color);
  height: 20px;
}

.meta-info {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.featured-title {
  font-size: 3.5rem;
  /* Large and bold */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-primary);
  max-width: 90%;
}

@media (max-width: 991px) {
  .featured-post-inner {
    padding: 22px 20px;
  }

  .featured-title {
    font-size: 2.4rem;
  }

  .featured-post-media img {
    height: 200px;
  }
}

.btn-read {
  background: white;
  color: var(--text-primary);
  border-radius: 100px;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 20px;
}

.btn-read:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--text-primary);
}

/* 3D Orb Effect */
.blur-circle {
  position: absolute;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  width: 450px;
  height: 450px;
  border-radius: 50%;
  /* Softer pastel gradient matching reference */
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9) 0%, transparent 25%),
    /* Bright highlight */
    radial-gradient(circle at 65% 65%, rgba(167, 139, 250, 0.3) 0%, transparent 40%),
    /* Soft purple shadow */
    linear-gradient(135deg, #ddd6fe 0%, #c7d2fe 100%);
  /* Lavender to light blue */
  filter: blur(50px);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

/* Sidebar */
.widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.recommended-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.recommended-item:hover {
  transform: translateX(4px);
}

.recommended-item img {
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Latest News Grid */
.news-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.latest-news-grid {
  margin-left: -8px;
  margin-right: -8px;
}

.latest-news-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.04),
    0 0 0 1px rgba(248, 250, 252, 0.9);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.latest-news-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(248, 250, 252, 0.95);
}

.latest-news-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.latest-news-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.latest-news-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.latest-news-category {
  font-weight: 600;
}

.latest-news-dot {
  margin: 0 4px;
}

.latest-news-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

.latest-news-excerpt {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Sidebar layout to mimic right panel card */
.hero-sidebar {
  padding: 8px 4px 0;
}

.hero-sidebar-search-input {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 11px 40px 11px 18px;
  font-size: 0.85rem;
  background: rgba(248, 250, 252, 0.95);
  color: var(--text-secondary);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.2),
    0 10px 25px rgba(15, 23, 42, 0.05);
}

.hero-sidebar-search-input::placeholder {
  color: #9ca3af;
}

.hero-sidebar-search-input:focus {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.4),
    0 18px 40px rgba(79, 70, 229, 0.28);
  background: white;
}

.hero-sidebar-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
}

.recommended-featured-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(248, 250, 252, 0.9);
}

.recommended-featured-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.recommended-featured-body {
  padding: 16px 18px 18px;
}

/* News list page styling */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Compact header spacing for news list */
.news-page-header {
  padding-top: 32px;
  padding-bottom: 8px;
}

.news-list-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 22px 24px;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(248, 250, 252, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.news-list-item--hidden {
  display: none;
}

.news-list-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(248, 250, 252, 0.95);
}

.news-list-article {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.news-list-media img {
  border-radius: 22px;
  max-width: 220px;
  object-fit: cover;
}

.news-list-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-list-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.news-list-category {
  font-weight: 600;
}

.news-list-dot {
  margin: 0 6px;
}

.news-list-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-list-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.news-list-readmore {
  align-self: flex-start;
  padding-left: 0;
}

@media (max-width: 767px) {
  .news-list-article {
    flex-direction: column;
  }

  .news-list-media img {
    max-width: 100%;
  }

  /* On mobile, hide secondary search box inside sidebar to avoid duplicates */
  .hero-sidebar-search {
    display: none;
  }
}

/* Search results styling */
.search-page-header {
  padding-top: 32px;
  padding-bottom: 8px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.search-result-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow:
    0 14px 35px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(248, 250, 252, 0.95);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.search-result-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.09),
    0 0 0 1px rgba(248, 250, 252, 0.98);
}

.search-result-inner {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.search-result-thumb img {
  border-radius: 18px;
  max-width: 200px;
  object-fit: cover;
}

.search-result-content {
  flex: 1;
}

.search-result-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.search-result-category {
  font-weight: 600;
}

.search-result-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-result-snippet {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.search-result-readmore {
  padding-left: 0;
}

@media (max-width: 767px) {
  .search-result-inner {
    flex-direction: column;
  }

  .search-result-thumb img {
    max-width: 100%;
  }
}

/* Support / affiliate buttons */
.amazon-affiliate-link,
.bmc-link,
.paypal-me-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.amazon-affiliate-link {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.bmc-link {
  background: linear-gradient(135deg, #f472b6, #ec4899);
}

.paypal-me-link {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.amazon-affiliate-link:hover,
.bmc-link:hover,
.paypal-me-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  filter: brightness(1.05);
}

/* Code blocks spacing/size and copy button layout */
.post-content .highlight,
.post-content pre,
article.content .highlight,
article.content pre {
  margin: 6px 0 !important;
  padding: 8px 10px !important;
  border-radius: 10px;
  overflow: auto;
  max-height: 320px;
  position: relative;
}

.post-content .highlight pre,
.post-content pre code,
article.content .highlight pre,
article.content pre code {
  padding: 0 !important;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.25;
  background: transparent !important;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.code-copy-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
