/* =========================================================
   BLOG ARCHIVE (INDEX)
   ========================================================= */

body.blog {
  --color-bg: #d9d9d9;
  --color-surface: #dcdcdc;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-text: #111111;
  --color-muted: #666666;
  background-color: var(--color-bg);
  color: var(--color-text);
}

body.blog .site-logo img,
body.blog .back-to-top svg {
  filter: invert(1);
}

body.blog .hamburger span {
	background: #000000;
}

body.blog .nav-toggle[aria-expanded="true"] .hamburger span {
	background: #f0f0f0;
}


@media (min-width: 1100px) {
  body.blog .nav-menu a.current-menu-item::after {
    width: 100%;
  }

  body.blog .nav-menu {
    gap: 40px;
  }

  body.blog .nav-menu a {
    font-size: 0.875rem;
    font-weight: 500;
  }
}

.blog-archive {
  padding: 0 0 clamp(40px, 8vw, 120px);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(24px, 4vw, 40px);
}

.blog-grid .featured-card .card-title {
  font-weight: 400;
}

/* =========================================================
   BASE CARD STYLES
   ========================================================= */
.blog-card {
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.blog-card .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--color-text);
  text-decoration: none;
}

.blog-card .no-thumb {
  width: 100%;
  height: 100%;
  background-color: var(--color-border);
}

/* =========================================================
   FEATURED CARD (1st Post)
   ========================================================= */
.featured-card {
  grid-column: span 12;
  margin-bottom: clamp(15px, 5vw, 120px);
}

.featured-card .card-link {
  flex-direction: row;
  align-items: flex-end;
  gap: clamp(30px, 5vw, 60px);
}

.featured-card .card-image {
  flex: 0 0 55%;
  max-width: 55%;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  position: relative;
  background-color: var(--color-surface);
}

.featured-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
  position: relative;
  z-index: 2;
}

.featured-card .card-image-bg-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(5rem, 18vw, 15rem); /* Reduced min size */
  font-weight: 700;
  line-height: 1;
  color: #000;
  z-index: 1;
  pointer-events: none;
  letter-spacing: -0.05em;
  opacity: 0.15; /* Subtle as in reference usually */
}

.featured-card .card-image-bg-text.left {
  left: 5%;
}

.featured-card .card-image-bg-text.right {
  right: 5%;
}

.featured-card:hover .card-image img {
  transform: scale(1.02);
}

.featured-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card .card-meta {
  font-size: 0.8125rem;
  color: #999;
  margin-bottom: 4px;
  font-weight: 400;
  text-transform: none;
}

.featured-card .card-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem); /* Responsive font size */
  line-height: 1.1;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.03em;
  color: #111;
  transition: color var(--transition-base);
}

.featured-card:hover .card-title {
  color: rgba(0, 0, 0, 0.6);
}

/* =========================================================
   SIMPLE CARDS (Rest of Posts)
   ========================================================= */
.simple-card {
  grid-column: span 12;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: transform var(--transition-base);
}

@media (min-width: 600px) {
  .simple-card {
    grid-column: span 6; /* 2 per row on tablets */
  }
}

@media (min-width: 1024px) {
  .simple-card {
    grid-column: span 4; /* 3 per row on desktop */
  }
}

.simple-card:hover {
  background: transparent;
  border-color: transparent;
  transform: translateY(-4px);
}

.simple-card .card-image {
  width: 100%;
  aspect-ratio: 16 / 10; /* Matching the featured card's aspect ratio roughly */
  overflow: hidden;
  background-color: var(--color-surface);
  border-radius: 20px;
  margin-bottom: 16px;
}

.simple-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

.simple-card:hover .card-image img {
  opacity: 0.8;
}

.simple-card .card-content {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.simple-card .card-title {
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 400;
  color: #888;
  margin: 0;
  transition: color var(--transition-base);
}

.simple-card:hover .card-title {
  color: #111;
}

.simple-card .card-meta {
  display: none; /* Hidden as per screenshot */
}

/* =========================================================
   RESPONSIVO - FEATURED CARD
   ========================================================= */
@media (max-width: 1024px) {
  .featured-card .card-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .featured-card .card-image {
    flex: none;
    max-width: 100%;
    width: 100%;
    border-radius: 12px;
  }

  .featured-card .card-content {
    padding-right: 0;
  }
}

/* =========================================================
   PAGINATION
   ========================================================= */
.blog-pagination {
  margin-top: 80px;
  display: flex;
  justify-content: center;
}

.blog-sentinel {
  height: 10px;
  margin-top: 20px;
}

.blog-loader {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.loader-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
