/* ===================================================================
   AdvancedBlogs Modernized — Master Stylesheet
   Built on Bootstrap 5 (loaded globally). Uses Inter font.
   =================================================================== */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  --ab-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ab-white: #ffffff;
  --ab-bg: #f8f9fa;
  --ab-text: #1a1a2e;
  --ab-text-muted: #6c757d;
  --ab-text-light: #adb5bd;
  --ab-accent: #2563eb;
  --ab-accent-hover: #1d4ed8;
  --ab-accent-light: #dbeafe;
  --ab-border: #e9ecef;
  --ab-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --ab-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --ab-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --ab-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  --ab-radius: 12px;
  --ab-radius-sm: 8px;
  --ab-radius-lg: 16px;
  --ab-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset Oxwall legacy overrides with surgical precision --- */
body.blogs_home .ow_page_padding,
body.blogs_index .ow_page_padding,
body.blogs_details .ow_page_padding {
  padding-top: 20px !important;
}

/* --- Base Typography --- */
.ab-wrap {
  font-family: var(--ab-font);
  color: var(--ab-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ab-wrap h1,
.ab-wrap h2,
.ab-wrap h3,
.ab-wrap h4,
.ab-wrap h5,
.ab-wrap h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--ab-text);
}

/* ===================================================================
   READING PROGRESS BAR
   =================================================================== */
.ab-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--ab-accent), #7c3aed);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===================================================================
   CONTENT MENU (Top Navigation Tabs)
   =================================================================== */
.ab-content-menu {
  background: var(--ab-white);
  border-bottom: 1px solid var(--ab-border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.ab-content-menu .nav-link {
  font-family: var(--ab-font);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ab-text-muted);
  padding: 16px 24px;
  border: none;
  border-bottom: 3px solid transparent;
  transition: var(--ab-transition);
  white-space: nowrap;
}

.ab-content-menu .nav-link:hover {
  color: var(--ab-text);
  border-bottom-color: var(--ab-border);
}

.ab-content-menu .nav-link.active {
  color: var(--ab-accent);
  border-bottom-color: var(--ab-accent);
}

/* ===================================================================
   HERO / FEATURED SECTION (Blog Home)
   =================================================================== */
.ab-hero {
  position: relative;
  width: 100%;
  min-height: 75vh;
  overflow: hidden;
  border-radius: 0;
}

.ab-hero .carousel-item {
  min-height: 75vh;
}

.ab-hero .carousel-item img {
  width: 100%;
  height: 75vh;
  object-fit: cover;
  filter: brightness(0.55);
}

.ab-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 40px 40px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--ab-white);
  z-index: 2;
  pointer-events: none;
}

.ab-hero-overlay * {
  pointer-events: auto;
}

.ab-hero-overlay .ab-badge {
  display: inline-block;
  background: var(--ab-accent);
  color: var(--ab-white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.ab-hero-overlay h2 {
  color: var(--ab-white);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 700px;
  margin-bottom: 12px;
}

.ab-hero-overlay .ab-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  opacity: 0.85;
}

.ab-hero-overlay .ab-hero-meta img {
  width: 36px;
  height: 36px!important;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  filter: none;
}

@media (max-width: 768px) {

  .ab-hero,
  .ab-hero .carousel-item {
    min-height: 55vh;
  }

  .ab-hero .carousel-item img {
    height: 55vh;
  }

  .ab-hero-overlay h2 {
    font-size: 1.5rem;
  }

  .ab-hero-overlay {
    padding: 30px 20px 20px;
  }
}

/* ===================================================================
   NEWS TICKER
   =================================================================== */
.ab-ticker {
  background: var(--ab-white);
  border-bottom: 1px solid var(--ab-border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}

.ab-ticker-label {
  display: inline-flex;
  align-items: center;
  background: var(--ab-accent);
  color: var(--ab-white);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 4px;
  margin-right: 20px;
  white-space: nowrap;
}

.ab-ticker-track {
  display: inline-flex;
  animation: ab-ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

.ab-ticker-track:hover {
  animation-play-state: paused;
}

.ab-ticker-item {
  display: inline-block;
  padding: 0 30px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ab-text);
}

.ab-ticker-item a {
  color: var(--ab-text);
  text-decoration: none;
  transition: var(--ab-transition);
}

.ab-ticker-item a:hover {
  color: var(--ab-accent);
}

.ab-ticker-item::before {
  content: '•';
  margin-right: 12px;
  color: var(--ab-accent);
  font-weight: 900;
}

@keyframes ab-ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ===================================================================
   BLOG CARDS (Universal — used in grids, sidebar, related posts)
   =================================================================== */
.ab-card {
  background: var(--ab-white);
  border-radius: var(--ab-radius);
  overflow: hidden;
  box-shadow: var(--ab-shadow-sm);
  transition: var(--ab-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ab-border);
  position: relative;
  /* For stretched-link */
}

.ab-card .ab-card-img-wrap {
  cursor: pointer;
}

.ab-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ab-shadow-hover);
}

