/* ═══════════════════════════════════════════════════════════
   BLOG & EVENTS — Premium Redesign
   Modern minimalist UI for blog cards, detail, search,
   event carousel with smooth animations
   ═══════════════════════════════════════════════════════════ */

/* ── BLOG SECTION (Homepage) ───────────────────────────── */
.blog-section-new {
  padding: 7rem var(--section-pad-x);
  background: var(--ivory);
  position: relative;
}

.blog-inner { max-width: 1200px; margin: 0 auto; }

.blog-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 3.5rem;
}

.blog-header-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 300; color: var(--navy); line-height: 1.2;
}

.blog-header-text h2 em { font-style: italic; color: var(--pink); }

.blog-header-text p {
  font-size: 0.88rem; color: var(--mid); margin-top: 0.6rem; line-height: 1.6;
}

.blog-header .about-link { margin-bottom: 0.5rem; }

/* ── BLOG GRID ─────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ── BLOG CARD ─────────────────────────────────────────── */
.blog-card {
  background: var(--white);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(33, 7, 71, 0.12);
}

.blog-card-image {
  height: 300px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--pink) 60%, var(--blush) 100%);
}

.blog-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-image-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.blog-card-image-fallback::after {
  content: attr(data-initial);
  font-family: var(--font-display);
  font-size: 4rem; font-weight: 300;
  color: rgba(255,255,255,0.15);
}

.blog-card-category {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--pink); color: var(--white);
  font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 0.3rem 0.75rem;
}

.blog-card-body {
  padding: 2rem;
  flex: 1;
  display: flex; flex-direction: column;
}

.blog-card-meta {
  font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mid);
  margin-bottom: 0.8rem;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 400;
  color: var(--navy); line-height: 1.3;
  margin-bottom: 0.8rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.9rem; color: #777;
  line-height: 1.7; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1.2rem;
}

.blog-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}

.blog-card-author {
  font-size: 0.75rem; color: var(--navy);
  font-weight: 500; letter-spacing: 0.05em;
}

.blog-card-readmore {
  font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--pink);
  display: flex; align-items: center; gap: 0.4rem;
  transition: gap 0.3s;
}

.blog-card:hover .blog-card-readmore { gap: 0.7rem; }
.blog-card-readmore::after { content: '→'; }

/* ── BLOG TAGS ─────────────────────────────────────────── */
.blog-card-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.blog-card-tags span {
  font-size: 0.55rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--pink);
  background: rgba(129, 22, 84, 0.06);
  padding: 0.2rem 0.5rem;
}

/* ── BLOG HERO (blog.html) ─────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #3d1266 50%, var(--pink) 100%);
  padding: 8rem var(--section-pad-x) 4rem;
  text-align: center;
  position: relative; overflow: hidden;
}

.blog-hero::after {
  content: 'BLOG'; font-family: var(--font-display);
  font-size: 18rem; font-weight: 600;
  color: rgba(255,255,255,0.03);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; white-space: nowrap;
}

.blog-hero-label {
  font-size: 0.65rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--blush);
  margin-bottom: 1rem;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300; color: var(--white);
  line-height: 1.15; margin-bottom: 1rem;
}

.blog-hero h1 em { font-style: italic; color: var(--blush); }

.blog-hero-desc {
  font-size: 0.9rem; color: rgba(255,255,255,0.6);
  max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.7;
}

/* ── BLOG SEARCH ───────────────────────────────────────── */
.blog-search-wrap {
  max-width: 560px; margin: 0 auto;
  position: relative;
}

.blog-search-wrap input {
  width: 100%; padding: 0.9rem 1.2rem 0.9rem 3rem;
  font-family: var(--font-body); font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white); outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.blog-search-wrap input::placeholder { color: rgba(255,255,255,0.4); }

.blog-search-wrap input:focus {
  border-color: var(--blush);
  background: rgba(255,255,255,0.15);
}

.blog-search-wrap svg {
  position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4); pointer-events: none;
}

/* ── BLOG FILTERS ──────────────────────────────────────── */
.blog-filters {
  padding: 2rem var(--section-pad-x) 0;
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center;
}

.blog-filter-pill {
  font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 0.5rem 1.2rem;
  background: var(--white); color: var(--navy);
  border: 1px solid rgba(33,7,71,0.1);
  cursor: pointer; transition: all 0.3s;
  font-family: var(--font-body);
}

.blog-filter-pill:hover,
.blog-filter-pill.active {
  background: var(--pink); color: var(--white);
  border-color: var(--pink);
}

/* ── BLOG PAGE CONTENT ─────────────────────────────────── */
.blog-page-content {
  padding: 3rem var(--section-pad-x) 5rem;
  max-width: 1200px; margin: 0 auto;
}

.blog-page-stats {
  font-size: 0.75rem; color: var(--mid);
  letter-spacing: 0.1em; margin-bottom: 2rem;
  text-transform: uppercase;
}

.blog-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 4rem 2rem; color: var(--mid);
}

.blog-empty h3 {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 300;
  color: var(--navy); margin-bottom: 0.5rem;
}

/* ── PAGINATION ────────────────────────────────────────── */
.blog-pagination {
  display: flex; justify-content: center;
  gap: 0.5rem; margin-top: 3rem;
}

