/**
 * TheQnA - Main Stylesheet
 * Designed by HR Rajput
 */

/* ==========================================================================
   1. CSS Variables & Design System Tokens
   ========================================================================== */
:root {
  --theqna-primary: #1D72FE;
  --theqna-primary-hover: #155DD1;
  --theqna-primary-light: #EFF6FF;
  --theqna-primary-border: #BFDBFE;
  
  --theqna-secondary: #0F172A;
  --theqna-secondary-hover: #1E293B;
  
  --theqna-text-main: #0F172A;
  --theqna-text-body: #334155;
  --theqna-text-muted: #64748B;
  --theqna-text-light: #94A3B8;
  
  --theqna-bg-body: #F8FAFC;
  --theqna-bg-card: #FFFFFF;
  --theqna-bg-subtle: #F1F5F9;
  
  --theqna-border-color: #E2E8F0;
  --theqna-border-subtle: #F1F5F9;
  --theqna-border-dark: #CBD5E1;
  
  /* Reference Design Light Footer Tokens */
  --theqna-footer-bg: #FFFFFF;
  --theqna-footer-text: #64748B;
  --theqna-footer-heading: #0F172A;
  --theqna-footer-border: #E2E8F0;
  
  --theqna-font-heading: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --theqna-font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --theqna-radius-sm: 6px;
  --theqna-radius-md: 10px;
  --theqna-radius-lg: 16px;
  --theqna-radius-full: 9999px;
  
  --theqna-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --theqna-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --theqna-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --theqna-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  
  --theqna-container-max: 1280px;
  --theqna-sidebar-width: 310px;
  --theqna-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--theqna-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--theqna-text-body);
  background-color: var(--theqna-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--theqna-primary);
  text-decoration: none;
  transition: var(--theqna-transition);
}

a:hover, a:focus-visible {
  color: var(--theqna-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--theqna-font-heading);
  color: var(--theqna-text-main);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Screen reader text for accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #F1F5F9;
  border-radius: 4px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #0F172A;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 12px 18px;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   3. Layout & Container
   ========================================================================== */
.theqna-container {
  width: 100%;
  max-width: var(--theqna-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.theqna-site-main {
  flex: 1 0 auto;
  padding-top: 2.25rem;
  padding-bottom: 4rem;
}

.theqna-layout-2col {
  display: grid;
  grid-template-columns: 1fr var(--theqna-sidebar-width);
  gap: 1.75rem;
  align-items: start;
}

.theqna-main-col {
  min-width: 0;
}

.theqna-sidebar-col {
  min-width: 0;
}

/* Single Post: Align sidebar top horizontally with article title */
@media (min-width: 1024px) {
  .single .theqna-sidebar-col,
  .theqna-single-layout .theqna-sidebar-col {
    padding-top: 0;
  }
}

/* ==========================================================================
   4. Header & Navigation (Matching Reference)
   ========================================================================== */
.theqna-header-wrapper {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--theqna-border-color);
  width: 100%;
  z-index: 1000;
  position: relative;
  transition: var(--theqna-transition);
}

.theqna-header-sticky.is-sticky {
  position: sticky;
  top: 0;
  box-shadow: 0 2px 8px 0 rgba(15, 23, 42, 0.05);
}

.theqna-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 1rem;
}

/* Brand */
.theqna-brand-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.theqna-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.theqna-brand-wrap .custom-logo-link {
  display: flex;
  align-items: center;
}

.theqna-brand-wrap .custom-logo,
.theqna-brand-wrap img,
.theqna-brand-logo {
  height: 42px;
  max-height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.theqna-brand-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theqna-brand-text {
  display: flex;
  flex-direction: column;
}

.theqna-brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--theqna-text-dark);
  line-height: 1.15;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.theqna-brand-tagline {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--theqna-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* Desktop Nav Menu */
.theqna-nav-desktop {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.theqna-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.theqna-menu > li {
  position: relative;
}

.theqna-menu > li > a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  transition: var(--theqna-transition);
  position: relative;
}

.theqna-menu > li > a:hover {
  color: var(--theqna-primary);
}

/* Active Menu Item Blue Underline (Matching "Home" in reference) */
.theqna-menu > li.current-menu-item > a,
.theqna-menu > li.current_page_item > a {
  color: var(--theqna-primary);
}

.theqna-menu > li.current-menu-item > a::after,
.theqna-menu > li.current_page_item > a::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0.65rem;
  right: 0.65rem;
  height: 2.5px;
  background-color: var(--theqna-primary);
  border-radius: 2px;
}

/* Submenu */
.theqna-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: #FFFFFF;
  border: 1px solid var(--theqna-border-color);
  border-radius: var(--theqna-radius-md);
  box-shadow: var(--theqna-shadow-lg);
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.15s ease-out;
  z-index: 100;
}

