/* ==========================================================================
   TopperMantra Editorial, Blogs & Events Design Enhancements
   Consistent with TopperMantra Brand Identity
   ========================================================================== */

:root {
  --tm-brand: #ff5b2e;
  --tm-brand-light: #fff5f0;
  --tm-brand-dark: #e04a1f;
  --tm-slate-dark: #0f172a;
  --tm-slate-body: #475569;
  --tm-slate-muted: #94a3b8;
  --tm-card-border: #f1f5f9;
  --tm-card-hover: rgba(255, 91, 46, 0.08);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff5b2e, #f97316);
  z-index: 1000;
  width: 0%;
  transition: width 0.1s linear;
}

/* Mobile Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 360px);
  background: #ffffff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

/* Filter Pill Buttons */
.category-pill {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-pill:hover {
  transform: translateY(-1px);
}
.category-pill.active {
  background-color: #ff5b2e !important;
  color: #ffffff !important;
  border-color: #ff5b2e !important;
  box-shadow: 0 4px 14px rgba(255, 91, 46, 0.3);
}

/* Editorial Cards */
.editorial-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.editorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  border-color: rgba(255, 91, 46, 0.25);
}

.editorial-card:hover .editorial-image {
  transform: scale(1.04);
}
.editorial-image {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.open .lightbox-content {
  transform: scale(1);
}

/* Article Typography Styling */
.article-prose {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
}

.article-prose h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.article-prose h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.article-prose p {
  margin-bottom: 1.5rem;
}

.article-prose ul, .article-prose ol {
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}

.article-prose li {
  margin-bottom: 0.75rem;
  position: relative;
}

.article-prose blockquote {
  border-left: 4px solid #ff5b2e;
  padding: 1.25rem 1.75rem;
  margin: 2.25rem 0;
  background: #fff8f4;
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #0f172a;
  font-weight: 500;
}

.article-callout {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.article-callout.tip {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.article-callout.takeaway {
  border-left-color: #ff5b2e;
  background: #fff8f4;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Hackathon Timeline */
.timeline-track {
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: #e2e8f0;
}
@media (min-width: 768px) {
  .timeline-track::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Accordion FAQ */
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.25s ease;
  background: #ffffff;
}
.faq-item:hover {
  border-color: rgba(255, 91, 46, 0.3);
}
.faq-item.open {
  border-color: #ff5b2e;
  box-shadow: 0 10px 30px -10px rgba(255, 91, 46, 0.15);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.35s ease;
  padding: 0 1.5rem;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: #ff5b2e;
}

/* Shine effect */
@keyframes tmic-shine {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