.blog-pagination button {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 0.78rem; color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(33,7,71,0.1);
  cursor: pointer; transition: all 0.3s;
}

.blog-pagination button:hover,
.blog-pagination button.active {
  background: var(--pink); color: var(--white);
  border-color: var(--pink);
}

.blog-pagination button:disabled {
  opacity: 0.4; cursor: default;
}

/* ── BLOG DETAIL MODAL ─────────────────────────────────── */
.blog-detail-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(33, 7, 71, 0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.blog-detail-overlay.open { opacity: 1; visibility: visible; }

.blog-detail-content {
  background: var(--ivory);
  max-width: 780px; width: 92%;
  max-height: 90vh; overflow-y: auto;
  padding: 0; position: relative;
  transform: translateY(30px);
  transition: transform 0.4s var(--ease-out);
}

.blog-detail-overlay.open .blog-detail-content {
  transform: translateY(0);
}

.blog-detail-close {
  position: absolute; top: 1rem; right: 1.2rem;
  z-index: 10; background: var(--white);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; font-size: 1.4rem;
  color: var(--navy); cursor: pointer;
  transition: background 0.3s;
  border-radius: 50%;
}

.blog-detail-close:hover { background: var(--blush); }

.blog-detail-hero {
  height: 280px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--pink) 100%);
  position: relative;
}

.blog-detail-hero img {
  width: 100%; height: 100%; object-fit: cover;
}

.blog-detail-body { padding: 2.5rem; }

.blog-detail-meta {
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mid);
  margin-bottom: 1rem;
}

.blog-detail-body h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300; color: var(--navy);
  line-height: 1.2; margin-bottom: 1.5rem;
}

.blog-detail-body .blog-content {
  font-size: 0.92rem; color: #444;
  line-height: 1.9;
}

.blog-detail-body .blog-content p {
  margin-bottom: 1.2rem;
}

.blog-detail-body .blog-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.blog-detail-body .blog-content a {
  color: var(--pink);
  text-decoration: underline;
  transition: color 0.3s;
}

.blog-detail-body .blog-content a:hover {
  color: var(--navy);
}

.blog-detail-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(33,7,71,0.08);
}

.blog-detail-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white); background: var(--pink);
  padding: 0.7rem 1.5rem; text-decoration: none;
  transition: background 0.3s;
}

.blog-detail-link:hover { background: var(--navy); }

/* ── EVENT CAROUSEL ────────────────────────────────────── */
.events-carousel-wrap {
  position: relative;
  overflow: hidden;
}

.events-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0 2rem;
}

.events-carousel::-webkit-scrollbar { display: none; }

.events-carousel .event-card {
  flex: 0 0 calc(50% - 0.75rem);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  width: auto;
}

.events-carousel .event-card:first-child {
  flex: 0 0 calc(50% - 0.75rem);
}

.events-carousel .event-card-img {
  height: 320px;
}

.events-carousel .event-card:first-child .event-card-img {
  height: 380px;
}

/* ── CAROUSEL NAV ──────────────────────────────────────── */
.carousel-nav {
  display: flex; gap: 0.8rem;
  align-items: center;
}

.carousel-btn {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid rgba(33,7,71,0.12);
  color: var(--navy); cursor: pointer;
  transition: all 0.3s; font-size: 1rem;
}

.carousel-btn:hover {
  background: var(--pink); color: var(--white);
  border-color: var(--pink);
}

.carousel-btn:disabled {
  opacity: 0.3; cursor: default;
}

/* ── CAROUSEL DOTS ─────────────────────────────────────── */
.carousel-dots {
  display: flex; justify-content: center;
  gap: 0.5rem; margin-top: 1.5rem;
}

.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(33,7,71,0.15);
  border: none; cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: var(--pink);
  width: 24px; border-radius: 4px;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid,
  .blog-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-header {
    flex-direction: column; align-items: flex-start; gap: 1rem;
  }
  .events-carousel .event-card {
    flex: 0 0 calc(60% - 0.75rem);
  }
}

@media (max-width: 768px) {
  .blog-section-new { padding: 5rem 2rem; }
  .blog-grid,
  .blog-page-grid {
    grid-template-columns: 1fr;
  }
  .blog-card-image { height: 200px; }
  .blog-hero { padding: 7rem 2rem 3rem; }
  .blog-hero::after { font-size: 10rem; }
  .blog-page-content { padding: 2rem 2rem 4rem; }

  .events-carousel .event-card {
    flex: 0 0 85%;
  }
  .events-carousel .event-card:first-child {
    flex: 0 0 85%;
  }
  .events-carousel .event-card-img,
  .events-carousel .event-card:first-child .event-card-img {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .blog-section-new { padding: 3.5rem 1.2rem; }
  .blog-card-image { height: 180px; }
  .blog-hero { padding: 6rem 1.2rem 2.5rem; }
  .blog-hero::after { font-size: 6rem; }
  .blog-page-content { padding: 1.5rem 1.2rem 3rem; }
  .blog-detail-body { padding: 1.5rem; }
  .blog-detail-hero { height: 200px; }

  .events-carousel .event-card {
    flex: 0 0 92%;
  }
}