.theqna-menu li:hover > .sub-menu,
.theqna-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theqna-menu .sub-menu li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--theqna-text-body);
  border-radius: var(--theqna-radius-sm);
}

.theqna-menu .sub-menu li a:hover {
  background-color: var(--theqna-bg-subtle);
  color: var(--theqna-primary);
}

/* Header Actions */
.theqna-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Inline Header Search Bar (Matching Reference) */
.theqna-header-search-wrap {
  width: 190px;
}

.theqna-inline-search-form {
  display: flex;
  align-items: center;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.42rem 0.75rem;
  transition: var(--theqna-transition);
}

.theqna-inline-search-form:focus-within {
  background-color: #FFFFFF;
  border-color: var(--theqna-primary);
  box-shadow: 0 0 0 3px rgba(29, 114, 254, 0.12);
}

.theqna-inline-search-icon {
  color: #94A3B8;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
}

.theqna-inline-search-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.875rem;
  color: var(--theqna-text-main);
  outline: none;
}

.theqna-inline-search-input::placeholder {
  color: #94A3B8;
}

/* + Ask Question Button (Matching Reference) */
.theqna-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--theqna-transition);
  text-decoration: none;
  white-space: nowrap;
}

.theqna-btn-primary {
  background-color: var(--theqna-primary);
  color: #FFFFFF !important;
  border-color: var(--theqna-primary);
}

.theqna-btn-primary:hover {
  background-color: var(--theqna-primary-hover);
  border-color: var(--theqna-primary-hover);
}

.theqna-btn-ask {
  padding: 0.46rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.theqna-ask-plus {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

/* Mobile Toggle */
.theqna-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--theqna-border-color);
  background-color: #FFFFFF;
  color: var(--theqna-text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile Nav Drawer */
.theqna-mobile-nav {
  display: none;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--theqna-border-color);
  padding: 1rem 1.5rem 1.5rem;
}

.theqna-mobile-nav.is-open {
  display: block;
}

.theqna-mobile-menu {
  list-style: none;
  margin: 0 0 1.25rem 0;
  padding: 0;
}

.theqna-mobile-menu li {
  border-bottom: 1px solid var(--theqna-border-subtle);
}

.theqna-mobile-menu li a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--theqna-text-main);
}

/* ==========================================================================
   5. Hero Section (Matching Reference)
   ========================================================================== */
.theqna-hero {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--theqna-border-color);
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.theqna-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.theqna-hero-center .theqna-hero-inner {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.theqna-hero-title {
  font-size: 3.125rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--theqna-text-main);
  letter-spacing: -0.03em;
  margin-bottom: 1.15rem;
}

.theqna-hero-title span.highlight {
  color: var(--theqna-primary);
  display: inline-block;
}

.theqna-hero-desc {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 2rem;
  max-width: 540px;
}

.theqna-hero-center .theqna-hero-desc {
  margin-left: auto;
  margin-right: auto;
}

/* Large Hero Search Box */
.theqna-hero-search-wrapper {
  max-width: 580px;
}

.theqna-hero-center .theqna-hero-search-wrapper {
  margin: 0 auto;
}

