/* GyanPoints - Educational Study Materials Website */
/* Mobile-first responsive design */

:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fdba74;
  --secondary: #1e40af;
  --secondary-light: #3b82f6;
  --dark: #1e293b;
  --gray: #64748b;
  --light-gray: #f1f5f9;
  --white: #ffffff;
  --success: #16a34a;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--light-gray);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ========== HEADER ========== */
/* Header / mobile menu styles live in assets/css/header-nav.css (authoritative).
   Do not reintroduce .nav-menu display/transform rules here — they conflict. */

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
  padding: 40px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  color: var(--gray);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  justify-content: center;
  margin-top: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    max-width: 720px;
  }
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--gray);
}

/* ========== CATEGORY PILLS ========== */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 20px;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.pill {
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--dark);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.pill:hover,
.pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.pill.secondary {
  background: var(--light-gray);
}

/* ========== SECTIONS ========== */
.section {
  padding: 32px 20px;
  max-width: none;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.section-subtitle {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ========== CARDS GRID ========== */
/* Fluid responsive grid — full-width friendly */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

/* Auto-fit helpers for denser layouts */
.cards-grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cards-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.cards-grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* State / featured cards container */
.state-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--primary);
}

.card-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-content p {
  font-size: 0.85rem;
  color: var(--gray);
}

.card-arrow {
  margin-left: auto;
  color: var(--primary);
  font-size: 1.2rem;
}

/* State Board special cards */
.state-card {
  flex-direction: column;
  text-align: center;
  padding: 24px 16px;
}

.state-card .card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  font-size: 1.8rem;
}

/* ========== SUBJECT LIST ========== */
.subject-list {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.subject-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition);
  cursor: pointer;
}

.subject-item:last-child {
  border-bottom: none;
}

.subject-item:hover {
  background: #fff7ed;
}

.subject-item h4 {
  font-weight: 500;
  font-size: 1rem;
}

.subject-item .arrow {
  color: var(--gray);
  font-size: 1.1rem;
}

.subject-item:hover .arrow {
  color: var(--primary);
}