.ab-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.ab-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ab-card:hover .ab-card-img-wrap img {
  transform: scale(1.06);
}

.ab-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ab-card-body .ab-badge {
  display: inline-block;
  background: var(--ab-accent-light);
  color: var(--ab-accent);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: fit-content;
}

.ab-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ab-card-body h3 a {
  color: var(--ab-text);
  text-decoration: none;
  transition: var(--ab-transition);
}

.ab-card-body h3 a:hover {
  color: var(--ab-accent);
}

.ab-card-excerpt {
  font-size: 0.875rem;
  color: var(--ab-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.ab-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ab-text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ab-border);
}

.ab-card-meta img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.ab-card-meta .ab-author-name {
  font-weight: 600;
  color: var(--ab-text);
}

.ab-card-meta .ab-dot {
  color: var(--ab-text-light);
}

/* --- Card Size Variants --- */
.ab-card-hero {
  flex-direction: row;
  min-height: 420px;
  border: none;
  box-shadow: var(--ab-shadow-md);
  margin-bottom: 20px;
}

.ab-card-hero .ab-card-img-wrap {
  width: 60%;
  aspect-ratio: auto;
}

.ab-card-hero .ab-card-body {
  width: 40%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ab-card-hero h1 {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.ab-card-hero h1 a {
  color: var(--ab-text);
  text-decoration: none;
}

.ab-card-hero .ab-card-excerpt {
  font-size: 1.05rem;
  -webkit-line-clamp: 4;
  margin-bottom: 24px;
}

@media (max-width: 991px) {
  .ab-card-hero {
    flex-direction: column;
    min-height: auto;
  }

  .ab-card-hero .ab-card-img-wrap,
  .ab-card-hero .ab-card-body {
    width: 100%;
  }

  .ab-card-hero .ab-card-body {
    padding: 24px;
  }

  .ab-card-hero h1 {
    font-size: 1.5rem;
  }
}

.ab-card-lg .ab-card-img-wrap {
  aspect-ratio: 16 / 9;
}

.ab-card-lg .ab-card-body h3 {
  font-size: 1.4rem;
}

.ab-card-sm .ab-card-img-wrap {
  aspect-ratio: 4 / 3;
}

.ab-card-sm .ab-card-body h3 {
  font-size: 0.95rem;
}

.ab-card-sm .ab-card-excerpt {
  -webkit-line-clamp: 2;
}

/* --- Horizontal Card (Sidebar) --- */
.ab-card-horizontal {
  flex-direction: row;
  border-radius: var(--ab-radius-sm);
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--ab-border);
  padding: 12px 0;
}

.ab-card-horizontal:hover {
  transform: none;
  box-shadow: none;
}

.ab-card-horizontal .ab-card-img-wrap {
  width: 80px;
  min-width: 80px;
  height: 60px;
  aspect-ratio: auto;
  border-radius: var(--ab-radius-sm);
  overflow: hidden;
}

.ab-card-horizontal .ab-card-body {
  padding: 0 0 0 12px;
}

.ab-card-horizontal .ab-card-body h3 {
  font-size: 0.85rem;
  margin-bottom: 2px;
  -webkit-line-clamp: 2;
}

.ab-card-horizontal .ab-card-meta {
  border: none;
  padding-top: 4px;
  font-size: 0.72rem;
}

/* ===================================================================
   CATEGORY SECTION HEADERS (Home page category grids)
   =================================================================== */
.ab-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ab-accent);
}

.ab-section-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.ab-section-header .ab-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ab-accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ab-section-header .ab-view-all:hover {
  text-decoration: underline;
}

/* ===================================================================
   SIDEBAR WIDGETS
   =================================================================== */
.ab-sidebar-widget {
  background: var(--ab-white);
  border-radius: var(--ab-radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--ab-border);
}

.ab-sidebar-widget h4 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ab-accent);
}

