/*
Theme Name: Saody AI
Theme URI: https://saodyai.com/
Author: Saody AI Team
Description: Version 24.0.0 - Moved Mobile Dark/Light Mode Switch from slide-out drawer to the top mobile header bar right next to the Search icon.
Version: 24.0.0
License: GNU General Public License v2 or later
Text Domain: saody-ai
*/

:root {
  --bg-color: #faf8f5;
  --surface-card: #ffffff;
  --text-main: #17181c;
  --text-muted: #6b7280;
  --accent-color: #f25c38;
  --accent-purple: #6941c6;
  --dark-footer: #11141c;
  --border-color: #e9e5de;
  --card-border: #edeae4;
  --max-width: 1240px;
  --font-family: 'Plus Jakarta Sans', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   HEADER & NAVBAR
   ========================================================== */
.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-branding .brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-pill {
  display: none !important;
}

.brand-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #111827;
  text-transform: uppercase;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  color: #374151;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.header-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edeae2;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}

.header-social a:hover {
  background: var(--accent-color);
  color: #ffffff;
}

/* ==========================================================
   STATIC PAGES (PRIVACY POLICY, ABOUT US, CONTACT US)
   ========================================================== */
.page-template-container {
  padding: 50px 24px 80px;
  max-width: 920px;
}

.static-page-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 48px 52px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.static-page-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.static-page-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #111827;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.static-page-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.static-page-featured {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
}

.static-page-content ul,
.static-page-content ol {
  margin: 0 0 22px 24px;
}

.static-page-content li {
  margin-bottom: 8px;
}

/* ==========================================================
   AD CONTAINERS & WIDGET SLOTS
   ========================================================== */
.ad-section-wrap {
  width: 100%;
  margin: 30px auto;
  text-align: center;
  clear: both;
}

.ad-top-wrap {
  margin-top: 24px;
  margin-bottom: 24px;
}

.ad-mid-wrap {
  margin: 40px auto;
}

.ad-bottom-wrap {
  margin-top: 40px;
  margin-bottom: 20px;
}

.ad-single-top-wrap {
  margin: 28px 0;
}

.ad-single-bottom-wrap {
  margin: 36px 0;
  border-top: 1px dashed var(--border-color);
  padding-top: 28px;
}

.ad-container {
  display: block;
  margin: 0 auto;
  min-height: 50px;
  max-width: 100%;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-align: center;
}

/* ==========================================================
   HERO / FEATURED POST
   ========================================================== */
.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 30px 0 50px;
  border-bottom: 1px solid var(--border-color);
  clear: both;
}

.category-hero-section {
  padding-top: 10px;
}

.hero-badge-wrap {
  margin-bottom: 14px;
}

.card-badge,
.single-cat-badge .card-badge {
  display: inline-block;
  background: #ffffff;
  color: var(--accent-color);
  border: 1px solid #fed7aa;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(242, 92, 56, 0.08);
}

.card-badge:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 850;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.8px;
  color: #111827;
}

.hero-excerpt {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
  line-height: 1.65;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-color);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(242, 92, 56, 0.25);
}

.hero-cta-btn:hover {
  opacity: 0.92;
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-img-wrap {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.07);
}

.hero-img-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-img-wrap:hover img {
  transform: scale(1.02);
}

/* ==========================================================
   CATEGORY TOP BAR
   ========================================================== */
.category-archive-container {
  padding: 30px 24px 80px;
  clear: both;
}

.category-top-bar {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.category-pill-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-color);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.category-page-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #111827;
}

.category-page-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 6px;
}

/* ==========================================================
   SOLID ARTICLES GRID
   ========================================================== */
.posts-section {
  padding: 30px 0 80px;
  clear: both;
}

.posts-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 35px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 850;
  letter-spacing: -0.5px;
  color: #111827;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.filter-tab.active,
