/* Blog Index Specific Styles */
/* These styles are unique to the blog/index.html layout and card designs. */
/* Extracted from blog/index.html to keep the main file clean. */

/* Blog theme variables - responding to global theme */
:root {
  --blog-primary: #ffffff;
  --blog-card-bg: #fdfbf7;
  --blog-bg: #f5e6d3;
  --blog-text: #1e1b18;
  --blog-text-header: #1e1b18;
  --blog-accent: #fbbf24;
  --card-radius: 16px;
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --font-serif: 'Playfair Display', serif;
}

[data-theme="dark"] {
  --blog-primary: #2d2a26;
  --blog-card-bg: #1f1d1a;
  --blog-bg: #12100e;
  --blog-text: #d1d5db;
  --blog-text-header: #f3f4f6;
  --blog-accent: #fbbf24;
}

body {
    background-color: var(--blog-bg);
    color: var(--blog-text);
}

/* Blog Banner Overlay */
.blog-header {
  position: relative;
}

.blog-brand-tag {
  position: absolute;
  top: 1.5rem; /* Increased from 1rem for better spacing */
  left: 1rem;
  z-index: 20;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: white;
  opacity: 0.9;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@media (min-width: 480px) {
  .blog-brand-tag {
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.4em;
  }
}

@media (min-width: 768px) {
  .blog-brand-tag {
    top: 2rem;
    left: 3rem;
    font-size: 1.1rem;
  }
}

.blog-header-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  color: white;
  width: 95%;
  max-width: 850px;
  white-space: nowrap;
}

.blog-header-content h1 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.2rem 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  letter-spacing: -0.01em;
  color: white;
  line-height: 1.1;
}

@media (min-width: 480px) {
  .blog-header-content h1 {
    font-size: 1.5rem;
    margin: 0 0 0.3rem 0;
  }
}

@media (min-width: 768px) {
  .blog-header-content h1 {
    font-size: 2.4rem;
  }
}

.blog-header-content p {
  font-size: 0.65rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  font-weight: 500;
  line-height: 1.2;
}

@media (min-width: 480px) {
  .blog-header-content p {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

@media (min-width: 768px) {
  .blog-header-content p {
    font-size: 1rem;
  }
}

/* Grid Layout */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin: 4rem 0;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Standard Card (Design A - Modern Editorial) */
.card-a {
  background: var(--blog-card-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
}

.card-a:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  border-color: var(--blog-accent);
}

.card-a .img-container {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1e1b18;
}

.card-a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card-a:hover img {
  transform: scale(1.05);
}

.card-a .category-chip {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--blog-accent);
  color: #1e1b18;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

@media (min-width: 768px) {
  .card-a .category-chip {
    top: 20px;
    left: 20px;
    padding: 5px 12px;
    font-size: 0.7rem;
  }
}

.card-a .content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .card-a .content {
    padding: 2rem;
  }
}

.card-a h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
  color: var(--blog-text-header);
  line-height: 1.25;
  font-weight: 700; /* Ensure visual weight */
}

@media (min-width: 768px) {
  .card-a h3 {
    font-size: 1.6rem;
  }
}

.card-a p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  color: var(--blog-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .card-a p {
    font-size: 0.95rem;
  }
}

.card-a .footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

/* Featured Card (Design B - Glass-Tipped Tile) */
.featured-section {
    margin: 3rem 0;
}

.card-b {
  height: 450px;
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: white;
  position: relative;
  background: #1e1b18;
  transition: var(--transition);
  display: block;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .card-b {
    height: 550px;
  }
}

.card-b img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: var(--transition);
}

.card-b:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

.card-b .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
}

@media (min-width: 768px) {
  .card-b .overlay {
    padding: 4rem 3rem;
  }
}

.card-b h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
  .card-b h3 {
    font-size: 3rem;
    max-width: 850px;
    margin-bottom: 1.5rem;
  }
}

.card-b .top-meta {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  z-index: 3;
}

@media (min-width: 768px) {
  .card-b .top-meta {
    top: 2rem;
    left: 2rem;
    right: 2rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.card-b .category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blog-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.card-b .top-stats {
  display: flex;
  gap: 0.8rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(243, 244, 246, 0.9);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .card-b .top-stats {
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
  }
}

.card-b .description {
  font-size: 0.95rem;
  opacity: 0.95;
  transform: translateY(0);
  max-height: 100px; /* Visible by default on mobile */
  margin-top: 1rem;
  overflow: hidden;
  transition: var(--transition);
  color: rgba(243, 244, 246, 0.9);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .card-b .description {
    font-size: 1.1rem;
    max-width: 650px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(10px);
    max-height: 0;
    margin-top: 0;
  }
  .card-b:hover .description {
    opacity: 0.95;
    transform: translateY(0);
    max-height: 100px;
    margin-top: 1rem;
  }
}

/* Category Badge in Overlay */
.overlay-category {
    margin-bottom: 1rem;
}
.overlay-category span {
    background: rgba(251, 191, 36, 0.2); 
    color: #fbbf24; 
    border: 1px solid #fbbf24; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    backdrop-filter: blur(4px);
}

/* Utility */
.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 3rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--blog-text-header);
  margin: 0;
}

@media (min-width: 768px) {
   .section-header h2 { font-size: 2.5rem; }
}

.section-header .whisper {
  font-size: 0.95rem;
  color: #9ca3af; /* Lighter grey for visibility on dark bg */
  font-weight: 400;
  font-style: italic;
}

.stats-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon-text {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-icon-text svg {
    width: 14px;
    height: 14px;
}
