/* ═══════════════════════════════════════════════════════════
   JEE Counsellor — Article Page Stylesheet
   Design: Light Editorial • Bold Typography • Teal/Blue Accents
   Colors: #2ba5b0 (Teal), #1106de (Deep Blue), #f5c518 (Yellow)
   Background: #f8fafc – Clean white-grey
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* ── Page-level light override ── */
body:has(.article-layout) {
  background: #f4f6fb;
  color: #1a1d26;
  -webkit-font-smoothing: antialiased; /* Crisp text on mobile */
}

/* ── Article Fonts ── */
.article-layout,
.article-layout h1,
.article-layout h2,
.article-layout h3,
.article-layout h4,
.sidebar-box,
.tool-cta h3 {
  font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}
.article-content p,
.article-content li,
.article-content td,
.article-content th,
.article-subtitle {
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes borderGlow {
  0%,100% { border-color: rgba(43,165,176,0.3); }
  50%     { border-color: rgba(43,165,176,0.8); }
}
/* Shimmer effect for ads so they don't look boring */
@keyframes shimmerAd {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Master Layout ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
@media (max-width: 920px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 3rem; /* Slightly wider padding for tablets */
  }
}
@media (max-width: 600px) {
  .article-layout {
    padding: 1.25rem 1rem 3rem; /* Maximize screen real estate on phones */
    gap: 1.5rem;
  }
}

/* ── Hero Section ── */
.article-hero {
  background: #ffffff;
  border-radius: 16px; /* Slightly rounder for modern feel */
  border-top: 5px solid #2ba5b0;
  border-left: none;
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(43,165,176,0.05), 0 1px 4px rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 0.65s ease-out both;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 320px; height: 200px;
  background: radial-gradient(ellipse at top right, rgba(43,165,176,0.07) 0%, transparent 70%);
  pointer-events: none;
}
@media (max-width: 600px) {
  .article-hero {
    padding: 1.75rem 1.25rem 1.5rem;
    border-top: 4px solid #2ba5b0;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }
}

.article-meta {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #64748b;
  font-family: 'Inter', sans-serif;
}
@media (max-width: 600px) {
  .article-meta {
    gap: 0.85rem;
    margin-bottom: 1rem;
  }
  .article-meta span {
    font-size: 0.8rem;
  }
}
.article-meta span i { color: #2ba5b0; }

.article-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
  background: linear-gradient(135deg, #2ba5b0 0%, #1106de 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeSlideUp 0.65s 0.1s ease-out both;
}
@media (max-width: 600px) {
  .article-title {
    margin-bottom: 0.85rem;
  }
}

.article-subtitle {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.7;
  max-width: 680px;
  animation: fadeSlideUp 0.65s 0.2s ease-out both;
}
@media (max-width: 600px) {
  .article-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* ── Article Body Content ── */
.article-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #334155;
}
@media (max-width: 600px) {
  .article-content {
    font-size: 1rem;
    line-height: 1.75;
  }
}

.article-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f172a;
  margin: 3rem 0 1.2rem;
  padding-left: 1rem;
  border-left: 4px solid #2ba5b0;
  letter-spacing: -0.02em;
  scroll-margin-top: 90px;
}
@media (max-width: 600px) {
  .article-content h2 {
    font-size: 1.45rem;
    margin: 2.25rem 0 1rem;
    padding-left: 0.85rem;
    border-left: 4px solid #2ba5b0;
  }
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1106de;
  margin: 2rem 0 0.8rem;
  scroll-margin-top: 90px;
}
@media (max-width: 600px) {
  .article-content h3 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.6rem;
  }
}

.article-content p {
  margin-bottom: 1.6rem;
}
@media (max-width: 600px) {
  .article-content p {
    margin-bottom: 1.35rem;
  }
}
.article-content strong {
  color: #0f172a;
  font-weight: 700;
}
.article-content em {
  color: #2ba5b0;
  font-style: normal;
  font-weight: 600;
}

/* ── Lists ── */
.article-content ul,
.article-content ol {
  list-style: none;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 1.25rem 0 2rem;
  background: #f0fafe;
  border: 1px solid rgba(43,165,176,0.15);
  border-left: 4px solid #2ba5b0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .article-content ul,
  .article-content ol {
    padding: 1.25rem 1rem 1.25rem 1.5rem;
    margin: 1rem 0 1.5rem;
    gap: 0.6rem;
    border-radius: 8px;
  }
}
.article-content li {
  padding-left: 1.5rem;
  position: relative;
  color: #334155;
  line-height: 1.7;
}
@media (max-width: 600px) {
  .article-content li {
    padding-left: 1.25rem;
    font-size: 0.95rem;
  }
}
.article-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #2ba5b0;
  font-size: 0.9rem;
  top: 3px;
}

