/* TP MCQ Theme v2.0 — TopicPass */
:root {
  --tp-red:      #DE2500;
  --tp-red-dk:   #b81e00;
  --tp-bg:       #EDF0F7;
  --tp-white:    #ffffff;
  --tp-border:   #E2E6F0;
  --tp-text:     #1A1C2E;
  --tp-muted:    #5C6480;
  --tp-shadow:   0 2px 14px rgba(0,0,0,.07);
  --tp-header-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
  background: var(--tp-bg);
  color: var(--tp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ══════════════════════
   HEADER
══════════════════════ */
.tp-site-header {
  background: var(--tp-white);
  box-shadow: 0 1px 0 var(--tp-border), 0 4px 16px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 200;
}
.tp-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--tp-header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}
.tp-hamburger {
  width: 36px; height: 36px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  flex-shrink: 0; padding: 4px; border-radius: 6px;
  transition: background .15s;
}
.tp-hamburger:hover { background: var(--tp-bg); }
.tp-hamburger span {
  display: block; height: 2px;
  background: var(--tp-text); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.tp-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tp-hamburger.is-open span:nth-child(2) { opacity: 0; }
.tp-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Brand */
.tp-header-brand { flex: 1; display: flex; align-items: center; }
.tp-brand-link   { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tp-logo-img,.custom-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.tp-brand-text   { display: flex; flex-direction: column; }
.tp-brand-name   {
  font-size: 17px; font-weight: 900; color: var(--tp-text);
  letter-spacing: .2px; white-space: nowrap; line-height: 1.1;
}
.tp-brand-name span { color: var(--tp-red); }
.tp-brand-tagline { font-size: 10px; font-weight: 600; color: var(--tp-muted); text-transform: uppercase; letter-spacing: .6px; }

/* Category dropdown */
.tp-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tp-category-select {
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1.5px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235C6480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .15s;
}
.tp-category-select:focus { outline: none; border-color: var(--tp-red); }
.tp-action-btn {
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--tp-muted);
  transition: background .15s, color .15s;
}
.tp-action-btn:hover { background: var(--tp-bg); color: var(--tp-text); }
.tp-action-btn svg { width: 20px; height: 20px; }

/* Search bar */
.tp-search-bar {
  border-top: 1px solid var(--tp-border);
  background: var(--tp-white);
  animation: tp-slide-down .2s ease;
}
@keyframes tp-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tp-search-bar .tp-header-inner { height: 48px; }
.tp-search-form { display: flex; align-items: center; gap: 8px; width: 100%; }
.tp-search-input {
  flex: 1; height: 36px;
  border: 1.5px solid var(--tp-border); border-radius: 8px;
  padding: 0 12px; font-size: 14px; font-family: inherit;
  outline: none; background: var(--tp-bg); transition: border-color .15s;
}
.tp-search-input:focus { border-color: var(--tp-red); background: var(--tp-white); }
.tp-search-submit {
  width: 36px; height: 36px;
  background: var(--tp-red); border: none; border-radius: 8px;
  cursor: pointer; color: white;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.tp-search-submit:hover { opacity: .88; }

/* Mobile nav */
.tp-mobile-nav {
  background: var(--tp-white);
  border-top: 1px solid var(--tp-border);
  max-height: 0; overflow: hidden;
  transition: max-height .28s ease;
}
.tp-mobile-nav.is-open { max-height: 400px; }
.tp-mobile-nav-list { list-style: none; padding: 8px 0 12px; }
.tp-mobile-nav-list li a {
  display: block; padding: 11px 24px;
  font-size: 15px; font-weight: 500; color: var(--tp-text);
  transition: color .15s;
}
.tp-mobile-nav-list li a:hover { color: var(--tp-red); }

/* ══════════════════════
   LAYOUT
══════════════════════ */
.tp-site-content { min-height: calc(100vh - var(--tp-header-h) - 64px); }
.tp-main-content { }
.tp-container { max-width: 1060px; margin: 0 auto; padding: 32px 20px 56px; }

/* ══════════════════════
   FOOTER
══════════════════════ */
.tp-site-footer {
  background: var(--tp-white);
  border-top: 1px solid var(--tp-border);
  padding: 20px 0;
}
.tp-footer-inner {
  max-width: 1060px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.tp-footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--tp-text);
}
.tp-footer-brand img { width: 28px; height: 28px; border-radius: 6px; }
.tp-footer-copy { font-size: 13px; color: var(--tp-muted); }

/* ══════════════════════
   GENERIC POSTS / PAGES
══════════════════════ */
.tp-post-entry {
  background: var(--tp-white); border-radius: 12px;
  padding: 24px; margin-bottom: 20px; box-shadow: var(--tp-shadow);
}
.tp-post-title { font-size: 20px; margin-bottom: 8px; }
.tp-post-title a:hover { color: var(--tp-red); }
.tp-post-excerpt { color: var(--tp-muted); font-size: 14px; }
.tp-no-content { text-align: center; color: var(--tp-muted); padding: 60px 0; }

/* ══════════════════════
   PAGINATION
══════════════════════ */
.tp-pagination { margin-top: 32px; text-align: center; }
.tp-pagination .page-numbers {
  display: inline-flex; align-items: center; gap: 4px;
}
.tp-pagination .page-numbers a,
.tp-pagination .page-numbers span {
  padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--tp-border);
  background: var(--tp-white); color: var(--tp-text);
  transition: border-color .15s, color .15s;
}
.tp-pagination .page-numbers .current { background: var(--tp-red); color: white; border-color: var(--tp-red); }
.tp-pagination .page-numbers a:hover  { border-color: var(--tp-red); color: var(--tp-red); }

/* ══════════════════════
   RESPONSIVE
══════════════════════ */
@media (max-width: 680px) {
  .tp-brand-tagline { display: none; }
  .tp-brand-name    { font-size: 14px; }
  .tp-footer-inner  { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 400px) {
  .tp-category-select { max-width: 110px; font-size: 12px; }
}
