/* ═══════════════════════════════════════════════════════════
   HOMEPAGE ONLY (index.html)
   Hero, feature cards, subject chips, course picker, FAQ, community.
   Sits on top of index.css — no other page loads this file.
═══════════════════════════════════════════════════════════ */

/* ───────── Page container (moved here from index.css — homepage only) ───────── */
.homepage-container {
  text-align: center;
  margin: 20px auto;
  padding: 20px;
  max-width: 1000px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 1024px) {
  .homepage-container { padding: 15px; max-width: 900px; }
}

@media screen and (max-width: 768px) {
  .homepage-container { padding: 10px; margin: 15px auto; }
}

@media screen and (max-width: 576px) {
  .homepage-container { padding: 10px; margin: 10px auto; }
}

@media screen and (max-width: 360px) {
  .homepage-container { padding: 8px; margin: 8px auto; }
}

/* ───────── Page container (moved here from index.css — homepage only) ───────── */
.homepage-container {
  text-align: center;
  margin: 20px auto;
  padding: 20px;
  max-width: 1000px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.homepage-text {
  color: #1a1a1a;
  font-size: 1.2rem;
  line-height: 1.6;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

@media screen and (max-width: 1024px) {
  .homepage-container {
    padding: 15px;
    max-width: 900px;
  }

  .homepage-text {
    font-size: 1.1rem;
    max-width: 700px;
  }
}

@media screen and (max-width: 768px) {
  .homepage-container {
    padding: 10px;
    margin: 15px auto;
  }

  .homepage-text {
    font-size: 1rem;
    padding: 15px;
  }
}

@media screen and (max-width: 576px) {
  .homepage-container {
    padding: 10px;
    margin: 10px auto;
  }

  .homepage-text {
    font-size: 0.9rem;
    padding: 10px;
    line-height: 1.5;
  }
}

@media screen and (max-width: 360px) {
  .homepage-container {
    padding: 8px;
    margin: 8px auto;
  }

  .homepage-text {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 8px;
  }
}

/* ───────── Hero ───────── */
.intro-section {
  padding: 1rem 0.25rem 0;
}

.intro-section h1 {
  font-size: clamp(1.6rem, 1.05rem + 2.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #0a58e0;
  max-width: 22em;
  margin: 0 auto;
  text-wrap: balance;
}

/* Typed.js tagline — sits under the real H1 so the H1 never changes or clips */
.typed-line {
  min-height: 1.9em;
  margin: 0.9rem 0 0;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem);
  font-weight: 600;
  color: #6a11cb;
}

.intro-section .homepage-text {
  color: #1a1a1a;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.08rem);
  line-height: 1.6;
  max-width: 760px;
  margin: 0.5rem auto 0;
  padding: 0.5rem 0.5rem 0;
  text-align: center;
}

@media screen and (max-width: 576px) {
  .intro-section .homepage-text { line-height: 1.5; }
}

@media screen and (max-width: 360px) {
  .intro-section .homepage-text { line-height: 1.4; }
}

.homepage-container a.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #007bff, #6a11cb);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.35);
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.homepage-container a.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(106, 17, 203, 0.4);
}

/* Links styled as buttons keep white text (index.css forces blue on `main a`) */
.homepage-container a.hero-cta,
.homepage-container a.hero-cta:hover,
.homepage-container a.btn-login,
.homepage-container a.btn-login:hover,
.homepage-container a.pick-btn,
.homepage-container a.pick-btn:hover {
  color: #ffffff !important;
  text-decoration: none !important; /* beats the :not() underline rule in index.css */
}

/* ───────── Section headings ───────── */
.features-section h2,
.covers-section h2,
.homepage-container .cta-section h2,
.contributors-section h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

/* ───────── What We Offer ───────── */
.features-section {
  margin: 2.5rem 0 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 1.25rem;
  text-align: left;
}

/* the in-grid ad spans the full row and disappears when unfilled */
.features-grid > ins.adsbygoogle {
  grid-column: 1 / -1;
}
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e0e6ed;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.feature-card .icon {
  width: 46px;
  height: 46px;
  margin: 0 0 0.85rem;
  border-radius: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0b3a8a;
  margin: 0 0 0.4rem;
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4b5563;
  margin: 0;
}

.feature-card .icon.pdf {
  background-color: #fef2f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E");
}

.feature-card .icon.book {
  background-color: #eff6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h6a4 4 0 0 1 4 4v11a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 5h-6a4 4 0 0 0-4 4v11a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

.feature-card .icon.cap {
  background-color: #ecfdf5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z'/%3E%3Cpath d='M22 10v6'/%3E%3Cpath d='M6 12.5V16a6 3 0 0 0 12 0v-3.5'/%3E%3C/svg%3E");
}

.feature-card .icon.check {
  background-color: #f0fdf4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

/* ───────── Login CTA (inside stats) ───────── */
.login-cta {
  margin-top: 2.25rem;
}

.login-cta p {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0 0 0.9rem;
}

.homepage-container a.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.6rem;
  background: #065f46;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 4px 0 #043d2e;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.homepage-container a.btn-login:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #043d2e;
}

/* ───────── Coverage by subject ───────── */
.covers-section {
  margin: 2.5rem 0;
}

.subjects-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 880px;
  margin: 1.1rem auto 0;
}

.subject-tag {
  padding: 0.35rem 0.85rem;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  color: #1e3a8a;
}

/* ───────── Course picker ───────── */
.homepage-container .cta-section {
  margin: 2.5rem 0 1.5rem;
  scroll-margin-top: 90px;
}

.homepage-container .cta-section > p {
  color: #4b5563;
  margin: 0;
}

.pick-courses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 1.4rem;
}