/* Chapter list arrows (NCERT Solutions / Exemplar) */
.chapter-item .arrow {
  margin-left: auto;
  color: var(--gray);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.chapter-item:hover .arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* Generic list arrow fallback */
.arrow {
  color: var(--gray);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
}


.subject-item.highlight h4 {
  color: var(--primary);
  font-weight: 600;
}

/* ========== ACCORDION / EXPANDABLE ========== */
.accordion {
  width: 100%;
}

.accordion-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.accordion-item.is-open {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  color: var(--dark);
  font-family: inherit;
}

.accordion-header:hover {
  background: #fff7ed;
}

.accordion-header .icon {
  transition: transform 0.3s ease;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff7ed;
}

.accordion-header.active .icon,
.accordion-item.is-open .accordion-header .icon {
  transform: rotate(180deg);
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 20px;
}

.accordion-body.open {
  max-height: 2000px;
  padding: 0 20px 16px;
}

.accordion-body .subject-item {
  padding-left: 12px;
}

.accordion-body p,
.accordion-body ol,
.accordion-body ul {
  color: var(--dark);
  line-height: 1.8;
  margin-bottom: 8px;
}

.accordion-body ol,
.accordion-body ul {
  padding-left: 20px;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  padding: 12px 20px;
  font-size: 0.85rem;
  color: var(--gray);
  max-width: none;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.breadcrumb a {
  color: var(--secondary);
}

.breadcrumb span {
  margin: 0 6px;
}

/* ========== PAGE HEADER ========== */
.page-header {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  padding: 32px 16px;
  text-align: center;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto;
}

/* ========== LANGUAGE SELECT ========== */
.lang-select {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.lang-btn {
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 40px 16px 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: none;
  margin: 0 auto 32px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand span {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  max-width: none;
  margin: 0 auto;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* ========== FLOATING BUTTON ========== */
.float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

.float-btn.visible {
  opacity: 1;
  visibility: visible;
}

.float-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========== SEARCH MODAL ========== */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

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

.search-box {
  background: var(--white);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.search-box input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .state-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .state-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 40px 24px;
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .state-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 60px 24px;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Extra-wide screens — use full width more effectively */
@media (min-width: 1400px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .state-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding: 48px 32px;
  }

  .navbar {
    padding: 12px 32px;
  }
}

/* Utility */
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none; }

/* Class selector pills */
.class-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.class-pill {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--white);
  border: 2px solid var(--light-gray);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.class-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.class-pill:hover {
  border-color: var(--primary);
}

/* ===== Search Results ===== */
.search-box {
  max-width: 560px;
}
.search-box input {
  margin-bottom: 12px;
}
#search-results {
  max-height: 360px;
  overflow-y: auto;
}
.search-hint {
  color: var(--gray);
  font-size: 0.9rem;
  padding: 8px 4px;
}
.search-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.search-result-list li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 8px;
  transition: var(--transition);
}
.search-result-list li a:hover {
  background: #fff7ed;
}
.result-cat {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.search-result-list strong {
  font-size: 0.95rem;
  color: var(--dark);
}

/* Navbar polish */
.navbar {
  gap: 12px;
}
.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

/* ===== New Header (image style) ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: none;
  margin: 0 auto;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f97316, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(249,115,22,0.35);
}
.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
}
.logo-text span { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.search-btn, .menu-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark);
  padding: 8px;
  border-radius: 8px;
}
.search-btn:hover, .menu-toggle:hover {
  background: var(--light-gray);
}

/* Desktop horizontal menu — handled by header-nav.css */

/* ===== Countdown Cards ===== */
.countdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}
@media (min-width: 640px) {
  .countdown-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .countdown-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1400px) {
  .countdown-grid { grid-template-columns: repeat(4, 1fr); }
}
.countdown-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid transparent;
  transition: var(--transition);
}
.countdown-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.countdown-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.countdown-card .exam-date {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 16px;
}
.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.countdown-unit {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 60px;
}
.countdown-unit strong {
  display: block;
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.2;
}
.countdown-unit span {
  font-size: 0.7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Quiz Styles ===== */
.quiz-card { cursor: pointer; }
.quiz-card:hover { border-color: var(--primary); }
.quiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--gray);
}
.progress-bar {
  width: 120px;
  height: 8px;
  background: var(--light-gray);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 10%;
}
.quiz-card-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.quiz-card-box h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.quiz-option:hover { border-color: var(--primary-light); background: #fff7ed; }
.quiz-option.selected { border-color: var(--primary); background: #fff7ed; }
.quiz-option.correct { border-color: var(--success); background: #f0fdf4; }
.quiz-option.wrong { border-color: #ef4444; background: #fef2f2; }
.quiz-option input { display: none; }
.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Dark mode */
body.dark-mode {
  --dark: #e2e8f0;
  --gray: #94a3b8;
  --light-gray: #1e293b;
  --white: #0f172a;
  background: #0f172a;
  color: #e2e8f0;
}
body.dark-mode .header,
body.dark-mode .card,
body.dark-mode .subject-list,
body.dark-mode .quiz-card-box,
body.dark-mode .countdown-card,
body.dark-mode .search-box,
body.dark-mode .nav-menu {
  background: #1e293b;
  color: #e2e8f0;
}
body.dark-mode .page-header,
body.dark-mode .hero {
  background: linear-gradient(135deg, #1e293b, #334155);
}
body.dark-mode .footer { background: #020617; }
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--dark);
}
.theme-toggle:hover { background: var(--light-gray); }


/* WP theme: compact header 60–80px desktop / ~56px mobile */
.header .navbar {
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding-top: 0;
  padding-bottom: 0;
}
.header .logo img,
.header .logo .custom-logo,
.header .logo .gp-brand-logo {
  height: 40px !important;
  max-height: 40px;
}
.header .logo-icon {
  width: 36px;
  height: 36px;
}
.header .nav-links a {
  padding: 6px 12px;
  font-size: 0.9rem;
  min-height: 36px;
}
@media (max-width: 1024px) {
  .header .navbar {
    height: 56px;
    min-height: 56px;
    max-height: 56px;
  }
  .header .logo img,
  .header .logo .custom-logo,
  .header .logo .gp-brand-logo {
    height: 36px !important;
    max-height: 36px;
  }
  .header .nav-actions button,
  .header .search-btn,
  .header .theme-toggle,
  .header .menu-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}
