/* ============================================================
   RXSUPPLY BLOG STYLESHEET
   ============================================================ */

/* Blog Homepage Section & General Layouts */
.blog-section {
  padding: 80px 0;
  background-color: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
  }
}

/* Stunning Blog Cards */
.blog-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--s-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--s-lg);
  border-color: var(--blue-300);
}

.blog-card__img-link {
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background: #fff;
  border-bottom: 1px solid var(--slate-100);
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--t-slow) ease-in-out;
  padding: 8px;
}

.blog-card:hover .blog-card__img {
  transform: scale(1.06);
}

.blog-card__content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-700);
  background-color: var(--blue-50);
  margin-bottom: 14px;
  width: fit-content;
}

.blog-card__tag--warehouse {
  color: var(--emerald-700, #047857);
  background-color: rgba(16, 185, 129, 0.08);
}

.blog-card__tag--reps {
  color: var(--gold-600, #b45309);
  background-color: var(--gold-100);
}

.blog-card__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--slate-900);
  margin-bottom: 10px;
  transition: color var(--t-fast);
}

.blog-card__title a {
  text-decoration: none;
  color: inherit;
}

.blog-card__title a:hover {
  color: var(--primary);
}

.blog-card__desc {
  font-size: 13.5px;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 600;
}

.blog-card__date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card__date svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* Blog Directory Page (blog.html) styles */
.blog-hero {
  padding: 80px 0 60px;
  background: linear-gradient(160deg, #ffffff 0%, var(--slate-50) 100%);
  text-align: center;
  border-bottom: 1px solid var(--slate-200);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(37,99,235,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.blog-hero .h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  color: var(--slate-900);
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 16px;
  color: var(--slate-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Featured Post Block */
.featured-section {
  padding: 60px 0 30px;
  background-color: #fff;
}

.featured-post {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--s-md);
  transition: transform var(--t-normal), box-shadow var(--t-normal);
}

.featured-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--s-lg);
}

.featured-post__img-wrapper {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  height: 100%;
  background: #fff;
}

.featured-post__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--t-slow) ease;
  padding: 16px;
}

.featured-post:hover .featured-post__img {
  transform: scale(1.03);
}

.featured-post__content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  width: fit-content;
}

.featured-post__tag svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.featured-post__title {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--slate-900);
  margin-bottom: 16px;
}

.featured-post__title a {
  text-decoration: none;
  color: inherit;
  transition: color var(--t-fast);
}

.featured-post__title a:hover {
  color: var(--primary);
}

.featured-post__desc {
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.8;
  margin-bottom: 24px;
}

.featured-post__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--slate-500);
  font-weight: 600;
  border-top: 1px solid var(--slate-100);
  padding-top: 20px;
}

@media (max-width: 992px) {
  .featured-post {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .featured-post__content {
    padding: 32px;
  }
}

/* Category Filter Bar */
.blog-filter-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--slate-200);
  background-color: var(--slate-50);
  position: sticky;
  top: 80px;
  z-index: 10;
  box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .blog-filter-bar {
    top: 64px;
  }
}

.categories-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.categories-nav__btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-600);
  background-color: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--t-fast) ease;
}

.categories-nav__btn:hover {
  color: var(--primary);
  border-color: var(--blue-300);
  background-color: var(--blue-50);
}

.categories-nav__btn.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--s-sm);
}

/* Detailed Post Page Styles (blog-post.html) */
.post-header {
  padding: 60px 0 44px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--slate-150);
  text-align: right;
}

.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 24px;
}

.post-breadcrumbs a {
  transition: color var(--t-fast);
}

.post-breadcrumbs a:hover {
  color: var(--primary);
}

.post-breadcrumbs__separator {
  color: var(--slate-300);
}

.post-meta-details {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 20px;
}

.post-meta-details__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-meta-details__item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.post-title {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--slate-950);
  margin-bottom: 12px;
  max-width: 950px;
  margin-left: 0;
  margin-right: 0;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  letter-spacing: -0.5px;
}

.post-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
  margin: 20px 0 0;
  border-radius: 99px;
}