.filter-tab:hover {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.articles-grid,
.category-grid-equal {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  column-gap: 30px !important;
  row-gap: 36px !important;
  align-items: stretch !important;
  width: 100% !important;
  float: none !important;
  columns: auto !important;
  column-count: auto !important;
  clear: both !important;
  margin: 0 !important;
  padding: 0 !important;
}

.articles-grid > script,
.articles-grid > style,
.category-grid-equal > script,
.category-grid-equal > style {
  display: none !important;
  grid-column: span 0 !important;
}

.article-card {
  background: var(--surface-card) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  float: none !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

.article-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

.card-thumb-container {
  position: relative !important;
  width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
  max-height: 220px !important;
  background: #f1eee7 !important;
  overflow: hidden !important;
}

.card-thumb-link {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.card-thumb-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.35s ease !important;
}

.article-card:hover .card-thumb-container img {
  transform: scale(1.05) !important;
}

.card-badge-overlay {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  z-index: 2 !important;
}

.card-body {
  padding: 22px 22px 14px !important;
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.card-title {
  font-size: 1.15rem !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
  margin-bottom: 12px !important;
  color: #111827 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.9em !important;
}

.card-title a:hover {
  color: var(--accent-color) !important;
}

.card-excerpt {
  color: var(--text-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  margin-bottom: 10px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.card-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-top: 1px solid var(--border-color) !important;
  padding: 14px 22px !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  background: #fdfcfb !important;
  margin-top: auto !important;
}

.card-arrow-btn {
  background: #f1eee7 !important;
  color: #111827 !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  font-weight: 700;
}

.article-card:hover .card-arrow-btn {
  background: var(--accent-color) !important;
  color: #ffffff !important;
}

/* Pagination */
.pagination-wrapper {
  margin-top: 40px;
  text-align: center;
}

.pagination-wrapper .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s ease;
}

.pagination-wrapper .page-numbers:hover {
  background: #f3f0e8;
  border-color: #d8d4ca;
}

.pagination-wrapper .page-numbers.current {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* ==========================================================
   SINGLE POST & SIDEBAR
   ========================================================== */
.single-page-container {
  padding: 40px 24px 80px;
}

.single-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.single-post-main {
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.03);
}

.single-post-header {
  margin-bottom: 24px;
}

.single-post-title {
  font-size: 2.6rem;
  font-weight: 850;
  line-height: 1.25;
  margin: 14px 0 16px;
  color: #111827;
  letter-spacing: -0.5px;
}

.single-post-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  gap: 10px;
  align-items: center;
}

.single-featured-wrap {
  border-radius: 14px;
  overflow: hidden;
  margin: 28px 0 24px;
}

.single-featured-wrap img {
  width: 100%;
  height: auto;
}

.entry-content {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #24292f;
}

.entry-content p {
  margin-bottom: 22px;
}

.entry-content h2,
.entry-content h3 {
  margin: 36px 0 16px;
  font-weight: 800;
  color: #111827;
}

.entry-content img {
  border-radius: 12px;
  margin: 24px 0;
}

.single-post-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 40px;
}

.post-tags-list a {
  display: inline-block;
  background: #f1eee7;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-right: 6px;
  margin-bottom: 6px;
}

/* SIDEBAR & WIDGETS */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  color: #111827;
}

.widget ul {
  list-style: none;
}

.widget-categories-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}

.widget-categories-list li:last-child {
  border-bottom: none;
}

.widget-recent-posts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.widget-recent-posts li:last-child {
  border-bottom: none;
}

.widget-recent-posts a {
  display: block;
  font-weight: 650;
  font-size: 0.96rem;
  line-height: 1.4;
  margin-bottom: 4px;
  color: #1f2937;
}

.widget-post-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================
   STREAMLINED CLEAN FOOTER
   ========================================================== */
.site-footer {
  background-color: var(--dark-footer);
  color: #ffffff;
  padding: 40px 0;
  margin-top: 80px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #9ca3af;
  flex-wrap: wrap;
  gap: 20px;
}

.site-branding-footer .brand-link-footer {
  display: inline-block;
  text-decoration: none;
}

.footer-brand-title {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff !important;
  text-transform: uppercase;
  display: inline-block;
}

.footer-brand-title:hover {
  color: var(--accent-color) !important;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: #9ca3af;
}

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