.homepage-container a.pick-btn {
  flex: 1 1 250px;
  max-width: 300px;
  min-height: 54px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: 0 4px 0 var(--sh);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.homepage-container a.pick-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--sh);
}

.pick-bsc  { --c1: #1a73e8; --c2: #1558c0; --sh: #0d3f8f; }
.pick-bca  { --c1: #8e44ad; --c2: #6c3483; --sh: #4a2d73; }
.pick-mca  { --c1: #1e8e3e; --c2: #146c2e; --sh: #0f5132; }
.pick-bcom { --c1: #c2560c; --c2: #9a4409; --sh: #6e3006; }
.pick-msc  { --c1: #c0392b; --c2: #96281b; --sh: #7b241c; }

.homepage-container > .share-button {
  display: block;
  margin: 2rem auto;
}

/* ───────── FAQ ───────── */
.homepage-container .faq-section {
  text-align: left;
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e0e6ed;
  border-radius: 12px;
}

.faq-section h2 {
  text-align: center;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  margin: 0 0 1.1rem;
  color: #1a1a2e;
}

.faq-section ul {
  padding-left: 1.25rem;
}

.faq-section li {
  margin-bottom: 0.95rem;
  line-height: 1.65;
  color: #374151;
}

.faq-section li strong {
  color: #0b3a8a;
}

/* ───────── Community ───────── */
.contributors-section {
  margin: 2rem 0;
  padding: 1.5rem 1.25rem;
  background: #f1f5ff;
  border: 1px solid #d6e2ff;
  border-radius: 12px;
}

.contributors-section p {
  color: #374151;
  line-height: 1.6;
  margin: 0.25rem 0 0;
}

/* ───────── Small screens ───────── */
@media (max-width: 576px) {
  .features-grid { grid-template-columns: 1fr; }
  .homepage-container .faq-section { padding: 1.1rem 0.9rem; }
  .faq-section ul { padding-left: 1rem; }
  .homepage-container a.pick-btn { flex-basis: 100%; max-width: none; }
  .subject-tag { font-size: 0.82rem; padding: 0.3rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stat-icon,
  .feature-card,
  .homepage-container a.hero-cta,
  .homepage-container a.pick-btn {
    animation: none;
    transition: none;
  }
}