/* ===== UPSC Scientist — main styles =====
   Rang badalne ke liye sirf neeche ke variables badlein. */
:root {
  /* Header, footer aur hero ke rang admin panel > Settings se bhi badal sakte hain */
  --header-bg: #ffffff;
  --header-text: #1f1e1c;
  --footer-bg: #26215c;
  --footer-text: #ffffff;
  --topbar-bg: #111111;
  --topbar-text: #ffffff;
  --hero-bg: #3c3489;
  --hero-text: #ffffff;
  --brand: #3c3489;        /* main rang (indigo) */
  --brand-dark: #26215c;
  --brand-soft: #eeedfe;
  --accent: #ef9f27;       /* highlight rang (amber) */
  --accent-soft: #faeeda;
  --text: #1f1e1c;
  --muted: #6b6a65;
  --bg: #fafaf7;
  --card: #ffffff;
  --border: #e6e4dd;
  --success: #3b6d11;
  --danger: #a32d2d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
body.lang-hi { font-family: 'Noto Sans Devanagari', 'Noto Sans', system-ui, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 820px; }
.section { margin-top: 36px; margin-bottom: 36px; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: 10px 18px; border-radius: 10px; font-weight: 500; font-size: .95rem;
  cursor: pointer; font-family: inherit; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-small { padding: 7px 12px; font-size: .86rem; }
.btn-danger { background: transparent; color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: #fcebeb; }
.link { font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }

.tag, .badge {
  display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; vertical-align: middle;
}
.badge { background: var(--accent-soft); color: #633806; }
.badge.warn { background: #faeeda; color: #633806; }

/* ----- header ----- */
.notice-bar { background: var(--accent); color: #412402; text-align: center; padding: 7px 14px; font-size: .9rem; font-weight: 500; }
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-text); font-weight: 700; font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; flex: none; }
.brand-name { line-height: 1.2; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.logo-mark.big { width: 60px; height: 60px; font-size: 1.2rem; margin-bottom: 8px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a { color: var(--header-text); padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.main-nav > a:hover { background: rgba(128,128,128,.14); text-decoration: none; }
.main-nav > a.active { background: rgba(128,128,128,.18); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.lang-btn { border: 1px solid rgba(128,128,128,.35); border-radius: 8px; padding: 6px 10px; color: var(--header-text); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.lang-btn:hover { border-color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; }
.nav-burger { display: none; font-size: 26px; cursor: pointer; padding: 6px; color: var(--header-text); }

@media (max-width: 1180px) {
  .nav-burger { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header-bg); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 10px 18px 16px; gap: 2px;
  }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .main-nav > a { padding: 11px 10px; }
  .nav-actions { margin: 10px 0 0; flex-wrap: wrap; }
}

/* ----- hero ----- */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 56px 0 64px; }
.hero h1 { font-size: 2.3rem; max-width: 760px; }
.hero-sub { font-size: 1.1rem; opacity: .9; max-width: 640px; }
.hero .btn { background: var(--accent); border-color: var(--accent); color: #412402; }
.hero .btn:hover { background: #fac775; }
.hero .btn-outline { background: transparent; color: var(--hero-text); border-color: currentColor; }
.hero .btn-outline:hover { background: rgba(255,255,255,.1); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
@media (max-width: 600px) { .hero { padding: 40px 0 48px; } .hero h1 { font-size: 1.7rem; } }

.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: -32px; position: relative; }
.quick {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text); font-weight: 500; text-align: center; font-size: .95rem;
}
.quick i { font-size: 30px; color: var(--brand); }
.quick:hover { border-color: var(--brand); text-decoration: none; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }

/* ----- cards / grids ----- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }

.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .85rem; }
.date-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ca-card h3 a { color: var(--text); }
.ca-card h3 a:hover { color: var(--brand); }
.ca-card p { font-size: .93rem; }

.dl-card { display: flex; align-items: center; gap: 14px; }
.dl-icon { width: 46px; height: 46px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.dl-body { flex: 1; min-width: 0; }
.dl-body h3 { margin: 4px 0 2px; font-size: 1rem; }
.dl-body p { margin: 0; font-size: .88rem; }
@media (max-width: 480px) { .dl-card { flex-wrap: wrap; } .dl-card .btn { width: 100%; justify-content: center; } }

.experiment { display: flex; align-items: center; gap: 16px; border-left: 0; background: var(--accent-soft); border-color: #fac775; }
.experiment h2 { margin-bottom: 4px; }
.experiment p { margin: 0; }
.exp-icon { width: 54px; height: 54px; flex: none; border-radius: 50%; background: #fff; color: #854f0b; display: flex; align-items: center; justify-content: center; font-size: 28px; }

.app-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--brand-soft); border-color: #cecbf6; }
.app-banner h2, .app-banner h3 { margin-bottom: 2px; color: var(--brand-dark); }
.app-banner p { margin: 0; }
.app-banner.small { margin-bottom: 20px; }

.video { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: #fff; }
.empty i { font-size: 36px; display: block; margin-bottom: 6px; }
.empty p { margin: 0; }

/* ----- page head / tabs ----- */
.page-head { background: var(--brand-soft); padding: 34px 0 28px; border-bottom: 1px solid #cecbf6; }
.page-head h1 { color: var(--brand-dark); margin-bottom: 4px; }
.page-head p { margin: 0; color: #534ab7; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; margin: 10px 0 6px; scrollbar-width: thin; }
.tabs a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: .9rem; font-weight: 500; }
.tabs a:hover { border-color: var(--brand); text-decoration: none; }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ----- current affairs ----- */
.ca-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 28px; margin-bottom: 40px; align-items: start; }
@media (max-width: 860px) { .ca-layout { grid-template-columns: 1fr; } .ca-side { order: 2; } }
.date-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.date-form label { font-weight: 500; }
.date-form input[type=date] { padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 1rem; }
.list-heading { margin-bottom: 14px; }
.date-group { margin-bottom: 26px; }
.date-title { font-size: 1rem; color: var(--brand-dark); display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.ca-side { position: sticky; top: 84px; }
.archive { list-style: none; margin: 0; padding: 0; }
.archive li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); }
.archive li:last-child { border-bottom: 0; }
.archive a.active { font-weight: 700; }
.count { font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 8px; align-self: center; }

.article { margin-top: 14px; }
.article h1 { font-size: 1.8rem; }
.prose { font-size: 1.04rem; }
.prose img { border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose td, .prose th { border: 1px solid var(--border); padding: 6px 10px; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1em 0; padding: 4px 14px; background: var(--accent-soft); }
.prose h2, .prose h3 { margin-top: 1.2em; }

/* ----- resources ----- */
.res-card { display: flex; align-items: center; gap: 14px; color: var(--text); }
.res-card:hover { border-color: var(--brand); text-decoration: none; }
.res-card h3 { margin-bottom: 2px; }
.res-card p { margin: 0; font-size: .9rem; }
.res-card > div:nth-child(2) { flex: 1; }
.res-icon { width: 50px; height: 50px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.res-group { margin-top: 22px; }
.group-title { font-size: 1.1rem; color: var(--brand-dark); }
.res-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.res-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.res-row:last-child { border-bottom: 0; }
.res-row p { margin: 2px 0 0; font-size: .88rem; }

.test-card { color: var(--text); }
.test-card:hover { border-color: var(--brand); text-decoration: none; }
.test-card .res-icon { margin-bottom: 12px; }
.note { margin-top: 20px; background: var(--accent-soft); border-color: #fac775; }

/* ----- forms ----- */
.form label { display: block; font-weight: 500; margin-bottom: 14px; font-size: .95rem; }
.form input, .form textarea, .form select {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.alert.success { background: #eaf3de; color: #27500a; }
.alert.error { background: #fcebeb; color: #791f1f; }
.alert.warn { background: #faeeda; color: #633806; font-weight: 400; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ----- footer ----- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 50px; padding-top: 40px; }
.site-footer a { color: var(--footer-text); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.footer-grid h4 { color: var(--footer-text); font-size: 1rem; }
.footer-grid > div > a { display: block; padding: 3px 0; }
.footer-grid > div > a.brand-footer { display: inline-flex; align-items: center; gap: 12px; color: var(--footer-text); margin-bottom: 8px; }
.brand-footer .logo-mark { background: #fff; color: var(--brand); }
.site-footer .muted { color: var(--footer-text); opacity: .75; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(128,128,128,.22); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.social a:hover { transform: translateY(-2px); text-decoration: none; }
.social a { color: #fff !important; transition: transform .15s ease; }
.social a.yt { background: #ff0000; }
.social a.tg { background: #229ed9; }
.social a.wa { background: #25d366; }
.social a.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social a.fb { background: #1877f2; }
.social a.xx { background: #000000; border: 1px solid rgba(255,255,255,.35); }
.footer-bottom { border-top: 1px solid rgba(128,128,128,.3); margin-top: 26px; padding: 16px 18px 22px; font-size: .85rem; color: var(--footer-text); opacity: .75; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ----- top bar ----- */
.top-bar { background: var(--topbar-bg); color: var(--topbar-text); font-size: .86rem; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 10px; }
.top-left, .top-right { display: flex; align-items: center; gap: 16px; }
.top-right { gap: 8px; }
.top-bar a { color: var(--topbar-text); display: inline-flex; align-items: center; gap: 6px; }
.top-bar a:hover { text-decoration: none; opacity: .85; }
.top-left i { font-size: 16px; color: var(--accent); }
.top-ico { width: 28px; height: 28px; border-radius: 50%; justify-content: center; color: #fff !important; font-size: 16px; }
.top-ico.tg { background: #229ed9; }
.top-ico.yt { background: #ff0000; }
.top-app { background: var(--accent); color: #2b1b02 !important; border-radius: 999px; padding: 3px 11px 3px 8px; font-weight: 700; font-size: .8rem; }
.top-app i { font-size: 16px; }
@media (max-width: 600px) { .top-text:not(.top-phone) { display: none; } .top-left { gap: 12px; } }

/* ----- background images for headings ----- */
.page-head.has-img, .hero.has-img { background-size: cover; background-position: center; position: relative; border-bottom: 0; }
.page-head.has-img::before, .hero.has-img::before { content: ''; position: absolute; inset: 0; background: rgba(10, 12, 30, .55); }
.page-head.has-img .container, .hero.has-img .container { position: relative; }
.page-head.has-img h1, .page-head.has-img p { color: #fff; }
.page-head.has-img { padding: 56px 0 48px; }
.hero.has-img { color: #fff; }
.hero.has-img .btn-outline { color: #fff; }

/* ----- DCA questions ----- */
.small { font-size: .88rem; }
.mains-card { margin-bottom: 26px; border-left: 4px solid var(--accent); border-radius: 0; }
.mains-q { font-size: 1.08rem; font-weight: 500; margin: 10px 0 12px; white-space: pre-wrap; }
.hint summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.hint-body { margin-top: 10px; padding: 12px 14px; background: var(--bg); border-radius: 8px; white-space: pre-wrap; font-size: .95rem; }
.quiz-head { margin-bottom: 2px; }
.score { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 4px 12px; font-size: .9rem; white-space: nowrap; }
.mcq-list { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 14px; }
.mcq-q { white-space: pre-wrap; font-weight: 500; margin-bottom: 12px; }
.qno { color: var(--brand); font-weight: 700; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%; font-family: inherit; font-size: .97rem; line-height: 1.5;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); }
.opt:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); }
.opt[disabled] { cursor: default; }
.opt-l { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; }
.opt.right { border-color: #3b6d11; background: #eaf3de; }
.opt.right .opt-l { background: #3b6d11; color: #fff; border-color: #3b6d11; }
.opt.wrong { border-color: #a32d2d; background: #fcebeb; }
.opt.wrong .opt-l { background: #a32d2d; color: #fff; border-color: #a32d2d; }
.mcq-result { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: .94rem; }
.mcq-result p { margin: 0 0 4px; }
.mcq.is-right .res-label { color: #3b6d11; }
.mcq.is-wrong .res-label { color: #a32d2d; }
.res-ex { white-space: pre-wrap; }