.theqna-hero-search-form {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0.35rem 0.35rem 0.35rem 1.15rem;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  transition: var(--theqna-transition);
}

.theqna-hero-search-form:focus-within {
  border-color: var(--theqna-primary);
  box-shadow: 0 0 0 4px rgba(29, 114, 254, 0.12);
}

.theqna-hero-search-icon {
  color: #94A3B8;
  flex-shrink: 0;
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
}

.theqna-hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--theqna-text-main);
  outline: none;
  width: 100%;
}

.theqna-hero-search-input::placeholder {
  color: #94A3B8;
}

.theqna-hero-search-btn {
  flex-shrink: 0;
  padding: 0.75rem 1.6rem;
  font-size: 0.9375rem;
  border-radius: 8px;
}

.theqna-hero-image-col {
  display: flex;
  justify-content: center;
}

.theqna-hero-image-col img,
.theqna-hero-image-col svg {
  max-height: 400px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   6. Latest Questions & Answers Section (3 Columns Matching Reference)
   ========================================================================== */
.theqna-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.theqna-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.theqna-section-subtitle {
  font-size: 0.9375rem;
  color: var(--theqna-text-muted);
  margin-top: 0.25rem;
}

.theqna-section-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theqna-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.theqna-section-action:hover {
  text-decoration: underline;
}

/* Post Grid: 3 columns by default */
.theqna-post-grid {
  display: grid;
  gap: 1.35rem;
}

.theqna-grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theqna-grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Post Card Component */
.theqna-card {
  background-color: #FFFFFF;
  border: 1px solid var(--theqna-border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--theqna-transition);
}

.theqna-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.theqna-card-thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--theqna-bg-subtle);
  aspect-ratio: 16 / 10;
  height: 155px;
  margin: 0.65rem 0.65rem 0 0.65rem;
  border-radius: 8px;
}

.theqna-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.theqna-card:hover .theqna-card-thumb-wrap img {
  transform: scale(1.03);
}

.theqna-card-body {
  padding: 0.75rem 0.85rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.theqna-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
  max-height: 2.7em;
}

.theqna-card-title a {
  color: #0F172A;
  text-decoration: none;
}

.theqna-card-title a:hover {
  color: var(--theqna-primary);
}

.theqna-card-excerpt {
  font-size: 0.8125rem;
  color: #64748B;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.9em;
  max-height: 2.9em;
}

.theqna-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid #F1F5F9;
  font-size: 0.72rem;
  color: #64748B;
  margin-top: auto;
  gap: 0.4rem;
  white-space: nowrap;
}

.theqna-card-meta-left,
.theqna-card-meta-right {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.theqna-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  color: #64748B;
  white-space: nowrap !important;
  text-decoration: none;
}

.theqna-meta-item time,
.theqna-meta-item span {
  white-space: nowrap !important;
  display: inline-block;
}

.theqna-meta-reading {
  cursor: pointer;
}

.theqna-meta-reading:hover {
  color: var(--theqna-primary);
}

.theqna-meta-arrow {
  color: var(--theqna-primary);
  margin-left: 0.15rem;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.theqna-card:hover .theqna-meta-arrow {
  transform: translateX(2.5px);
}

/* ==========================================================================
   7. Featured Guide Banner (Matching Reference)
   ========================================================================== */
.theqna-featured-guide-section {
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

.theqna-featured-guide-card {
  background: #FFFFFF;
  border: 1px solid var(--theqna-border-color);
  border-radius: var(--theqna-radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2.5rem;
  box-shadow: var(--theqna-shadow-xs);
  overflow: hidden;
}

.theqna-featured-guide-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.theqna-eyebrow-dash {
  width: 18px;
  height: 2.5px;
  background-color: var(--theqna-primary);
  border-radius: 2px;
}

.theqna-eyebrow-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--theqna-primary);
}

.theqna-featured-guide-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0F172A;
  margin-bottom: 0.85rem;
}

