@charset "UTF-8";

/* 1. IMPORT BRAND FONT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* 2. BRAND VARIABLES */
:root {
  --nb-red: #e81c35;
  --nb-text: #333333;
  --nb-bg-gray: #fcfcfc;
  --font-main: 'Poppins', sans-serif;
}

/* 3. BASE RESET */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-main) !important;
  color: var(--nb-text);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--nb-red) !important;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-main) !important;
  margin-top: 0;
}

/* 4. GLOBAL HEADER STYLING */
header.header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 80px !important;
  padding: 0 40px !important;
  max-width: 100% !important;
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.logo a { display: flex !important; align-items: center !important; }
.logo img { max-height: 32px !important; margin-right: 12px !important; }

.nb-logo-text {
  font-family: var(--font-main) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--nb-red) !important;
  white-space: nowrap !important;
}

.nav-wrapper-desktop {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  margin-left: auto !important;
}

.nb-btn-red {
  background-color: var(--nb-red) !important;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(232, 28, 53, 0.2) !important;
}

.nb-btn-red:hover { background-color: #c4172b !important; }

/* 5. HERO & SEARCH SECTION */
.nb-hero-container {
  background-color: var(--nb-bg-gray);
  padding: 100px 20px !important;
  text-align: center;
  border-bottom: 1px solid #ebebeb;
}

.nb-hero-inner h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px !important;
  letter-spacing: -1px !important;
}

.nb-hero-inner p { font-size: 18px; color: #666; margin-bottom: 30px; }

.nb-search-box { max-width: 650px; margin: 0 auto; }

.nb-search-box input[type="search"] {
  width: 100% !important;
  height: 56px !important;
  border-radius: 50px !important;
  border: 2px solid #e2e2e2 !important;
  padding: 0 30px !important;
  font-size: 16px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
  outline: none !important;
}

.nb-search-box input[type="search"]:focus { border-color: var(--nb-red) !important; }

/* 6. CATEGORY GRID & CARDS */
.container {
  max-width: 1200px !important; 
  margin: 60px auto 0 !important;
  padding: 0 20px;
}

.nb-categories-grid h2 { text-align: center; margin-bottom: 40px !important; font-size: 28px; font-weight: 700; }

.nb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }

.nb-card {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s ease;
}