.footer-copyright {
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
  .articles-grid,
  .category-grid-equal {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .hero-section {
    grid-template-columns: 1fr;
  }
  .single-layout-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .header-right-group {
    flex-direction: column;
    gap: 16px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  .articles-grid,
  .category-grid-equal {
    grid-template-columns: 1fr !important;
  }
  .hero-title {
    font-size: 2rem;
  }
  .static-page-card {
    padding: 30px 22px;
  }
  .static-page-title {
    font-size: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}


/* ==========================================================
   AJAX FILTER TABS & SLIDE ANIMATIONS (VERSION 12)
   ========================================================== */
.filter-tab {
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab:active {
  transform: scale(0.96);
}

.articles-grid {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.articles-grid.grid-loading {
  opacity: 0.4;
  transform: translateY(6px);
  pointer-events: none;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-slide-in {
  animation: cardSlideIn 0.35s ease forwards;
}

@media (max-width: 768px) {
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tab {
    flex-shrink: 0;
  }
}


/* ==========================================================
   RANDOM HERO SLIDER STYLES (VERSION 13)
   ========================================================== */
.hero-slider-wrapper {
  position: relative;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.hero-slider-wrapper .hero-section {
  border-bottom: none;
  padding-bottom: 26px;
}

.hero-slide {
  display: none;
  opacity: 0;
}

.hero-slide.active {
  display: block;
  animation: heroSlideFade 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes heroSlideFade {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

.hero-slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  border: none;
  background: #d6d1c7;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.hero-dot:hover {
  background: #a8a296;
}

.hero-dot.active {
  width: 28px;
  background: var(--accent-color);
}

.hero-slider-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hero-arrow-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  transform: translateY(-1px);
}


/* ==========================================================
   CUSTOM LOGO IMAGE STYLING (VERSION 14)
   ========================================================== */
.custom-logo-wrapper {
  display: flex;
  align-items: center;
}

.custom-logo-wrapper .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.custom-logo-wrapper img.custom-logo {
  max-height: 46px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .custom-logo-wrapper img.custom-logo {
    max-height: 40px;
  }
}


/* ==========================================================
   MAGAZINE BENTO FEATURED STORIES GRID (VERSION 15)
   ========================================================== */
.featured-bento-section {
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--border-color);
}

.bento-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.heading-red-pill {
  width: 8px;
  height: 24px;
  border-radius: 99px;
  background: #e11d48;
  display: inline-block;
  flex-shrink: 0;
}

.bento-heading-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #111827;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.featured-bento-grid {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.bento-right-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-card-large {
  height: 450px;
}

.bento-card-small {
  height: 215px;
  flex: 1;
}

.bento-card-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  color: #ffffff;
}

.bento-card-link:hover {
  color: #ffffff;
}

.bento-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bento-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bento-card:hover .bento-bg-img img {
  transform: scale(1.05);
}

.bento-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 12, 18, 0.92) 0%,
    rgba(10, 12, 18, 0.52) 48%,
    rgba(10, 12, 18, 0.08) 100%
  );
  z-index: 1;
}

.bento-cat-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
}

.bento-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 26px 28px;
}

.bento-card-small .bento-card-content {
  padding: 18px 20px;
}

.bento-large-title {
  font-size: 1.95rem;
  font-weight: 850;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-large-excerpt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.bento-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bento-small-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 960px) {
  .featured-bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card-large {
    height: 380px;
  }
  .bento-right-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .bento-card-small {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .bento-card-large {
    height: 320px;
  }
  .bento-large-title {
    font-size: 1.45rem;
  }
  .bento-right-stack {
    grid-template-columns: 1fr;
  }
  .bento-card-small {
    height: 200px;
  }
}


/* ==========================================================
   POPULAR POSTS & RECENTLY VIEWED SIDEBAR CARDS (VERSION 16)
   ========================================================== */
.sidebar-modern-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-icon-flame {
  font-size: 1.05rem;
  line-height: 1;
}

.sidebar-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #374151;
}

.sidebar-card-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
  letter-spacing: -0.2px;
}

.sidebar-card-arrow {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
}

.sidebar-card-arrow:hover {
  color: var(--accent-color);
}

.sidebar-ranked-list,
.sidebar-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f0ea;
}

.sidebar-post-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-rank-badge.rank-1 {
  background: #fff1f2;
  color: #e11d48;
}

.sidebar-rank-badge.rank-2 {
  background: #fff7ed;
  color: #ea580c;
}

.sidebar-rank-badge.rank-3 {
  background: #fefce8;
  color: #ca8a04;
}

.sidebar-post-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1eee7;
  display: block;
}

.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.sidebar-post-item:hover .sidebar-post-thumb img {
  transform: scale(1.06);
}

.sidebar-post-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-post-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post-title:hover {
  color: var(--accent-color);
}

.sidebar-post-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}


/* ==========================================================
   SOCIAL SHARE BAR & RELATED POSTS GRID (VERSION 20)
   ========================================================== */
.single-share-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #ffffff !important;
}

.share-fb {
  background-color: #3b5998;
}

.share-x {
  background-color: #11141c;
}

.share-tg {
  background-color: #229ed9;
}

.share-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* Related Posts Section */
.related-posts-section {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 2px solid #111827;
}

.related-posts-header {
  margin-bottom: 20px;
}

.related-posts-heading {
  font-size: 1.35rem;
  font-weight: 850;
  color: #111827;
  margin: 0;
  letter-spacing: -0.3px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-post-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: transform 0.25s ease;
}