.post-featured-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--s-md);
  margin-bottom: 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Column Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 40px 0 80px;
}

@media (max-width: 992px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Article Styling (Typography & Content) */
.post-content {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--slate-850, #1e293b);
}

.post-content p {
  margin-bottom: 24px;
}

.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 48px;
  margin-bottom: 18px;
  position: relative;
  padding-right: 14px;
}

.post-content h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--primary);
  border-radius: 99px;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 36px;
  margin-bottom: 14px;
}

.post-content ul, .post-content ol {
  margin-right: 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-content ul {
  list-style-type: square;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  padding-right: 4px;
}

.post-content blockquote {
  background: var(--blue-50);
  border-right: 4px solid var(--blue-600);
  border-radius: 4px var(--r-md) var(--r-md) 4px;
  padding: 24px 28px;
  font-size: 17px;
  font-weight: 600;
  color: var(--blue-900);
  line-height: 1.75;
  margin: 32px 0;
}

.post-content strong {
  color: var(--slate-900);
  font-weight: 700;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
}

.post-content th, .post-content td {
  padding: 12px 18px;
  border: 1px solid var(--slate-200);
  text-align: right;
}

.post-content th {
  background-color: var(--slate-100);
  font-weight: 800;
  color: var(--slate-900);
}

.post-content tr:nth-child(even) td {
  background-color: var(--slate-50);
}

/* Sidebar Widgets */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-widget {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--s-sm);
  position: sticky;
  top: 112px;
}

.sidebar-widget__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--slate-150);
  padding-bottom: 12px;
}

/* Table of Contents in Sidebar */
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-link {
  font-size: 13.5px;
  color: var(--slate-600);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-fast);
  display: block;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary);
  transform: translateX(-4px);
}

/* Beautiful Custom CTA Sidebar Widget */
.cta-widget {
  background: linear-gradient(150deg, var(--slate-950) 0%, var(--slate-900) 100%);
  border: none;
  color: #fff;
  border-radius: var(--r-lg);
  padding: 32px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--s-md);
}

.cta-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(37,99,235,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta-widget__badge {
  display: inline-block;
  padding: 4px 10px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-300);
  margin-bottom: 16px;
}

.cta-widget__title {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 12px;
}

.cta-widget__desc {
  font-size: 12.5px;
  color: var(--slate-300);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cta-widget .btn {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
  border: none;
  border-radius: var(--r-md);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all var(--t-fast) ease;
  position: relative;
  overflow: hidden;
}

.cta-widget .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
}

.cta-widget .btn:active {
  transform: translateY(0);
}

/* Share Article Widget */
.share-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--slate-200);
  background-color: #fff;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--t-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
  color: #fff;
}

.share-btn--facebook:hover {
  background-color: #1877F2;
  border-color: #1877F2;
}

.share-btn--twitter:hover {
  background-color: #1DA1F2;
  border-color: #1DA1F2;
}

.share-btn--linkedin:hover {
  background-color: #0077B5;
  border-color: #0077B5;
}

.share-btn--whatsapp:hover {
  background-color: #25D366;
  border-color: #25D366;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Newsletter Subscription Section */
.newsletter-section {
  padding: 60px 0;
  background-color: var(--slate-950);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.newsletter-section__inner {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0 auto;
}

.newsletter-section__title {
  font-size: clamp(20px, 3vw, 28px);
  color: #fff;
  margin-bottom: 12px;
}

.newsletter-section__desc {
  font-size: 14px;
  color: var(--slate-300);
  margin-bottom: 28px;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form__input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all var(--t-fast);
  text-align: right;
}

.newsletter-form__input::placeholder {
  color: var(--slate-500);
}

.newsletter-form__input:focus {
  border-color: var(--blue-500);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.newsletter-form .btn {
  padding: 12px 24px;
  font-size: 14px;
}

@media (max-width: 576px) {
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }
}


/* Responsive enhancements for tables and blockquotes on mobile */
@media (max-width: 768px) {
  .post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .post-content blockquote {
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 15.5px;
  }
}
