/* ═══════════════════════════════════════════════
   DRA. ROSSANA GÓMEZ — BLOG PAGE
   Extends styles.css design system
═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   BLOG HERO
═══════════════════════════════════════════════ */
.blog-hero {
  padding: 160px 0 var(--s7);
  background: var(--clr-hero-bg, #0E1A26);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,157,143,.15) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,112,122,.1) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}
.blog-hero .section-badge {
  background: rgba(42,157,143,.18);
  color: var(--clr-accent, #2A9D8F);
}
.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: #fff;
  margin-top: var(--s2);
}
.blog-hero-em {
  font-style: normal;
  color: var(--clr-teal);
}
.blog-hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: rgba(255,255,255,.7);
  margin-top: var(--s3);
  max-width: 480px;
}

/* ═══════════════════════════════════════════════
   CATEGORY FILTERS
═══════════════════════════════════════════════ */
.blog-filters {
  padding: var(--s3) 0;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
}
.filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  /* subtle fade on right edge for overflow hint */
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 8px 18px;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  background: var(--clr-bg);
  color: var(--clr-muted);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast),
              transform var(--t-fast);
  cursor: pointer;
  position: relative;
}
.filter-chip:hover {
  background: var(--clr-surface);
  color: var(--clr-dark);
  border-color: var(--clr-border);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(14,26,38,.08);
}
.filter-active {
  background: var(--clr-dark);
  color: #fff;
  border-color: var(--clr-dark);
  box-shadow: 0 2px 12px rgba(14,26,38,.18);
}
.filter-active:hover {
  background: var(--clr-dark-2);
  border-color: var(--clr-dark-2);
  color: #fff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   FEATURED ARTICLE
═══════════════════════════════════════════════ */
.blog-featured {
  padding: var(--s6) 0;
  background: var(--clr-surface);
}
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s5);
  align-items: center;
  background: var(--clr-bg);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  transition: box-shadow var(--t-mid) var(--ease-out);
}
.featured-card:hover {
  box-shadow: var(--sh-lg);
}
.featured-img-wrap {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 380px;
}
.featured-img-wrap .blog-tag {
  position: absolute;
  top: var(--s3); left: var(--s3);
  z-index: 2;
}
.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.featured-card:hover .featured-img {
  transform: scale(1.04);
}
.featured-body {
  padding: var(--s5) var(--s5) var(--s5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.featured-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-dark);
  letter-spacing: -.02em;
}
.featured-excerpt {
  font-size: 15px;
  color: var(--clr-muted);
  line-height: 1.7;
}
.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}
.mini-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--clr-teal-bg);
  color: var(--clr-teal-dark);
}

/* ═══════════════════════════════════════════════
   ARTICLES GRID
═══════════════════════════════════════════════ */
.blog-listing {
  padding: var(--s6) 0 var(--s7);
  background: var(--clr-bg);
}
.blog-listing-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s5);
  align-items: start;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

/* Article card */
.article-card {
  background: var(--clr-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  transition: transform var(--t-mid) var(--ease-out),
              box-shadow var(--t-mid) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.article-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.article-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.article-card:hover .article-img-wrap img {
  transform: scale(1.06);
}
.article-img-wrap .blog-tag {
  position: absolute;
  top: var(--s2); left: var(--s2);
  z-index: 2;
}
.article-body {
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1;
}
.article-body .blog-date {
  font-size: 12px;
  color: var(--clr-muted);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--clr-dark);
  line-height: 1.35;
  letter-spacing: -.01em;
}
.article-body p {
  font-size: 14px;
  color: var(--clr-muted);
  line-height: 1.65;
  flex: 1;
}
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s2);
  border-top: 1px solid var(--clr-border);
  margin-top: auto;
}
.article-footer .blog-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--clr-muted);
}
.article-footer .blog-av {
  width: 22px; height: 22px;
}
.read-time {
  font-size: 12px;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.read-time::before {
  content: '';
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* Card hidden by filter */
.article-card.is-hidden {
  display: none;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar-widget {
  background: var(--clr-surface);
  border-radius: var(--r-lg);
  padding: var(--s4);
  border: 1px solid var(--clr-border);
  margin-bottom: var(--s3);
}

/* About widget */
.sidebar-about {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}
.sidebar-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-teal-bg);
}
.sidebar-about h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-dark);
}
.sidebar-spec {
  font-size: 13px;
  color: var(--clr-teal);
  font-weight: 500;
  margin-top: -4px;
}
.sidebar-bio {
  font-size: 14px;
  color: var(--clr-muted);
  line-height: 1.6;
}
.sidebar-btn {
  margin-top: var(--s1);
}

/* Categories widget */
.sidebar-heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: var(--s3);
  letter-spacing: -.01em;
}
.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--s2);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--clr-text);
  transition: background var(--t-fast), color var(--t-fast);
}
.sidebar-categories a:hover {
  background: var(--clr-teal-bg);
  color: var(--clr-teal-dark);
}
.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-muted);
  background: var(--clr-bg);
  padding: 2px 10px;
  border-radius: var(--r-full);
  min-width: 28px;
  text-align: center;
}
.sidebar-categories a:hover .cat-count {
  background: rgba(27,181,170,.15);
  color: var(--clr-teal-dark);
}

/* Newsletter widget */
.sidebar-newsletter {
  background: linear-gradient(135deg, var(--clr-dark) 0%, #1a2e40 100%);
  border: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sidebar-nl-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.1);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-teal);
}
.sidebar-newsletter .sidebar-heading {
  color: #fff;
  margin-bottom: 0;
}
.sidebar-newsletter p {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}
.sidebar-nl-form {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sidebar-nl-input {
  width: 100%;
  height: 46px;
  padding: 0 var(--s2);
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sidebar-nl-input::placeholder { color: rgba(255,255,255,.45); }
.sidebar-nl-input:focus {
  border-color: var(--clr-teal);
  background: rgba(255,255,255,.12);
}

/* ═══════════════════════════════════════════════
   BLOG CTA
═══════════════════════════════════════════════ */
.blog-cta {
  padding: var(--s6) 0 var(--s7);
  background: var(--clr-bg);
}
.blog-cta-card {
  background: linear-gradient(135deg, #0D1B2A 0%, #122840 50%, #0F3040 100%);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s5);
  position: relative;
  overflow: hidden;
}
.blog-cta-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,181,170,.2) 0%, transparent 70%);
  pointer-events: none;
}
.blog-cta-card::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 30%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,112,122,.12) 0%, transparent 70%);
  pointer-events: none;
}
.blog-cta-left {
  position: relative;
  z-index: 1;
}
.blog-cta-left h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.blog-cta-left p {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  margin-top: var(--s2);
  line-height: 1.6;
}
.blog-cta-actions {
  display: flex;
  gap: var(--s2);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img-wrap {
    min-height: 260px;
  }
  .featured-body {
    padding: var(--s4);
  }
  .blog-listing-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s3);
  }
  .blog-sidebar .sidebar-widget:last-child {
    grid-column: 1 / -1;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .blog-hero {
    padding: 120px 0 var(--s5);
  }
  .blog-hero-title {
    font-size: clamp(30px, 8vw, 42px);
  }
  .filter-bar {
    padding: 0 0 4px;
  }
  .featured-card {
    grid-template-columns: 1fr;
    border-radius: var(--r-lg);
  }
  .featured-img-wrap {
    min-height: 200px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    grid-template-columns: 1fr;
  }
  .blog-cta-card {
    flex-direction: column;
    text-align: center;
    padding: var(--s5) var(--s3);
  }
  .blog-cta-actions {
    flex-direction: column;
    width: 100%;
  }
  .blog-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
