/**
 * Articles Grid Section Styles
 * Masonry layout: 1 large featured + 4 small in 2x2 grid
 * Features text overlays on images
 */

/* ========================================
 * ARTICLES GRID SECTION
 * ======================================== */

.articles-grid-section {
  padding: 80px 0;
  position: relative;
}

/* Section Header */
.articles-header {
  text-align: center;
  margin-bottom: 60px;
}

.articles-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4F46E5;
  margin-bottom: 16px;
}

.articles-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--foreground, #262626);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.articles-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted-foreground, #737373);
  max-width: 700px;
  margin: 0 auto;
}

/* Masonry Grid Layout */
.articles-masonry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Mobile: Stack all cards */
@media (max-width: 767px) {
  .articles-masonry-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet and Desktop: Masonry layout */
@media (min-width: 768px) {
  .articles-masonry-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
 * ARTICLE CARDS
 * ======================================== */

.article-card {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Featured Article - Large */
.article-featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 600px;
}

@media (max-width: 767px) {
  .article-featured {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 400px;
  }
}

/* Small Articles - 2x2 Grid */
.article-small {
  grid-column: span 1;
  grid-row: span 1;
  min-height: 288px;
}

@media (max-width: 767px) {
  .article-small {
    min-height: 300px;
  }
}

/* Article Link */
.article-link {
  display: block;
  text-decoration: none;
  height: 100%;
  width: 100%;
}

/* Article Image with Background */
.article-image {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
}

.article-featured .article-image {
  padding: 20px 24px;
}

@media (max-width: 767px) {
  .article-image {
    padding: 14px 16px;
  }
  
  .article-featured .article-image {
    padding: 16px 20px;
  }
}

/* Fallback for no image */
.article-no-image {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Gradient Overlay */
.article-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0.85) 100%
  );
  transition: background 0.3s ease;
}

.article-card:hover .article-overlay {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.6) 75%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

/* Content Overlay */
.article-content-overlay {
  position: relative;
  z-index: 2;
  color: white;
}

.article-category {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 0;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
}

.article-title-overlay {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.article-featured .article-title-overlay {
  font-size: clamp(18px, 2vw, 22px);
  margin-bottom: 8px;
}

.article-small .article-title-overlay {
  font-size: 14px;
}

@media (max-width: 767px) {
  .article-title-overlay {
    font-size: 14px;
  }
  
  .article-featured .article-title-overlay {
    font-size: 16px;
  }
}

.article-excerpt-overlay {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .article-excerpt-overlay {
    font-size: 11px;
  }
}

.article-read-more {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease;
}

.article-read-more::after {
  content: '→';
  margin-left: 8px;
  transition: margin-left 0.3s ease;
}

.article-card:hover .article-read-more::after {
  margin-left: 12px;
}

/* No Articles Message */
.no-articles {
  text-align: center;
  font-size: 18px;
  color: var(--muted-foreground, #737373);
  padding: 60px 20px;
}

/* ========================================
 * RESPONSIVE ADJUSTMENTS
 * ======================================== */

@media (max-width: 767px) {
  .articles-grid-section {
    padding: 60px 0;
  }
  
  .articles-header {
    margin-bottom: 40px;
  }
  
  .articles-label {
    font-size: 12px;
  }
  
  .articles-description {
    font-size: 16px;
  }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1024px) {
  .article-featured {
    min-height: 500px;
  }
  
  .article-small {
    min-height: 238px;
  }
}