/* --- Category Pills (Sidebar) --- */
.ab-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ab-text);
  background: var(--ab-bg);
  border: 1px solid var(--ab-border);
  text-decoration: none;
  transition: var(--ab-transition);
}

.ab-category-pill:hover,
.ab-category-pill.active {
  background: var(--ab-accent);
  color: var(--ab-white);
  border-color: var(--ab-accent);
}

.ab-category-pill .ab-pill-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.1);
  padding: 1px 6px;
  border-radius: 50px;
}

/* ===================================================================
   IMMERSIVE ARTICLE VIEW (Single Post)
   =================================================================== */
.ab-article-hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 40px;
}

.ab-article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ab-article-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.ab-article-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px;
  max-width: 800px;
  color: var(--ab-white);
}

.ab-article-hero-content .ab-badge {
  display: inline-block;
  background: var(--ab-accent);
  color: var(--ab-white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.ab-article-hero-content h1 {
  color: var(--ab-white);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}

.ab-article-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.ab-article-hero-meta img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
}

.ab-article-hero-meta .ab-author-name {
  font-weight: 600;
  color: var(--ab-white);
}

@media (max-width: 768px) {
  .ab-article-hero {
    min-height: 60vh;
  }

  .ab-article-hero-content {
    padding: 30px 20px;
  }

  .ab-article-hero-content h1 {
    font-size: 1.75rem;
  }
}

/* --- Article Body --- */
.ab-article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 1.1rem;
  line-height: 1.85;
  color: #333;
}

.ab-article-body p {
  margin-bottom: 1.5em;
}

.ab-article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
}

.ab-article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.ab-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ab-radius-sm);
  margin: 1.5em 0;
}

.ab-article-body blockquote {
  border-left: 4px solid var(--ab-accent);
  margin: 2em 0;
  padding: 16px 24px;
  background: var(--ab-accent-light);
  border-radius: 0 var(--ab-radius-sm) var(--ab-radius-sm) 0;
  font-style: italic;
  color: var(--ab-text);
}

.ab-article-body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px;
  border-radius: var(--ab-radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Tags --- */
.ab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0;
  padding-top: 20px;
  border-top: 1px solid var(--ab-border);
}

.ab-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ab-text-muted);
  background: var(--ab-bg);
  border-radius: 50px;
  border: 1px solid var(--ab-border);
  text-decoration: none;
  transition: var(--ab-transition);
}

.ab-tag:hover {
  background: var(--ab-accent);
  color: var(--ab-white);
  border-color: var(--ab-accent);
}

/* --- Author Bio Card (Bottom of Article) --- */
.ab-author-card {
  background: var(--ab-bg);
  border-radius: var(--ab-radius);
  padding: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 40px 0;
}

.ab-author-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ab-author-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ab-author-card h4 a {
  color: var(--ab-text);
  text-decoration: none;
}

.ab-author-card h4 a:hover {
  color: var(--ab-accent);
}

.ab-author-card p {
  font-size: 0.85rem;
  color: var(--ab-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --- Related Posts / More From Author Grid --- */
.ab-related-section {
  padding: 50px 0;
  background: var(--ab-bg);
  margin-top: 40px;
}

/* ===================================================================
   BLOG CREATION / EDIT FORM
   =================================================================== */
.ab-form-wrap {
  max-width: 860px;
  margin: 30px auto;
  padding: 0 20px;
}

.ab-form-group {
  margin-bottom: 20px;
}

.ab-form-group label {
  display: block;
  font-family: var(--ab-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ab-text);
  margin-bottom: 6px;
}

.ab-form-group input[type="text"],
.ab-form-group textarea,
.ab-form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius-sm);
  font-family: var(--ab-font);
  font-size: 0.95rem;
  color: var(--ab-text);
  transition: var(--ab-transition);
}

.ab-form-group input[type="text"]:focus,
.ab-form-group textarea:focus,
.ab-form-group select:focus {
  border-color: var(--ab-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- TagsInput widget: isolate from Bootstrap/our rules --- */
/* Outer container mimics our input style */
.ab-form-group .tagsinput {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius-sm);
  background: #fff;
  cursor: text;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.ab-form-group .tagsinput:focus-within {
  border-color: var(--ab-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Inner fake input — reset all overrides */
.ab-form-group .tagsinput input[type="text"],
.ab-form-group .tagsinput input.tagsinput_wide {
  width: auto !important;
  min-width: 80px !important;
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 2px 4px !important;
  cursor: text !important;
  pointer-events: auto !important;
  outline: none !important;
  font-size: 0.9rem;
  color: var(--ab-text);
}

/* Individual tag pills */
.ab-form-group .tagsinput .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--ab-accent-light);
  color: var(--ab-accent);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: default;
}

.ab-form-group .tagsinput .tag a {
  color: var(--ab-accent);
  text-decoration: none;
  font-weight: 700;
  margin-left: 2px;
}

/* --- SEO Collapse Section --- */
.ab-seo-collapse {
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius-sm);
  padding: 16px;
  background: var(--ab-bg);
  margin-bottom: 20px;
}

.ab-seo-toggle {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ab-accent);
  user-select: none;
}

