/**
 * Leather 1X — Blog Grid Widget + Blog Templates
 * Dark theme cards, filter tabs, load more, mobile carousel,
 * archive page, single post.
 */

/* ══════════════════════════════════════════════════════════════
   BLOG SECTION (widget + archive)
   ══════════════════════════════════════════════════════════════ */

.l1x-blog {
  padding: 60px 0;
}

.l1x-blog__container {
  width: min(100% - 32px, var(--container, 1360px));
  margin: 0 auto;
}

.l1x-blog__heading {
  font-family: 'Georgia', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

/* ── Category Filter Tabs ─────────────────────────────────── */

.l1x-blog__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.l1x-blog__tab {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid rgba(201, 169, 106, 0.20);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.l1x-blog__tab:hover {
  border-color: rgba(201, 169, 106, 0.40);
  color: rgba(255, 255, 255, 0.90);
}

.l1x-blog__tab.is-active {
  background: linear-gradient(135deg, rgba(138, 63, 24, 0.90), rgba(90, 38, 12, 0.90));
  border-color: rgba(201, 169, 106, 0.40);
  color: #fff;
}

/* ── Grid ─────────────────────────────────────────────────── */

.l1x-blog__grid {
  display: grid;
  grid-template-columns: repeat(var(--l1x-blog-cols, 3), 1fr);
  gap: 24px;
}

/* ── Card ─────────────────────────────────────────────────── */

.l1x-blog__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 169, 106, 0.10);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.l1x-blog__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.l1x-blog__card.is-hidden {
  display: none;
}

.l1x-blog__card.is-entering {
  animation: l1xBlogFadeIn 0.4s ease forwards;
}

@keyframes l1xBlogFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Thumbnail ────────────────────────────────────────────── */

.l1x-blog__thumb-link {
  display: block;
  overflow: hidden;
}

.l1x-blog__thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.l1x-blog__card:hover .l1x-blog__thumb {
  transform: scale(1.06);
}

/* ── Body ─────────────────────────────────────────────────── */

.l1x-blog__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.l1x-blog__cat {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 100px;
  background: rgba(201, 169, 106, 0.14);
  color: #c9a96a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.l1x-blog__title {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.94);
}

.l1x-blog__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.l1x-blog__title a:hover {
  color: #c9a96a;
}

.l1x-blog__excerpt {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 auto;
  padding-bottom: 14px;
}

.l1x-blog__date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
}

/* ── Load More ────────────────────────────────────────────── */

.l1x-blog__load-wrap {
  text-align: center;
  margin-top: 36px;
}

.l1x-blog__load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 100px;
  border: 1px solid rgba(201, 169, 106, 0.30);
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.l1x-blog__load-more:hover {
  background: rgba(201, 169, 106, 0.10);
  border-color: rgba(201, 169, 106, 0.50);
  color: #fff;
}

.l1x-blog__load-more.is-loading {
  pointer-events: none;
  opacity: 0.5;
}

.l1x-blog__load-more.is-done {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE CAROUSEL
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .l1x-blog--mobile-carousel .l1x-blog__grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding-bottom: 8px;
  }

  .l1x-blog--mobile-carousel .l1x-blog__grid::-webkit-scrollbar {
    display: none;
  }

  .l1x-blog--mobile-carousel .l1x-blog__card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }

  .l1x-blog__tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .l1x-blog__tabs::-webkit-scrollbar { display: none; }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .l1x-blog__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 767px) {
  .l1x-blog__grid:not(.l1x-blog--mobile-carousel .l1x-blog__grid) {
    grid-template-columns: 1fr !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   BLOG ARCHIVE PAGE
   ══════════════════════════════════════════════════════════════ */

.l1x-blog-archive {
  padding: 40px 0 80px;
}

.l1x-blog-archive__container {
  width: min(100% - 32px, var(--container, 1360px));
  margin: 0 auto;
}

.l1x-blog-archive__hero {
  text-align: center;
  padding: 48px 0 40px;
}

.l1x-blog-archive__title {
  font-family: 'Georgia', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 0 10px;
}

.l1x-blog-archive__desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.50);
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}

.l1x-blog-archive .l1x-blog__grid {
  --l1x-blog-cols: 3;
}

.l1x-blog-archive .l1x-blog__pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.l1x-blog-archive .l1x-blog__pagination a,
.l1x-blog-archive .l1x-blog__pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(201, 169, 106, 0.15);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.l1x-blog-archive .l1x-blog__pagination a:hover {
  background: rgba(201, 169, 106, 0.10);
  border-color: rgba(201, 169, 106, 0.40);
  color: #fff;
}