.nb-card:hover {
  border-color: var(--nb-red);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.nb-icon-wrapper {
  background-color: #fff1f2 !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 20px !important;
}

.nb-icon { color: var(--nb-red) !important; width: 24px !important; height: 24px !important; }
.nb-card:hover .nb-icon-wrapper { background-color: var(--nb-red) !important; }
.nb-card:hover .nb-icon { color: #ffffff !important; }

/* ==========================================================================
   6.5 CATEGORY PAGE SECTIONS (2-COLUMN)
   ========================================================================== */

.section-tree { 
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 40px; 
    align-items: start; 
}

.section-tree .section {
    margin-top: 0;
}

.section-tree .section-tree-title {
    margin-top: 0; 
    margin-bottom: 15px;
}

/* FIX: Forces standard article list bullet points to be black instead of red */
.section-tree .article-list li a,
.article-list li a {
    color: #000000 !important;
}

.section-tree .article-list li a:hover,
.article-list li a:hover {
    color: var(--nb-red) !important;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .section-tree {
        grid-template-columns: 1fr;
    }
}

/* 7. WHAT'S THE SCOOP (PROMOTED ARTICLES) */
.articles { margin-top: 100px !important; padding-top: 40px; border-top: 1px solid #f0f0f0; }
.articles h2 { margin-bottom: 30px !important; font-weight: 700; font-size: 24px; }

.promoted-articles {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
}

.promoted-articles-item {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.promoted-articles-item:hover { border-color: var(--nb-red); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); }

.promoted-articles-item a {
  display: block !important;
  padding: 20px !important;
  font-weight: 500 !important;
  color: #333 !important;
}

/* 8. INTERNAL PAGE STYLING (COMPACT) */
.sub-nav {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 20px 0 !important;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 30px;
}

.breadcrumbs {
  display: flex !important;
  flex-wrap: wrap;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: center;
}

.breadcrumbs li { display: flex; align-items: center; font-size: 14px !important; color: #666 !important; }

.breadcrumbs li:not(:last-child)::after {
  content: ">" !important;
  margin: 0 10px !important;
  color: #999 !important;
  font-size: 12px;
}

.breadcrumbs li:last-child, .breadcrumbs li:last-child a { color: var(--nb-red) !important; font-weight: 600 !important; }

.sub-nav-search { flex: 0 0 320px; }

.sub-nav-search input[type="search"] {
  width: 100% !important;
  height: 40px !important;
  border-radius: 20px !important;
  border: 1px solid #e2e2e2 !important;
  padding: 0 20px 0 40px !important;
  font-size: 14px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15px center;
  background-color: #fff !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
  outline: none !important;
}

.sub-nav-search input[type="search"]:focus { border-color: var(--nb-red) !important; box-shadow: 0 4px 10px rgba(232, 28, 53, 0.1) !important; }

/* ==========================================================================
   8.5 ARTICLE BODY, IMAGE & TABLE FIXES
   ========================================================================== */

.article-body {
  font-family: var(--font-main);
  line-height: 1.8;
  color: #444;
  font-size: 15px; 
  max-width: 900px; 
  margin: 0 auto;
}

/* Align article title with the 900px article body */
.article-header,
.article-title {
  max-width: 900px !important;
  margin: 0 auto 20px auto !important; 
  text-align: left !important; 
}

/* Fixes zoomed-in/pixelated images */
.article-body img {
  display: inline-block !important; 
  max-width: 100% !important;     
  height: auto !important;     
  margin: 10px !important; /* Adds a little space between side-by-side images */
  border-radius: 8px;          
}

.article-body h2, .article-body h3 {
  margin-top: 50px !important; 
  margin-bottom: 20px !important;
  color: #333;
}

/* 2. Advanced Table Styling - Optimized for Parameter Lists */
.article-body table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 40px 0;
  font-size: 14px;
  table-layout: auto;
  overflow-x: auto;
  display: block; /* Enables horizontal scroll on tiny screens */
}

.article-body th {
  background-color: #fcfcfc;
  border: 1px solid #eee;
  padding: 15px;
  text-align: left;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

.article-body td {
  border: 1px solid #eee;
  padding: 15px;
  vertical-align: top;
  line-height: 1.6;
}

/* Zebra striping for readability */
.article-body tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Highlighting the Macro/Parameter column */
.article-body td:first-child {
  font-weight: 600;
  color: var(--nb-red);
  background-color: #fff9f9; 
  min-width: 160px;
}

/* Style code snippets */
.article-body code {
  background-color: #f1f1f1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--nb-red);
}

/* 9. ARTICLE VOTING SECTION */
.article-footer { margin-top: 60px; padding-top: 40px; border-top: 1px solid #f0f0f0; text-align: center; }
.article-votes-question { font-size: 18px !important; font-weight: 600 !important; color: #333; margin-bottom: 20px !important; }
.article-votes-controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }

.article-vote {
  background: #ffffff !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 30px !important;
  color: #666 !important;
  padding: 10px 30px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  min-width: 100px;
}

.article-vote:hover { border-color: var(--nb-red) !important; color: var(--nb-red) !important; background-color: #fff1f2 !important; }
.article-vote.vote-voted { background-color: var(--nb-red) !important; color: #ffffff !important; border-color: var(--nb-red) !important; }

.article-return-to-top { margin-top: 40px; }
.article-return-to-top a { font-size: 14px; font-weight: 600; color: var(--nb-red) !important; display: inline-flex; align-items: center; gap: 5px; }

/* 10. CONSOLIDATED BRANDED FOOTER */
.nb-footer {
  background-color: #ffffff;
  border-top: 1px solid #f0f0f0;
  padding: 30px 0;
  margin-top: 80px;
}

.nb-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between; 
  align-items: center;
}

.nb-footer-logo img {
  max-height: 24px;
  width: auto;
  display: block;
}

.nb-footer-link {
  color: #666 !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.2s;
}

.nb-footer-link:hover { color: var(--nb-red) !important; }

/* 11. GLOBAL UTILITY & HIDDEN ELEMENTS */
.visibility-hidden, 
.skip-navigation, 
.submit-a-request, 
.sign-in, 
header.header > h1, 
header.header > span:not(.logo), 
.logo a span:not(.nb-logo-text), 
input[type="search"]::-webkit-search-cancel-button {
  display: none !important;
  visibility: hidden !important;
  height: 0; width: 0; overflow: hidden;
}

/* Remove duplicate 'Related articles' title */
.related-articles-section h3, 
.article-rel-title {
  display: none !important;
}

.empty-icon { width: 64px; height: 64px; color: #eee; margin-bottom: 20px; }
.search-results-empty .sub-text { color: #999; margin-bottom: 30px; }
.meta-divider { margin: 0 8px; color: #ccc; }

/* MARKETING PARTNER GRID SYSTEM */
.nb-partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.nb-partner-card {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 0 !important;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nb-partner-logo {
  height: 120px;
  background: #fcfcfc;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.nb-partner-logo img {
  max-width: 80%;
  max-height: 60px;
  object-fit: contain;
}

.nb-partner-content { padding: 20px; }
.nb-partner-content h3 { font-size: 18px; font-weight: 600; color: #333; margin: 0; }
.nb-partner-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.nb-partner-card:hover h3 { color: var(--nb-red); }

/* ==========================================================================
   12. RELATED ARTICLES - IMPROVED GRID
   ========================================================================== */
.related-articles-section {
  margin-top: 80px; 
  padding-top: 40px;
  border-top: 1px solid #f0f0f0;
}

.related-articles-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 25px !important;
  color: #333;
}

.custom-related-wrapper ul {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important; 
  gap: 30px !important; 
  padding: 0 !important;
  list-style: none !important;
  margin: 0 auto !important;
}

.custom-related-wrapper li { margin: 0 !important; }

.custom-related-wrapper li a {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #eeeeee !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  text-decoration: none !important;
  height: 100% !important;
  min-height: auto !important; 
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-related-wrapper li a:hover {
  border-color: var(--nb-red) !important;
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card-thumb-image {
  width: 100%;
  height: 180px; 
  background-color: #fcfcfc;
  background-size: contain !important; 
  background-repeat: no-repeat !important;
  background-position: center !important;
  border-bottom: 1px solid #f0f0f0;
  padding: 25px; 
  box-sizing: border-box;
}

.article-card-text {
  padding: 18px !important;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-article-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--nb-red);
  text-transform: uppercase;
  margin-top: auto;
  letter-spacing: 0.5px;
}

.new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--nb-red);
  color: white;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Container for the scrollable row */
.nb-scroll-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 0 20px 0;
  -webkit-overflow-scrolling: touch; /* Smooth scroll on mobile */
  scrollbar-width: thin;
}

/* Ensure cards don't shrink and stay at a consistent size */
.nb-scroll-container .nb-partner-card {
  flex: 0 0 280px; /* Adjust 280px if you want them wider or narrower */
  min-width: 280px;
}

/* Optional: Style the scrollbar for a cleaner look */
.nb-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.nb-scroll-container::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 10px;
}
.nb-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

/* --- Carousel Layout --- */
.carousel-container {
  margin: 20px 0 40px;
  position: relative;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

/* Force 2 rows and horizontal flow */
.nb-scroll-container.two-rows {
  display: grid !important;
  grid-template-rows: repeat(2, 200px); /* Height of each row */
  grid-auto-flow: column; 
  grid-auto-columns: calc(33.33% - 14px); /* Show 3 columns at a time */
  gap: 20px;
  overflow-x: hidden; /* Hide scrollbar, handled by JS */
  scroll-behavior: smooth;
  width: 100%;
  padding: 10px 0;
}

/* --- Navigation Arrows --- */
.carousel-arrow {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.carousel-arrow.prev { left: -22px; }
.carousel-arrow.next { right: -22px; }

/* --- Pagination Dots --- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}

.dot {
  width: 12px;
  height: 12px;
  background: #e0e0e0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: #ff4500; /* NewsBreak Brand Orange */
  width: 24px; /* Makes active dot a pill shape */
  border-radius: 6px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .nb-scroll-container.two-rows {
    grid-auto-columns: calc(50% - 10px); /* Show 2 columns on tablet */
    overflow-x: auto; /* Allow thumb scrolling on mobile */
  }
  .carousel-arrow { display: none; } /* Hide arrows on touch devices */
}

.filter-item.is-active {
  background-color: #E8E8E8; /* Light gray background */
  color: #333;
  font-weight: bold;
  border-radius: 2px;
}

.search-result-link {
  color: #e60012 !important; /* Forces the red title */
  font-size: 18px;
  text-decoration: none;
}

/* --- NEWSBREAK GLOBAL OVERRIDES --- */

/* 1. Kill the bullet points and default padding */
.nb-search-wrapper ul, 
.nb-search-wrapper li {
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 1.5 Add spacing between search result items */
.nb-search-wrapper .search-result-item {
  margin-bottom: 40px !important;
}

/* 2. Create the 2-Column Layout */
.nb-search-wrapper .search-results-container {
  display: flex !important;
  flex-direction: row;
  gap: 60px;
  margin-top: 40px;
  align-items: flex-start;
}

.nb-search-wrapper .search-results-sidebar {
  flex: 0 0 240px;
}

.nb-search-wrapper .search-results-main {
  flex: 1;
}

/* 3. Sidebar Selection Box (The Gray Box) */
.nb-search-wrapper .filter-item {
  display: block;
  padding: 12px 16px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
}

.nb-search-wrapper .filter-item.is-active {
  background-color: #f0f0f0 !important; /* This matches the Goal image */
  color: #333 !important;
  font-weight: 700;
}

/* 4. Result Title Styling */
.nb-search-wrapper .search-results-count {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.nb-search-wrapper .search-result-link {
  color: #e60012 !important;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
}

/* 5. Meta Row (Breadcrumbs on Left, Date on Right) */
.nb-search-wrapper .search-result-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.nb-search-wrapper .nb-breadcrumbs {
  display: flex !important;
  flex-direction: row !important;
  gap: 6px;
  font-size: 12px;
  color: #8c8c8c;
  padding: 0 !important; /* Added to fix indentation */
  margin: 0 !important;  /* Added to fix indentation */
}

/* Hides the "NewsBreak Ads Help Center" (Home) link from search breadcrumbs */
.nb-search-wrapper .nb-breadcrumbs li:first-child {
  display: none !important;
}

.nb-search-wrapper .nb-breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-left: 6px;
}

.nb-search-wrapper .search-result-data {
  font-size: 12px;
  color: #8c8c8c;
  display: flex;
  gap: 15px;
}

/* 6. Excerpt Text */
.nb-search-wrapper .search-result-description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin-top: 5px;
}

.nb-search-wrapper .search-result-description em {
  font-weight: bold;
  font-style: normal;
  color: #000;
}

.search-result-description {
  display: block !important; /* Forces it to show */
  visibility: visible !important;
  color: #444 !important; /* Dark gray text */
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 800px; /* Prevents text from stretching too far */
}

/* Bolds the search keywords found in the text */
.search-result-description em {
  font-weight: bold;
  font-style: normal;
  color: #000;
}

/* --- FULL PAGINATION (NEXT/PREV BUTTONS) --- */
.nb-search-wrapper .pagination {
  display: flex !important;
  justify-content: center !important; 
  padding: 40px 0 !important;
  margin-top: 30px;
  border-top: 1px solid #eee;
  width: 100%;
}

.nb-search-wrapper .pagination ul {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 15px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.nb-search-wrapper .pagination li {
  display: inline-block !important;
  margin: 0 !important; 
}

/* Styles Next/Last as red outlined buttons */
.nb-search-wrapper .pagination a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #ffffff !important;
  border: 1px solid var(--nb-red) !important;
  border-radius: 6px !important;
  color: var(--nb-red) !important; 
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 24px !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Hover effect fills the button with red */
.nb-search-wrapper .pagination a:hover {
  background: var(--nb-red) !important;
  color: #ffffff !important;
}

/* Disabled state (when you can't click Previous or Next) */
.nb-search-wrapper .pagination span {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e2e2 !important;
  border-radius: 6px !important;
  color: #999 !important;
  background: #f9f9f9 !important;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 24px !important;
  pointer-events: none;
}

/* --- Custom Square Related Articles --- */
.related-articles-section {
  margin-top: 40px;
  border-top: 1px solid #e8e8e8;
  padding-top: 30px;
}

/* Force Zendesk's default UL into a grid */
.dynamic-preview-grid ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Increased min-width for text readability */
  gap: 20px;
  list-style: none;
  padding: 0;
}

/* Force each list item to be a square card */
.dynamic-preview-grid ul li {
  margin: 0 !important;
}

.dynamic-preview-grid ul li a {
  display: flex;
  flex-direction: column; /* Stacks title and preview vertically */
  align-items: flex-start; /* Aligns content to the top left */
  justify-content: space-between; /* Positions preview text at bottom */
  aspect-ratio: 1 / 1;
  padding: 24px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-weight: 700;
  color: #ff4d4d; /* Use the brand red color */
  background: #fff;
  text-decoration: none !important;
  transition: all 0.3s ease;
  line-height: 1.4;
  position: relative;
}

/* The Title within the card */
.dynamic-preview-grid ul li a::first-line {
  font-size: 16px;
  display: block;
  margin-bottom: 12px;
}

.dynamic-preview-grid ul li a:hover {
  border-color: #ff4d4d;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

/* Styling for the dynamically inserted snippet text */
.card-preview-snippet {
  font-size: 14px;
  color: #6c757d;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  margin-top: 12px; /* Adds space below the title */
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Shows up to 4 lines of preview */
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: absolute; /* Positions snippet at bottom of card */
  bottom: 24px;
  left: 24px;
  right: 24px;
}

/* Success Stories Horizontal Scroller */
.success-card-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  padding: 10px 5px 30px 5px;
  list-style: none;
  margin: 30px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  
  /* Modern scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* Custom scrollbar for Chrome/Safari/Edge */
.success-card-grid::-webkit-scrollbar {
  height: 8px;
}
.success-card-grid::-webkit-scrollbar-track {
  background: transparent;
}
.success-card-grid::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 10px;
}

.success-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e1e4e8;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  
  flex: 0 0 340px; 
  scroll-snap-align: start;
}

.success-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: #f33f3f; /* NewsBreak Red hover accent */
}

.success-card-hero {
  height: 260px; /* Taller height to match Meta's portrait look */
  background-color: #f8f9fa;
  position: relative;
  background-size: cover;
  background-position: center;
}

.success-image-container {
  width: 100%;
  height: 100%;
  background-image: url('https://theme.zdassets.com/theme_assets/default_hero.jpg'); /* Default placeholder image */
  background-size: cover;
  background-position: center;
}

.success-read-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 5;
}

.success-card-body {
  padding: 24px 20px;
  flex-grow: 1;
}

.success-label {
  color: #f33f3f; /* NewsBreak Red */
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.success-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: #1f2937;
}

.success-card-link {
  text-decoration: none !important;
}

/* Custom Hero Images for Success Stories */
[data-article-id="44908150422413"] {
  background-image: url('https://res.cloudinary.com/dlnvxm2jc/image/upload/v1775663754/Screenshot_2026-04-08_at_11.55.34_AM_zb0d3t.png');
}

[data-article-id="44724534790157"] {
  background-image: url('https://res.cloudinary.com/dlnvxm2jc/image/upload/v1775663649/Screenshot_2026-04-08_at_11.54.00_AM_c9dye8.png');
}

[data-article-id="44934227913101"] {
  background-image: url('https://res.cloudinary.com/dlnvxm2jc/image/upload/v1775665402/Screenshot_2026-04-08_at_12.23.13_PM_lx7xjg.png');
}