/* ============================================================
   BLOG-LIST.CSS — Blog listing page: hero, featured card,
   post grid, load-more, footer
   Real Estate World Real Estate Blog
   ============================================================ */

/* ============================================================
   Blog Hero
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
  padding: var(--sp-12) 0 var(--sp-10);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.blog-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-4);
  line-height: 1.15;
}
.blog-hero-title span {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero-tagline {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   Featured Post Card
   ============================================================ */
.featured-post {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--sp-8) 0;
  text-decoration: none;
  color: #fff;
  min-height: 420px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.featured-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  color: #fff;
}

.featured-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.featured-post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.featured-post-body {
  position: relative;
  z-index: 1;
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
}

.featured-post-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.3);
  width: fit-content;
  margin-bottom: var(--sp-4);
  backdrop-filter: blur(8px);
}

.featured-post-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: var(--sp-3);
}

.featured-post-excerpt {
  font-size: clamp(14px, 1.8vw, 16px);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   Posts Grid
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

/* ============================================================
   Post Card
   ============================================================ */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  box-shadow: var(--shadow-xs);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.25);
  color: var(--color-text);
}

.post-card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.post-card:hover .post-card-img { transform: scale(1.05); }

.post-card-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
}

.post-card-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-base);
}
.post-card:hover .post-card-title { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border);
  font-size: 13px;
}

.post-card-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-card-author {
  font-weight: 600;
  color: var(--color-text);
  font-size: 13px;
}

.post-card-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.post-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

/* ============================================================
   Load More Button
   ============================================================ */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  padding: var(--sp-6) 0 var(--sp-12);
}

.load-more-btn {
  padding: 12px 36px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: all var(--t-base);
}
.load-more-btn:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}
.load-more-btn:disabled:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-muted);
  box-shadow: none;
}

/* ============================================================
   Site Footer
   ============================================================ */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--sp-10) 0;
  transition: background var(--t-base), border-color var(--t-base);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  text-align: center;
}

.footer-logo,
.footer-brand {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.footer-logo span,
.footer-brand span { color: var(--color-primary); }

.footer-links,
.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  padding: 0;
  margin: 0;
}
.footer-links li { list-style: none; }
.footer-links a,
.footer-nav a,
.footer-link {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--t-base);
}
.footer-links a:hover,
.footer-nav a:hover,
.footer-link:hover { color: var(--color-primary); }

.footer-text,
.footer-copy {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ============================================================
   Responsive — Blog List
   ============================================================ */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-hero { padding: var(--sp-8) 0 var(--sp-6); }
  .featured-post { min-height: 320px; }
  .featured-post-body { min-height: 320px; padding: var(--sp-6); }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-links, .footer-nav { flex-direction: column; align-items: center; gap: var(--sp-2); }
}

@media (max-width: 480px) {
  .featured-post { min-height: 260px; }
  .featured-post-body { min-height: 260px; padding: var(--sp-5); }
  .featured-post-title { font-size: clamp(18px, 5vw, 24px); }
  .featured-post-excerpt { -webkit-line-clamp: 2; }
}

/* ============================================================
   Dark Mode — Blog List
   ============================================================ */
[data-theme="dark"] .blog-hero {
  background: linear-gradient(135deg, #0d0d1e 0%, #0f1a2e 50%, #0d0d1e 100%);
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .featured-post { box-shadow: var(--shadow-lg); }

[data-theme="dark"] .post-card {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}
[data-theme="dark"] .post-card:hover {
  border-color: rgba(14,165,233,0.3);
  box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .post-card-footer { border-top-color: var(--color-border); }

[data-theme="dark"] .load-more-btn {
  background: var(--color-bg-secondary);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
[data-theme="dark"] .load-more-btn:hover {
  background: var(--color-primary);
  color: #fff;
}