.l1x-blog-archive .l1x-blog__pagination .current {
  background: linear-gradient(135deg, rgba(138, 63, 24, 0.90), rgba(90, 38, 12, 0.90));
  border-color: rgba(201, 169, 106, 0.40);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   SINGLE BLOG POST
   ══════════════════════════════════════════════════════════════ */

.l1x-single-post {
  padding: 0 0 80px;
}

.l1x-single-post__container {
  width: min(100% - 32px, var(--container, 800px));
  margin: 0 auto;
}

/* ── Hero image ───────────────────────────────────────────── */

.l1x-single-post__hero {
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid rgba(201, 169, 106, 0.10);
}

.l1x-single-post__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Meta ─────────────────────────────────────────────────── */

.l1x-single-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.l1x-single-post__cat {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  background: rgba(201, 169, 106, 0.14);
  color: #c9a96a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.l1x-single-post__date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.40);
}

.l1x-single-post__read-time {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.40);
}

.l1x-single-post__read-time::before {
  content: '\2022';
  margin-right: 10px;
}

/* ── Title ────────────────────────────────────────────────── */

.l1x-single-post__title {
  font-family: 'Georgia', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

/* ── Content ──────────────────────────────────────────────── */

.l1x-single-post__content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
}

.l1x-single-post__content h2,
.l1x-single-post__content h3,
.l1x-single-post__content h4 {
  font-family: 'Georgia', serif;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.l1x-single-post__content h2 { font-size: 1.6rem; }
.l1x-single-post__content h3 { font-size: 1.3rem; }
.l1x-single-post__content h4 { font-size: 1.1rem; }

.l1x-single-post__content p {
  margin: 0 0 1.4em;
}

.l1x-single-post__content a {
  color: #c9a96a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.l1x-single-post__content a:hover {
  color: #e0c07a;
}

.l1x-single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5em 0;
}

.l1x-single-post__content blockquote {
  border-left: 3px solid #c9a96a;
  margin: 1.5em 0;
  padding: 16px 24px;
  background: rgba(201, 169, 106, 0.05);
  border-radius: 0 12px 12px 0;
  color: rgba(255, 255, 255, 0.80);
  font-style: italic;
}

.l1x-single-post__content ul,
.l1x-single-post__content ol {
  padding-left: 1.4em;
  margin: 0 0 1.4em;
}

.l1x-single-post__content li {
  margin-bottom: 0.4em;
}

.l1x-single-post__content pre {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 106, 0.10);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.9em;
  margin: 1.5em 0;
}

.l1x-single-post__content code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.l1x-single-post__content pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* ── Author Box ───────────────────────────────────────────── */

.l1x-single-post__author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  margin-top: 48px;
  border: 1px solid rgba(201, 169, 106, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.l1x-single-post__author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(201, 169, 106, 0.25);
}

.l1x-single-post__author-name {
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.90);
  margin: 0 0 4px;
}

.l1x-single-post__author-bio {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.5;
}

/* ── Tags ─────────────────────────────────────────────────── */

.l1x-single-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.l1x-single-post__tag {
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid rgba(201, 169, 106, 0.15);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.l1x-single-post__tag:hover {
  border-color: rgba(201, 169, 106, 0.40);
  color: #c9a96a;
}

/* ── Related Posts ────────────────────────────────────────── */

.l1x-single-post__related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid rgba(201, 169, 106, 0.10);
}

.l1x-single-post__related-title {
  font-family: 'Georgia', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.90);
  margin: 0 0 28px;
}

.l1x-single-post__related .l1x-blog__grid {
  --l1x-blog-cols: 3;
}

/* ── Navigation ───────────────────────────────────────────── */

.l1x-single-post__nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(201, 169, 106, 0.08);
}

.l1x-single-post__nav a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.l1x-single-post__nav a:hover {
  color: #c9a96a;
}

.l1x-single-post__nav-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.30);
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .l1x-single-post__hero {
    aspect-ratio: 16/9;
    border-radius: 12px;
    margin-bottom: 28px;
  }

  .l1x-single-post__related .l1x-blog__grid {
    --l1x-blog-cols: 1;
  }

  .l1x-single-post__nav {
    flex-direction: column;
  }

  .l1x-blog-archive .l1x-blog__grid {
    --l1x-blog-cols: 1;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .l1x-single-post__related .l1x-blog__grid {
    --l1x-blog-cols: 2;
  }

  .l1x-blog-archive .l1x-blog__grid {
    --l1x-blog-cols: 2;
  }
}