.related-post-card:hover {
  transform: translateY(-3px);
}

.related-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #f1eee7;
  margin-bottom: 12px;
}

.related-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.related-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-post-card:hover .related-thumb-wrap img {
  transform: scale(1.05);
}

.related-cat-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(17, 20, 28, 0.88);
  color: #ffffff !important;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 4px;
  line-height: 1;
  z-index: 2;
}

.related-cat-badge:hover {
  background: var(--accent-color);
  color: #ffffff !important;
}

.related-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card-title {
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.4;
  color: #111827;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-title a:hover {
  color: var(--accent-color);
}

.related-card-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .single-share-bar {
    grid-template-columns: 1fr;
  }
  .related-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   HEADER UTILITY CONTROLS: DARK MODE SWITCH & SEARCH (VERSION 21)
   ========================================================== */
.header-utility-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-v-divider {
  width: 1px;
  height: 22px;
  background-color: var(--border-color);
  display: inline-block;
}

/* Pill Toggle Switch (Matches Screenshot) */
.theme-switch-btn {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #dcd7cd;
  background-color: #e5e2dc;
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  outline: none;
}

.theme-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, color 0.3s ease;
}

.theme-switch-thumb .icon-sun {
  display: none;
}

.theme-switch-thumb .icon-moon {
  display: block;
}

/* Dark Mode Active State for Switch */
html.dark-mode .theme-switch-btn {
  background-color: #3f424a;
  border-color: #525661;
}

html.dark-mode .theme-switch-thumb {
  transform: translateX(22px);
  background-color: #ffffff;
  color: #111827;
}

html.dark-mode .theme-switch-thumb .icon-moon {
  display: none;
}

html.dark-mode .theme-switch-thumb .icon-sun {
  display: block;
}

/* Search Magnifying Glass Button */
.header-search-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header-search-btn:hover {
  background-color: rgba(242, 92, 56, 0.12);
  color: var(--accent-color);
}

/* Search Popup Overlay */
.saodyai-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.68);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 110px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.saodyai-search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.saodyai-search-box {
  background: var(--surface-card);
  border: 1px solid var(--card-border);
  width: 92%;
  max-width: 600px;
  border-radius: 18px;
  padding: 24px 28px 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(-14px);
  transition: transform 0.25s ease;
}

.saodyai-search-overlay.open .saodyai-search-box {
  transform: translateY(0);
}