/* ── Data Tables ── */
.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.75rem 0 2.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
  /* Visual cue for mobile scrolling */
  background: linear-gradient(to right, white 30%, rgba(255,255,255,0)), 
              linear-gradient(to right, rgba(255,255,255,0), white 70%) 0 100%, 
              radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.05), transparent), 
              radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.05), transparent) 0 100%;
  background-repeat: no-repeat;
  background-color: white;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-position: 0 0, 100%, 0 0, 100%;
  background-attachment: local, local, scroll, scroll;
}
@media (max-width: 600px) {
  .article-table-wrap {
    margin: 1.5rem 0 2rem;
    border-radius: 10px;
  }
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 500px;
}
.article-content thead {
  background: linear-gradient(135deg, #edfafc, #f0f4ff);
  border-bottom: 2px solid #2ba5b0;
}
.article-content th {
  padding: 1.1rem 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2ba5b0;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .article-content th {
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
  }
}
.article-content td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .article-content td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }
}
.article-content tbody tr {
  transition: background 0.15s ease;
}
.article-content tbody tr:hover {
  background: #f8fbfd;
}
.article-content tbody tr:last-child td {
  border-bottom: none;
}

/* ── Tool CTA Cards ── */
.tool-cta {
  background: linear-gradient(135deg, #edfafc 0%, #eff3ff 100%);
  border: 1px solid rgba(43,165,176,0.3);
  border-top: 4px solid #2ba5b0;
  border-radius: 16px;
  padding: 2.5rem;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: borderGlow 3.5s ease-in-out infinite;
}
@media (max-width: 600px) {
  .tool-cta {
    padding: 1.75rem 1.25rem;
    margin: 2rem 0;
    border-radius: 12px;
  }
}
.tool-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(43,165,176,0.12);
}
.tool-cta::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(43,165,176,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.tool-cta h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
@media (max-width: 600px) {
  .tool-cta h3 {
    font-size: 1.35rem;
  }
}
.tool-cta p {
  color: #475569;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}
@media (max-width: 600px) {
  .tool-cta p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
}
.tool-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #2ba5b0, #1106de);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(43,165,176,0.3);
}
@media (max-width: 600px) {
  .tool-cta .btn {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    width: 100%; /* Better touch target */
  }
}
.tool-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(43,165,176,0.4);
}

/* ── Sticky Sidebar ── */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 90px;
  height: max-content;
}
@media (max-width: 920px) {
  .article-sidebar {
    position: static;
    gap: 1.25rem;
  }
}
.sidebar-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
@media (max-width: 600px) {
  .sidebar-box {
    padding: 1.25rem;
    border-radius: 12px;
  }
}
.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2ba5b0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.toc-list li a {
  display: block;
  color: #64748b;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .toc-list li a {
    padding: 0.75rem 0.85rem; /* Larger touch targets for mobile */
    font-size: 0.95rem;
  }
}
.toc-list li a:hover {
  color: #2ba5b0;
  border-left-color: #2ba5b0;
  background: #f0fafe;
}

/* ── AD SPACES: Redesigned for Mobile Friendliness ── */
.ad-space {
  /* Soft, modern skeleton loading effect instead of harsh dashes */
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmerAd 2.5s infinite linear;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #94a3b8;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}
.ad-space::after {
  content: 'Sponsored';
  background: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  backdrop-filter: blur(4px);
}
.ad-sidebar {
  width: 100%;
  min-height: 480px;
}
@media (max-width: 920px) {
  .ad-sidebar {
    min-height: 250px;
    border-radius: 12px;
  }
}
.ad-bottom {
  width: 100%;
  min-height: 120px;
  margin-top: 3.5rem;
}
@media (max-width: 600px) {
  .ad-bottom {
    margin-top: 2rem;
    min-height: 100px;
    border-radius: 12px;
  }
}

/* ── Badge overrides for light article skin ── */
.article-layout .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
}
@media (max-width: 600px) {
  .article-layout .badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
  }
}
.article-layout .badge-guide  { background: #edfafc; color: #0e7b85; border: 1px solid rgba(43,165,176,0.3); }
.article-layout .badge-tips   { background: #fefce8; color: #a16207; border: 1px solid rgba(245,197,24,0.3); }
.article-layout .badge-cutoff { background: #eff0ff; color: #4338ca; border: 1px solid rgba(17,6,222,0.15); }
.article-layout .badge-news   { background: #fef2f2; color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }

/* ── Premium: Hide ads ── */
body.is-premium .ad-space {
  display: none !important;
}