.theqna-featured-guide-title a {
  color: #0F172A;
}

.theqna-featured-guide-title a:hover {
  color: var(--theqna-primary);
}

.theqna-featured-guide-desc {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.theqna-featured-guide-image img,
.theqna-featured-guide-image svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   8. Sidebar Widgets (Matching Reference Design)
   ========================================================================== */
.theqna-widget,
.theqna-sidebar-col .widget,
.theqna_trending_widget,
.theqna_categories_widget {
  background-color: #FFFFFF;
  border: 1px solid var(--theqna-border-color);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  margin-bottom: 2.75rem !important;
  clear: both;
}

.theqna-widget:last-child,
.theqna-sidebar-col .widget:last-child {
  margin-bottom: 0 !important;
}

.theqna_categories_widget,
.theqna-categories-widget {
  margin-top: 1rem;
}

.theqna-widget-title,
.theqna-sidebar-col .widgettitle {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--theqna-border-subtle);
  line-height: 1.3;
}

.theqna-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-right: 0.65rem;
  flex-shrink: 0;
  line-height: 1;
}

.theqna-title-text {
  font-weight: 800;
  color: #0F172A;
}

.theqna-widget-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--theqna-border-subtle);
  padding-bottom: 0.85rem;
  margin-bottom: 1.35rem;
  margin-top: 0.35rem;
}

/* Trending Widget */
.theqna-trending-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
}

.theqna-trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theqna-trending-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 800;
  flex-shrink: 0;
}

.theqna-trending-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--theqna-bg-subtle);
}

.theqna-sidebar-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theqna-trending-content {
  flex: 1;
  min-width: 0;
}

.theqna-trending-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.theqna-trending-title a {
  color: #0F172A;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theqna-trending-title a:hover {
  color: var(--theqna-primary);
}

.theqna-trending-meta {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* Categories Widget (Matching Reference Guide Card Aesthetic) */
.theqna-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.theqna-category-item {
  margin: 0;
  padding: 0;
}

.theqna-category-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background-color: #FFFFFF;
  border: 1px solid var(--theqna-border-color);
  border-radius: 10px;
  text-decoration: none;
  color: #0F172A;
  transition: var(--theqna-transition);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.theqna-category-card:hover {
  transform: translateX(3px);
  border-color: #CBD5E1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.theqna-category-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.theqna-category-card:hover .theqna-category-icon-box {
  transform: scale(1.05);
}

.theqna-category-icon-box svg {
  width: 20px;
  height: 20px;
  stroke: #FFFFFF;
}

.theqna-category-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.theqna-category-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theqna-category-card:hover .theqna-category-name {
  color: var(--theqna-primary);
}

.theqna-category-count {
  font-size: 0.72rem;
  color: #94A3B8;
  margin-top: 0.15rem;
  white-space: nowrap;
}

.theqna-category-chevron {
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.theqna-category-card:hover .theqna-category-chevron {
  color: var(--theqna-primary);
  transform: translateX(2px);
}

/* Popular Guides Widget */
.theqna-guides-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.theqna-guide-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  background-color: transparent;
  transition: var(--theqna-transition);
  text-decoration: none;
}

.theqna-guide-item:hover {
  background-color: #F8FAFC;
}

.theqna-guide-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theqna-guide-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0F172A;
  flex: 1;
}

.theqna-guide-chevron {
  color: #94A3B8;
  font-size: 1.15rem;
  font-weight: 600;
  transition: transform 0.2s ease;
  line-height: 1;
}

.theqna-guide-item:hover .theqna-guide-chevron {
  transform: translateX(2px);
  color: var(--theqna-primary);
}


/* ==========================================================================
   9. Footer Styles (Clean White/Light Background Matching Reference)
   ========================================================================== */
.theqna-footer {
  background-color: #FFFFFF;
  color: #64748B;
  border-top: 1px solid #E2E8F0;
  padding-top: 3.5rem;
  margin-top: auto;
}

.theqna-footer a {
  color: #64748B;
}

