/* ==========================================================================
   NAIVARANI SREE KRISHNA TEMPLE - DYNAMIC SECTIONS STYLESHEET
   Supports News & Announcements, Spiritual Blogs, and Dynamic Events
   ========================================================================== */

/* -------------------------------------------------------------
   1. NEWS & ANNOUNCEMENTS SECTION
   ------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-card {
  background: var(--surface-card, #23120c);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: var(--kasavu-gold, #D4AF37);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.12);
}

.news-image-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: #150905;
}

.news-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image-wrap img {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(44, 24, 16, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--kasavu-gold, #D4AF37);
  color: var(--kasavu-gold-light, #F3E5AB);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.news-badge.featured {
  background: linear-gradient(135deg, #D4AF37, #9A7B2C);
  color: #1a0c08;
  border: none;
}

.news-date-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(18, 8, 5, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-title-en {
  font-family: 'Playfair Display', serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--kasavu-gold-light, #F3E5AB);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.news-title-ml {
  font-family: 'Noto Sans Malayalam', sans-serif;
  font-size: 0.95rem;
  color: #e0d0b8;
  margin-bottom: 0.85rem;
  line-height: 1.4;
  font-weight: 500;
}

.news-excerpt {
  font-size: 0.88rem;
  color: rgba(253, 251, 247, 0.75);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: 1rem;
  margin-top: auto;
}

.news-source {
  font-size: 0.78rem;
  color: rgba(253, 251, 247, 0.55);
}

.btn-read-more {
  background: none;
  border: none;
  color: var(--kasavu-gold, #D4AF37);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  transition: all 0.2s ease;
}

.btn-read-more:hover {
  color: #fff;
  transform: translateX(3px);
}

/* -------------------------------------------------------------
   2. SPIRITUAL BLOGS SECTION
   ------------------------------------------------------------- */
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.2rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--surface-card, #23120c);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--kasavu-gold, #D4AF37);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(212, 175, 55, 0.15);
}

.blog-image-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
  background: #140804;
}

.blog-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.blog-read-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(18, 8, 5, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--kasavu-gold-light, #F3E5AB);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}

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

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.blog-tag {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--kasavu-gold-light, #F3E5AB);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 600;
}

.blog-title-en {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.blog-title-ml {
  font-family: 'Noto Sans Malayalam', sans-serif;
  font-size: 0.95rem;
  color: var(--kasavu-gold, #D4AF37);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-summary {
  font-size: 0.88rem;
  color: rgba(253, 251, 247, 0.72);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: 1rem;
  margin-top: auto;
  font-size: 0.78rem;
  color: rgba(253, 251, 247, 0.6);
}

.blog-author {
  font-weight: 600;
  color: var(--kasavu-gold-light, #F3E5AB);
}

/* -------------------------------------------------------------
   3. ARTICLE & NEWS READER MODAL
   ------------------------------------------------------------- */
.reader-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 4, 2, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.reader-modal.active {
  display: flex;
}

.reader-dialog {
  background: #1e0e08;
  border: 1px solid var(--kasavu-gold, #D4AF37);
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.reader-header {
  position: relative;
  width: 100%;
  height: 260px;
  background: #110502;
  flex-shrink: 0;
}

.reader-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, #1e0e08 0%, rgba(30, 14, 8, 0.4) 60%, rgba(0,0,0,0.6) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.reader-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18, 8, 5, 0.8);
  border: 1px solid var(--kasavu-gold, #D4AF37);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.reader-close-btn:hover {
  background: var(--kasavu-gold, #D4AF37);
  color: #1a0c08;
}

.reader-body {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  color: var(--text-light, #FDFBF7);
  line-height: 1.8;
  font-size: 1.02rem;
}

.reader-title-en {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--kasavu-gold-light, #F3E5AB);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.reader-title-ml {
  font-family: 'Noto Sans Malayalam', sans-serif;
  font-size: 1.15rem;
  color: var(--kasavu-gold, #D4AF37);
  margin-bottom: 1rem;
}

.reader-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: rgba(253, 251, 247, 0.65);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.reader-paragraphs p {
  margin-bottom: 1.4rem;
  white-space: pre-line;
}

/* -------------------------------------------------------------
   4. DYNAMIC EVENTS TIMELINE INJECTIONS
   ------------------------------------------------------------- */
.dynamic-event-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--kasavu-gold-light, #F3E5AB);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------
   5. RESPONSIVENESS
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  .news-grid, .blogs-grid {
    grid-template-columns: 1fr;
  }
  .reader-body {
    padding: 1.5rem;
  }
  .reader-title-en {
    font-size: 1.35rem;
  }
}