.ab-seo-toggle i {
  margin-right: 6px;
  transition: transform 0.2s ease;
}

.ab-seo-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

/* --- SEO Helper Note Box --- */
.ab-seo-note {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--ab-accent);
  border-radius: var(--ab-radius-sm);
  padding: 20px 24px;
}

.ab-seo-note-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ab-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ab-seo-note-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ab-seo-note-list li {
  font-size: 0.85rem;
  color: #334155;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.ab-seo-note-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--ab-accent);
  font-weight: 700;
}

.ab-seo-note-tip {
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #bfdbfe;
}

/* --- Cover Image Upload Preview --- */
.ab-cover-upload {
  position: relative;
  width: 100%;
  min-height: 180px;
  border: 2px dashed var(--ab-border);
  border-radius: var(--ab-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ab-transition);
  background: var(--ab-bg);
  overflow: hidden;
  margin-bottom: 20px;
}

.ab-cover-upload:hover {
  border-color: var(--ab-accent);
  background: var(--ab-accent-light);
}

.ab-cover-upload-placeholder {
  text-align: center;
  color: var(--ab-text-muted);
  font-size: 0.9rem;
}

.ab-cover-upload-placeholder i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  color: var(--ab-accent);
}

.ab-cover-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===================================================================
   USER BLOG / AUTHOR PAGE
   =================================================================== */
.ab-author-header {
  text-align: center;
  padding: 50px 20px 30px;
  background: var(--ab-white);
  border-bottom: 1px solid var(--ab-border);
}

.ab-author-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--ab-accent-light);
}

.ab-author-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.ab-author-header .ab-author-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--ab-text-muted);
}

.ab-author-header .ab-author-stats strong {
  display: block;
  font-size: 1.2rem;
  color: var(--ab-text);
}

/* ===================================================================
   TOOLBAR & ACTION BUTTONS (Post View)
   =================================================================== */
.ab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.ab-toolbar a,
.ab-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-family: var(--ab-font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ab-text-muted);
  background: var(--ab-bg);
  border: 1px solid var(--ab-border);
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--ab-transition);
}

.ab-toolbar a:hover,
.ab-toolbar button:hover {
  background: var(--ab-accent);
  color: var(--ab-white);
  border-color: var(--ab-accent);
}

/* ===================================================================
   PAGINATION
   =================================================================== */
.ab-pagination .page-link {
  font-family: var(--ab-font);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ab-text);
  border-color: var(--ab-border);
  border-radius: var(--ab-radius-sm) !important;
  margin: 0 2px;
}

.ab-pagination .page-link:hover {
  background: var(--ab-accent-light);
  color: var(--ab-accent);
}

.ab-pagination .page-item.active .page-link {
  background: var(--ab-accent);
  border-color: var(--ab-accent);
  color: var(--ab-white);
}

/* ===================================================================
   ADD NEW POST BUTTON
   =================================================================== */
.ab-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--ab-accent);
  color: var(--ab-white);
  font-family: var(--ab-font);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--ab-transition);
  box-shadow: var(--ab-shadow-sm);
}

.ab-btn-primary:hover {
  background: var(--ab-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--ab-shadow-md);
  color: var(--ab-white);
}

/* ===================================================================
   EMPTY STATE
   =================================================================== */
.ab-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ab-text-muted);
}

.ab-empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.ab-empty-state p {
  font-size: 1rem;
  margin: 0;
}

/* ===================================================================
   UTILITY CLASSES (UI Components)
   =================================================================== */
.ab-utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ab-border);
}

.ab-view-switcher .ow_content_menu {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.ab-view-switcher ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ab-view-switcher li a {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ab-text-muted);
  background: var(--ab-bg);
  border: 1px solid var(--ab-border);
  transition: var(--ab-transition);
  text-decoration: none;
  text-transform: none;
}