.search-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.search-box-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.search-close-btn {
  background: transparent;
  border: none;
  font-size: 1.65rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.search-close-btn:hover {
  color: var(--accent-color);
}

.saodyai-search-form {
  display: flex;
  gap: 10px;
}

.saodyai-search-field {
  flex: 1;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.saodyai-search-field:focus {
  border-color: var(--accent-color);
}

.saodyai-search-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.saodyai-search-submit:hover {
  opacity: 0.92;
}

/* ==========================================================
   COMPLETE DARK MODE THEME PALETTE (html.dark-mode)
   ========================================================== */
html.dark-mode {
  --bg-color: #12141a;
  --surface-card: #1b1e26;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #2a2e39;
  --card-border: #282c37;
}

html.dark-mode body {
  background-color: var(--bg-color);
  color: var(--text-main);
}

html.dark-mode .site-header {
  background: rgba(24, 26, 33, 0.95);
  border-bottom-color: var(--border-color);
}

html.dark-mode .brand-title,
html.dark-mode .bento-heading-text,
html.dark-mode .section-title,
html.dark-mode .hero-title,
html.dark-mode .category-page-title,
html.dark-mode .static-page-title,
html.dark-mode .single-post-title,
html.dark-mode .widget-title,
html.dark-mode .sidebar-card-heading,
html.dark-mode .related-posts-heading,
html.dark-mode .related-card-title,
html.dark-mode .sidebar-post-title,
html.dark-mode .card-title {
  color: #f9fafb !important;
}

html.dark-mode .nav-links a {
  color: #d1d5db;
}

html.dark-mode .nav-links a:hover {
  color: var(--accent-color);
}

html.dark-mode .header-social a {
  background: #262a34;
  color: #e5e7eb;
}

html.dark-mode .header-social a:hover {
  background: var(--accent-color);
  color: #ffffff;
}

html.dark-mode .filter-tab {
  background: #1b1e26;
  border-color: #2c303c;
  color: #9ca3af;
}

html.dark-mode .filter-tab.active,
html.dark-mode .filter-tab:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

html.dark-mode .article-card,
html.dark-mode .single-post-main,
html.dark-mode .static-page-card,
html.dark-mode .widget,
html.dark-mode .sidebar-modern-card,
html.dark-mode .related-post-card {
  background: var(--surface-card) !important;
  border-color: var(--card-border) !important;
}

html.dark-mode .card-footer {
  background: #161920 !important;
  border-top-color: var(--border-color) !important;
}

html.dark-mode .card-arrow-btn {
  background: #272b36 !important;
  color: #f3f4f6 !important;
}

html.dark-mode .article-card:hover .card-arrow-btn {
  background: var(--accent-color) !important;
  color: #ffffff !important;
}

html.dark-mode .card-badge,
html.dark-mode .single-cat-badge .card-badge {
  background: #242832;
  border-color: #3b302d;
}

html.dark-mode .entry-content,
html.dark-mode .static-page-content {
  color: #d1d5db;
}

html.dark-mode .entry-content h2,
html.dark-mode .entry-content h3 {
  color: #f9fafb;
}

html.dark-mode .sidebar-post-item {
  border-bottom-color: #272b36;
}

html.dark-mode .sidebar-rank-badge {
  background: #272b36;
  color: #9ca3af;
}

html.dark-mode .sidebar-rank-badge.rank-1 {
  background: rgba(225, 29, 72, 0.18);
  color: #fb7185;
}

html.dark-mode .sidebar-rank-badge.rank-2 {
  background: rgba(234, 88, 12, 0.18);
  color: #fb923c;
}

html.dark-mode .sidebar-rank-badge.rank-3 {
  background: rgba(202, 138, 4, 0.18);
  color: #facc15;
}

html.dark-mode .related-posts-section {
  border-top-color: #2c303c;
}

html.dark-mode .pagination-wrapper .page-numbers {
  background: #1b1e26;
  border-color: #2c303c;
  color: #d1d5db;
}

html.dark-mode .pagination-wrapper .page-numbers.current {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

html.dark-mode .post-tags-list a {
  background: #272b36;
  color: #e5e7eb;
}


/* ==========================================================
   HEADER MENU SINGLE-LINE & FOOTER SOCIAL BAR (VERSION 22)
   ========================================================== */
.header-right-group {
  gap: 24px;
}

.nav-links {
  gap: 20px;
}

.nav-links a {
  white-space: nowrap;
}

.footer-right-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  color: #e5e7eb;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent-color);
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-right-group {
    flex-direction: column;
    gap: 12px;
  }
}


/* ==========================================================
   MOBILE COMPACT HEADER BAR & SLIDE-OUT DRAWER (VERSION 23)
   ========================================================== */
.mobile-menu-toggle,
.mobile-search-trigger {
  display: none;
}

@media (max-width: 900px) {
  .site-header {
    padding: 12px 0;
  }

  .header-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .desktop-only-nav {
    display: none !important;
  }

  .mobile-menu-toggle,
  .mobile-search-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 10px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .mobile-menu-toggle:hover,
  .mobile-search-trigger:hover {
    background: rgba(242, 92, 56, 0.1);
    color: var(--accent-color);
  }

  .site-branding {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }

  .custom-logo-wrapper img.custom-logo {
    max-height: 36px;
  }

  .brand-title {
    font-size: 1.45rem;
  }
}

/* Mobile Slide-Out Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.62);
  backdrop-filter: blur(4px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 82vw;
  background: var(--surface-card);
  color: var(--text-main);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.22);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer-panel.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-title {
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
}

.mobile-drawer-close:hover {
  color: var(--accent-color);
}

.mobile-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-list li a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-list li a:hover {
  background: rgba(242, 92, 56, 0.1);
  color: var(--accent-color);
}

.mobile-drawer-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.mobile-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-theme-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}


/* ==========================================================
   MOBILE HEADER RIGHT CONTROLS: DARK MODE + SEARCH (VERSION 24)
   ========================================================== */
.mobile-right-controls {
  display: none;
}

@media (max-width: 900px) {
  .mobile-right-controls {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-theme-switch {
    width: 44px;
    height: 24px;
  }

  .mobile-theme-switch .theme-switch-thumb {
    width: 18px;
    height: 18px;
  }

  html.dark-mode .mobile-theme-switch .theme-switch-thumb {
    transform: translateX(20px);
  }

  .mobile-search-trigger {
    width: 36px;
    height: 36px;
  }

  .site-branding {
    justify-content: flex-start;
    padding-left: 4px;
  }

  .custom-logo-wrapper img.custom-logo {
    max-height: 32px;
  }

  .brand-title {
    font-size: 1.3rem;
  }
}