.theqna-footer a:hover {
  color: var(--theqna-primary);
}

.theqna-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 3.5rem;
}

.theqna-footer-col-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 1.15rem;
}

.theqna-footer-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748B;
  margin-top: 0.75rem;
}

.theqna-social-links {
  display: flex;
  gap: 0.6rem;
}

.theqna-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: #F1F5F9;
  color: #64748B;
  transition: var(--theqna-transition);
}

.theqna-social-btn:hover {
  background-color: var(--theqna-primary);
  color: #FFFFFF;
}

.theqna-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.theqna-footer-menu li a {
  font-size: 0.875rem;
  color: #64748B;
}

/* Footer Newsletter Form */
.theqna-footer-newsletter-input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background-color: #FFFFFF;
  font-size: 0.875rem;
  color: #0F172A;
  outline: none;
}

.theqna-footer-newsletter-input:focus {
  border-color: var(--theqna-primary);
}

/* Bottom Bar */
.theqna-footer-bottom {
  border-top: 1px solid #E2E8F0;
  padding: 1.25rem 0;
}

.theqna-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #64748B;
}

.theqna-footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theqna-footer-legal-links .theqna-sep {
  color: #CBD5E1;
  font-size: 0.75rem;
}

/* ==========================================================================
   10. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .theqna-layout-2col {
    grid-template-columns: 1fr;
  }
  
  .theqna-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  
  .theqna-hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .theqna-hero-search-wrapper {
    margin: 0 auto;
  }
  
  .theqna-featured-guide-card {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  
  .theqna-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .theqna-footer-grid > :first-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .theqna-nav-desktop,
  .theqna-header-search-wrap,
  .theqna-header-actions .theqna-btn {
    display: none;
  }
  
  .theqna-mobile-toggle {
    display: inline-flex;
  }
  
  .theqna-hero-title {
    font-size: 2.25rem;
  }
  
  .theqna-hero {
    padding: 2.5rem 0 3rem;
  }
  
  .theqna-hero-search-form {
    flex-direction: column;
    padding: 0.65rem;
    gap: 0.65rem;
  }
  
  .theqna-hero-search-icon {
    display: none;
  }
  
  .theqna-hero-search-btn {
    width: 100%;
  }
  
  .theqna-grid-cols-3,
  .theqna-grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .theqna-footer-grid {
    grid-template-columns: 1fr;
  }
  
  .theqna-footer-grid > :first-child {
    grid-column: span 1;
  }
  
  .theqna-footer-bottom-inner {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }
}

/* ==========================================================================
   21. Page/Post Custom Popup Modal
   ========================================================================== */
.theqna-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.theqna-popup-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.theqna-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.theqna-popup-modal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.06);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.theqna-popup-overlay.is-active .theqna-popup-modal {
  transform: scale(1) translateY(0);
}

.theqna-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.theqna-popup-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: rotate(90deg);
}

.theqna-popup-image-wrap {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  background: #f8fafc;
}

.theqna-popup-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theqna-popup-body {
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.theqna-popup-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  background: rgba(29, 114, 254, 0.1);
  color: var(--theqna-primary, #1D72FE);
  margin-bottom: 0.85rem;
}

.theqna-popup-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.theqna-popup-desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.theqna-popup-desc p {
  margin: 0 0 0.5rem;
}

.theqna-popup-desc p:last-child {
  margin-bottom: 0;
}

.theqna-popup-action {
  width: 100%;
  display: flex;
  justify-content: center;
}

.theqna-popup-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--theqna-primary, #1D72FE);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(29, 114, 254, 0.35);
  transition: all 0.25s ease;
}

.theqna-popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 114, 254, 0.45);
}

body.theqna-popup-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .theqna-popup-overlay {
    padding: 0.75rem;
  }
  .theqna-popup-body {
    padding: 1.75rem 1.25rem 1.5rem;
  }
  .theqna-popup-title {
    font-size: 1.25rem;
  }
}