.ab-view-switcher li a:hover {
  background: var(--ab-accent-light);
  color: var(--ab-accent);
  border-color: var(--ab-accent);
}

.ab-view-switcher li.active a {
  background: var(--ab-accent) !important;
  color: #fff !important;
  border-color: var(--ab-accent) !important;
  box-shadow: var(--ab-shadow-sm);
}

.ab-view-switcher .ow_content_menu_item_plus {
  display: none !important;
}

.ab-page-title {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  color: var(--ab-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ab-utility-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ab-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.ab-section {
  padding: 40px 0;
}

.ab-divider {
  height: 1px;
  background: var(--ab-border);
  margin: 30px 0;
}

/* ===================================================================
   PRODUCTION REFINEMENTS (Phase 2)
   Scoping to Blog Plugin Pages via Oxwall body classes
   =================================================================== */

/* --- Full Page View: Hide sidebar & adjust margins --- */
.magic.advancedblogs_ctrl_view .ow_sidebar,
.magic.advancedblogs_ctrl_save .ow_sidebar,
.magic.advancedblogs_ctrl_user_blog .ow_sidebar {
  display: none !important;
}

/* Large screen desktop offset */
@media (min-width: 992px) {

  .magic.advancedblogs_ctrl_blog_home .ow_page,
  .magic.advancedblogs_ctrl_blog .ow_page,
  .magic.advancedblogs_ctrl_view .ow_page,
  .magic.advancedblogs_ctrl_save .ow_page,
  .magic.advancedblogs_ctrl_user_blog .ow_page {
    margin: 0 20px 0px 124px !important;
    width: auto !important;
  }
}

/* --- Hide default page heading (H1) on blog pages --- */
.magic.advancedblogs_ctrl_blog_home h1.ow_stdmargin,
.magic.advancedblogs_ctrl_blog h1.ow_stdmargin,
.magic.advancedblogs_ctrl_view h1.ow_stdmargin,
.magic.advancedblogs_ctrl_user_blog h1.ow_stdmargin {
  display: none !important;
}

/* --- Improved Contrast for Buttons & Badges --- */
.ab-btn-primary,
.ab-btn-primary:hover,
.ab-btn-primary:active,
.ab-btn-primary:focus {
  color: #fff !important;
  text-decoration: none !important;
}

.ab-badge,
.ab-badge:hover,
.ab-badge:active,
.ab-badge:focus {
  text-decoration: none !important;
}

.ab-hero-overlay .ab-badge {
  color: #fff !important;
}

.ab-card-body .ab-badge {
  color: var(--ab-accent) !important;
}

.ab-card-body .ab-badge:hover {
  background: var(--ab-accent) !important;
  color: #fff !important;
}

/* Fix for sidebar pill active state link color */
.ab-category-pill.active,
.ab-category-pill:hover {
  color: #fff !important;
}

/* --- Dashboard Widget Slider Styles --- */
.ab-widget-slider-row {
  margin-bottom: 30px;
}

.ab-widget-slider-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ab-accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ab-widget-scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.ab-widget-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.ab-widget-scroll-container::-webkit-scrollbar-track {
  background: var(--ab-bg);
}

.ab-widget-scroll-container::-webkit-scrollbar-thumb {
  background: var(--ab-text-light);
  border-radius: 10px;
}

.ab-widget-card {
  min-width: 240px;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ab-border);
  transition: var(--ab-transition);
}

.ab-widget-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ab-shadow-md);
}

.ab-widget-card-img {
  height: 120px;
  width: 100%;
  object-fit: cover;
}

.ab-widget-card-body {
  padding: 12px;
}

.ab-widget-card-body h3 {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 8px;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ab-widget-card-meta {
  font-size: 0.7rem;
  color: var(--ab-text-muted);
  display: flex;
  justify-content: space-between;
}

/* ===================================================================
   AUTHOR PAGE / USER BLOGS
   =================================================================== */
.ab-author-header {
  background: var(--ab-white);
  border-radius: var(--ab-radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--ab-shadow-sm);
  margin-bottom: 30px;
  border: 1px solid var(--ab-border);
}

.ab-author-header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--ab-white);
  box-shadow: var(--ab-shadow-md);
}

.ab-author-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--ab-text);
}

.ab-author-header h1 a {
  color: var(--ab-text);
  text-decoration: none;
}

.ab-author-header h1 a:hover {
  color: var(--ab-accent);
}

.ab-author-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  color: var(--ab-text-muted);
}

.ab-author-stats strong {
  color: var(--ab-text);
  font-size: 1.2rem;
}

.ab-sidebar-widget {
  background: var(--ab-white);
  border-radius: var(--ab-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--ab-shadow-sm);
  border: 1px solid var(--ab-border);
}

.ab-sidebar-widget h4 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ab-accent);
}

.ab-sidebar-sticky {
  position: sticky;
  top: 20px;
  z-index: 10;
}

/* --- Search Widget & Legacy Widget Support --- */
.ab-sidebar-widget input[type="text"],
.ab-sidebar-widget .ow_tag_search input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--ab-radius-sm);
  border: 1px solid var(--ab-border);
  font-family: var(--ab-font);
  font-size: 0.9rem;
  transition: var(--ab-transition);
  background: var(--ab-bg);
}

.ab-sidebar-widget input[type="text"]:focus,
.ab-sidebar-widget .ow_tag_search input[type="text"]:focus {
  border-color: var(--ab-accent);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ab-sidebar-widget .ow_tag_search {
  margin-top: 10px;
}

/* --- Badge Warning Style --- */
.ab-article-hero-content .ab-badge {
  background: #ffc107 !important;
  color: #000 !important;
  font-weight: 800;
}

/* --- Breadcrumb Visibility on Hero --- */
.ab-article-hero-content .breadcrumb {
  background: rgba(0, 0, 0, 0.4) !important;
  padding: 8px 16px !important;
  border-radius: 50px !important;
  display: inline-flex !important;
  backdrop-filter: blur(4px);
}

.ab-article-hero-content .breadcrumb-item a {
  color: #fff !important;
  opacity: 0.9;
  text-decoration: none;
}

.ab-article-hero-content .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.6) !important;
}
/* --- Phase 7: Footer Recovery & Vertical Rhythm --- */
.blogs_details .ow_footer,
.blogs_details .ow_footer_padding {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.blogs_details .ow_page_padding {
    padding-bottom: 120px !important;
}

/* Clear floats to ensure footer isn't pulled into floated content */
.magic.advancedblogs_ctrl_view .ow_canvas::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Compatibility Polish (Lints) --- */
.ab-hero-reveal-content p {
    line-clamp: 4;
}

.ab-card-body h3 {
    line-clamp: 2;
}

/* ===================================================================
   PHASE 9: MODERN AUTHOR HERO
   =================================================================== */
.ab-author-hero {
    position: relative;
    width: 100%;
    min-height: 280px;
    background: #fff;
    border-radius: var(--ab-radius);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--ab-border);
    box-shadow: var(--ab-shadow-sm);
}

.ab-author-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(135deg, var(--ab-accent), #7c3aed);
    opacity: 0.1;
}

.ab-author-hero-content {
    position: relative;
    padding: 60px 40px 40px;
    z-index: 2;
}

.ab-author-profile {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.ab-author-avatar-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: var(--ab-shadow-md);
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    display: block;
}

.ab-author-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-author-info {
    padding-bottom: 10px;
}

.ab-author-info h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.ab-author-meta-pills {
    display: flex;
    gap: 12px;
}

.ab-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--ab-bg);
    border: 1px solid var(--ab-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--ab-text-muted);
}

.ab-meta-pill i {
    color: var(--ab-accent);
}

@media (max-width: 768px) {
    .ab-author-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ab-author-avatar-wrap {
        width: 100px;
        height: 100px;
        margin-top: -30px;
    }
    
    .ab-author-info h1 {
        font-size: 1.75rem;
    }
    
    .ab-author-meta-pills {
        justify-content: center;
    }
}

/* --- Smaller page title variant (user_blog utility bar) --- */
.ab-page-title--sm {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
}

/* ===================================================================
   MOBILE: Content Menu Inline Alignment
   =================================================================== */
@media (max-width: 767px) {
  /* Utility bar stacks vertically on mobile */
  .ab-utility-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ab-utility-left .d-flex {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  /* Content menu pills remain horizontal & wrap */
  .ab-view-switcher ul {
    flex-wrap: wrap;
    gap: 6px;
  }

  .ab-view-switcher li a {
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  /* Global top content-menu bar scrolls horizontally */
  .ab-content-menu {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ab-content-menu ul {
    flex-wrap: nowrap !important;
    overflow-x: auto;
  }

  .ab-content-menu .nav-link {
    padding: 12px 16px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}
}
