:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --accent: #e63946;
  --accent-dark: #c1121f;
  --accent-light: #ff6b6b;
  --green: #2cb67d;
  --green-dark: #1e7a3a;
  --orange: #f4a261;
  --yellow: #ffd60a;
  --purple: #a78bfa;
  --teal: #0096c7;
  --bg: #0b0f19;
  --bg-card: #151a2a;
  --bg-sidebar: #151a2a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Inter', 'Segoe UI', Arial, sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   LIGHT THEME OVERRIDES
   ============================================= */

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

.hidden {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

ul {
  list-style: none;
}

.quick-nav-grid {
  touch-action: auto;
}

.container {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 29px;
}

.container-fluid {
  width: 100%;
  padding: 0 29px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container-fluid {
    padding: 0 16px;
  }
}

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-date {
  color: rgba(255, 255, 255, 0.6);
}

.top-bar-divider {
  color: rgba(255, 255, 255, 0.25);
}

.top-bar-link {
  color: rgba(255, 255, 255, 0.78);
  transition: var(--transition);
}

.top-bar-link:hover {
  color: #fff;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  transition: var(--transition);
}

.social-icon svg {
  width: 14px;
  height: 14px;
}

.social-icon.facebook {
  background: #1877f2;
}

.social-icon.twitter {
  background: #000;
}

.social-icon.telegram {
  background: #26a5e4;
}

.social-icon.youtube {
  background: #ff0000;
}

.social-icon:hover {
  transform: scale(1.15) translateY(-2px);
  opacity: 0.92;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  background: var(--bg);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 900;
  transition: background-color 0.22s ease, box-shadow 0.22s ease;
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 53, 128, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  flex-shrink: 0;
}
.logo-icon.logo-icon--image {
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-icon.logo-icon--image .logo-image {
  display: block;
  width: 54px;
  height: 50px;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-icon:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(109, 40, 217, 0.45);
}
.logo-icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-main,
.logo-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-main {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  margin: 0;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fixed auth container — top-right corner */
.auth-fixed-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Login Button (shown when logged out) */
.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6c3ce0);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 2px 16px var(--accent-glow);
  -webkit-tap-highlight-color: transparent;
  animation: fadeDown 0.3s ease-out;
}
.header-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.header-login-btn:active {
  transform: translateY(0) scale(0.97);
}
.header-login-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Profile Wrapper (logged-in state) */
.profile-wrapper {
  position: relative;
}
.profile-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  cursor: pointer;
  object-fit: cover;
  transition: all 0.22s ease;
  box-shadow: 0 2px 12px var(--accent-glow);
  -webkit-tap-highlight-color: transparent;
}
.profile-trigger:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(1.05);
}

/* Profile Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1001;
}
.profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* User info header inside dropdown */
.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.dropdown-user-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
}
.dropdown-user-info .dropdown-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown menu items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.dropdown-item:hover {
  background: rgba(127, 90, 240, 0.08);
}
.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dropdown-item.logout-item {
  color: var(--red);
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
}
.dropdown-item.logout-item svg {
  stroke: var(--red);
}

/* Login Required Modal */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.75);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  padding: 20px;
  animation: fadeUp 0.25s ease-out;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: #141b2d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.35s ease-out;
}

.card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.45;
}

.google-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #ffffff;
  color: #1e293b;
  font-size: 0.925rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-family: inherit;
}

.google-btn:hover {
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.google-btn:active {
  transform: translateY(0);
}

.google-btn img,
.google-btn svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.modal-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #232c42;
}

.modal-divider span {
  padding: 0 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}
.form-group.hidden {
  display: none;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #0c1220;
  border: 1px solid #28334e;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.input-wrapper:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.input-wrapper input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
}

.input-wrapper input::placeholder {
  color: #64748b;
}

.input-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  background-color: #172033;
  border-right: 1px solid #28334e;
  user-select: none;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: #f1f5f9;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.input-wrapper.has-toggle input {
  padding-right: 42px;
}

.btn-primary {
  width: 100%;
  height: 46px;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary:active {
  transform: translateY(0);
}

.card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  text-align: center;
}

.signup-text {
  font-size: 0.85rem;
  color: #94a3b8;
}

.link-btn {
  background: none;
  border: none;
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.link-btn:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.btn-ghost-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 8px 18px;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
  font-family: inherit;
}

.btn-ghost-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── OTP Code Input ── */
.otp-code-input {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.otp-code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.otp-code-input::placeholder {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* ── OTP Sent Info ── */
.otp-sent-info {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.otp-sent-info strong {
  color: var(--accent);
  font-weight: 700;
}

/* ── Resend OTP ── */
.otp-resend-btn {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}
.otp-resend-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ── OTP Status Messages ── */
.otp-status-msg {
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.otp-status-msg.hidden {
  display: none;
}
.otp-status-msg.otp-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.otp-status-msg.otp-success {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}


/* ── Invisible reCAPTCHA container ── */
/* Firebase renders this invisibly; keep it out of the way */
/* Logout button on result screen */
.logout-result-btn {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  background: rgba(228, 88, 88, 0.08);
  border: 1.5px solid rgba(228, 88, 88, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.logout-result-btn:hover {
  background: rgba(228, 88, 88, 0.15);
  border-color: rgba(228, 88, 88, 0.4);
}

.save-status {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
  animation: fadeUp 0.3s ease-out;
}
.save-status.success {
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(44, 182, 125, 0.3);
}
.save-status.error {
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(228, 88, 88, 0.3);
}
.save-status.info {
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(127, 90, 240, 0.3);
}

/* Responsive tweaks for small mobile screens */
@media (max-width: 480px) {
  .auth-fixed-bar {
    top: 12px;
    right: 12px;
    gap: 8px;
  }
  .profile-trigger,
  .header-login-btn,
  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.theme-icon-moon {
  color: #ffb703;
}

.theme-icon-sun {
  color: #f77f00;
}

html:not(.light-theme) .theme-icon-sun {
  display: none;
}

html.light-theme .theme-icon-moon {
  display: none;
}

.mobile-search-toggle {
  display: none;
  /* hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-search-toggle:hover,
.mobile-search-toggle:active {
  background: rgba(0, 53, 128, 0.05);
  color: var(--primary);
}

.mobile-search-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.search-overlay-input-wrapper {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}

#overlay-search-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  background: var(--bg);
  transition: var(--transition);
  box-sizing: border-box;
}

#overlay-search-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.15);
}

.header-search {
  flex: 1;
  max-width: 520px;
  margin-left: auto;
}

.search-box {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 54, 153, 0.25);
}

#search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#overlay-search-input::placeholder {
  color: var(--text-muted);
}

#search-btn {
  background: var(--primary);
  border: none;
  padding: 10px 20px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

#search-btn:hover {
  background: var(--primary-dark);
}

#search-btn svg {
  width: 18px;
  height: 18px;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-nav {
  background: #181b34;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 75px;
  z-index: 800;
}

.nav-inner {
  display: flex;
  align-items: center;
  position: relative;
  padding: 6px 0;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  border-radius: 8px;
  letter-spacing: 0.2px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: #2a2b3d;
}

.nav-link.nav-cta {
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 4px;
}

.nav-link.nav-cta:hover {
  background: var(--primary-dark);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.hamburger:hover,
.hamburger:active {
  background: rgba(0, 53, 128, 0.05);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger:hover span,
.hamburger:active span {
  background: var(--primary);
}

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
.breaking-news-bar {
  background: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  padding: 9px 0;
  overflow: hidden;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.breaking-label {
  background: #b91c1c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(185, 28, 28, 0);
  }
}

.ticker-wrapper {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: inline-flex;
  gap: 60px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

.ticker-track span {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.ticker-track span::before {
  content: '▶';
  margin-right: 8px;
  color: var(--primary-light);
  font-size: 0.7rem;
}

.ticker-track span:hover {
  color: var(--primary-light);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 40px;
  align-items: start;
}

.main-layout.sidebar-left {
  grid-template-columns: 240px 1fr;
}

.main-layout.sidebar-left .content-area {
  order: 2;
}

.main-layout.sidebar-left .sidebar {
  order: 1;
}

/* =============================================
   JOB TABS SWITCHER
   ============================================= */
.job-tabs-container {
  display: flex;
  background: var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  padding: 6px;
  gap: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 53, 128, 0.04);
}

.job-tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  text-align: center;
}

.job-tab:hover {
  background: rgba(109, 40, 217, 0.05);
  color: var(--primary);
}

.job-tab.active {
  color: var(--primary);
  background: var(--bg-card);
  border-bottom: 2.5px solid var(--primary);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.08);
}

.job-tab-content {
  display: none;
  animation: tabFadeIn 0.3s ease;
}

.job-tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .job-tabs-container {
    border-radius: 0;
    margin: 0 -16px 22px -16px;
    /* stretch full width */
    border-left: none;
    border-right: none;
  }

  .job-tab {
    font-size: 0.95rem;
    padding: 12px 10px;
  }
}

/* =============================================
   SECTION BLOCKS
   ============================================= */
.section-block {
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: none;
  margin-bottom: 12px;
  border: none;
  transition: box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.section-block:hover {
  box-shadow: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: none;
  background: transparent;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.view-all-link {
  font-size: 0.82rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  padding: 8px 16px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.view-all-link:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

/* =============================================
   JOIN BANNER
   ============================================= */
.join-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.content-area>.join-banner {
  display: none;
}

#mock-test-banner {
  display: grid !important;
  grid-template-columns: 1fr;
}

.mocktest-card:hover {
  box-shadow: 0 6px 32px rgba(127, 90, 240, 0.35);
}

.join-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
}

.join-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.join-card.whatsapp,
.join-card.telegram-card,
.join-card.mocktest-card {
  background: var(--bg-card);
}

.join-card.whatsapp .join-icon {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-card.mocktest-card .join-icon {
  color: var(--primary);
  background: rgba(109, 40, 217, 0.1);
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-icon svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.mocktest-icon {
  width: 28px;
  height: 28px;
  color: var(--text-primary);
}

.join-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.join-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.join-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 1;
}

.join-btn {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 50px;
  white-space: nowrap;
  border: none;
  transition: var(--transition);
}

.join-card:hover .join-btn {
  background: var(--primary-dark);
}

.sidebar .join-banner {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 0;
}

/* =============================================
   POSTS LIST
   ============================================= */
.posts-list {
  padding: 6px 0;
}

.empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.empty-state-hint {
  font-size: 0.85rem;
  margin-top: 5px;
}

.page-spaced {
  padding-top: 30px;
}

.job-detail-page-header {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.job-detail-header-badge {
  margin-bottom: 15px;
  display: inline-block;
}

.job-detail-title {
  font-size: 2rem;
  margin: 0 0 15px 0;
  line-height: 1.3;
  color: var(--text-primary);
}

.job-detail-meta {
  justify-content: center;
  font-size: 0.95rem;
}

.expired-banner {
  margin-bottom: 24px;
}

.job-other-details {
  margin-top: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.extended-details-content {
  margin-top: 15px;
  border-top: 1px dashed rgba(139, 92, 246, 0.2);
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: clamp(0.9rem, 4vw, 1rem);
  line-height: 1.5;
  color: var(--text-secondary);
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.apply-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.share-buttons-row.job-share-actions {
  margin-top: 20px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.highlight-text {
  color: var(--primary);
}

.empty-state-hint {
  font-size: 0.85rem;
  margin-top: 5px;
}

.post-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.post-item:last-child {
  margin-bottom: 0;
}

.post-item:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

.badge-new {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-hot {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-admit,
.badge-scholarship {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-result {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-expired {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary-dark);
}

.expired-card-item {
  opacity: 0.65;
  background-color: rgba(26, 27, 46, 0.4);
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-title {
  font-weight: 600;
  font-size: clamp(1rem, 4.5vw, 1.15rem);
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 5px;
  transition: var(--transition);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-item:hover .post-title {
  color: var(--primary-light);
}

.seo-intro-text {
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.post-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 500;
}

.post-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
  align-self: center;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.post-item:hover .post-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

/* View Details Button */
.view-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.view-details-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
  transform: translateY(-1px);
}

.view-details-btn:active {
  transform: translateY(0);
}

.view-details-btn.open-btn {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.view-details-btn.open-btn:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}

.extended-details-content {
  border-top: 1px dashed rgba(139, 92, 246, 0.2);
  margin-top: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: clamp(0.9rem, 4vw, 1rem);
  line-height: 1.5;
  color: var(--text-secondary);
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.extended-details-content p {
  margin-bottom: 12px;
}

.extended-details-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.extended-details-content li {
  margin-bottom: 6px;
}

.extended-details-content strong {
  color: var(--text-primary);
}

/* Job Details Accordion */
.post-item.expanded-card {
  background: rgba(139, 92, 246, 0.05);
  border-left: 4px solid var(--primary);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  min-width: 0;
  margin-top: 0;
  opacity: 0;
}

.post-details.expanded {
  margin-top: 12px;
  opacity: 1;
}

.post-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.85rem, 4vw, 0.95rem);
  color: var(--text-secondary);
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.detail-item {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.detail-item.full-width {
  grid-column: span 2;
  flex-direction: column;
}

.detail-item strong {
  color: var(--text-primary);
  flex-shrink: 0;
}

.highlight-date {
  color: var(--primary);
  font-weight: 600;
}

.text-right {
  text-align: right;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.text-left {
  text-align: left;
  width: 100%;
}

.mt-1 {
  margin-top: 4px;
}

/* Table responsive utility */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 12px;
}

.table-responsive table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  border: 1px solid var(--border);
  padding: 8px;
}

.apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 12px 20px;
  min-height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

/* Force wrapping on any raw URL links embedded inside the job details HTML */
.post-details a,
.extended-details-content a {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

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

.share-buttons-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.action-share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  transition: var(--transition);
  text-align: center;
  border: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.action-share-btn svg {
  width: 18px;
  height: 18px;
  margin-bottom: 4px;
}

.action-share-btn.whatsapp {
  background: #25D366;
  color: #fff;
}

.action-share-btn.whatsapp:hover {
  background: #128C7E;
  transform: translateY(-1px);
}

.action-share-btn.whatsapp svg {
  fill: currentColor;
}

.action-share-btn.general {
  background: rgba(109, 40, 217, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(109, 40, 217, 0.2);
}

.action-share-btn.general:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.action-share-btn.copy {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.action-share-btn.copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* =============================================
   COMMENTS SECTION
   ============================================= */
.comments-section {
  margin-top: 20px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  padding-top: 16px;
  width: 100%;
}

.comments-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.comments-title::before {
  content: '💬';
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.comment-item {
  background: rgba(139, 92, 246, 0.05);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-light);
}

.comment-item strong {
  color: var(--primary-dark);
  display: block;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 50px;
  outline: none;
  font-size: 0.85rem;
  font-family: var(--font-main);
  transition: var(--transition);
  background: transparent;
  color: var(--text-primary);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.comment-submit-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 18px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* =============================================
   QUICK NAV GRID
   ============================================= */
.quick-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-quick-nav {
  display: none;
}

@media (max-width: 900px) {
}

.qnav-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: var(--transition);
  cursor: pointer;
}

.qnav-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.qnav-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.qnav-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.qnav-count {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.qnav-govt:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}

.qnav-govt:hover .qnav-label,
.qnav-govt:hover .qnav-count {
  color: #fff;
}

.qnav-admit:hover {
  background: linear-gradient(135deg, #1565c0, #2dd4bf);
}

.qnav-admit:hover .qnav-label,
.qnav-admit:hover .qnav-count {
  color: #fff;
}

.qnav-admission:hover {
  background: linear-gradient(135deg, #2dd4bf, #0077b6);
}

.qnav-admission:hover .qnav-label,
.qnav-admission:hover .qnav-count {
  color: #fff;
}

.qnav-scholarship:hover {
  background: linear-gradient(135deg, #f57f17, #fbbf24);
}

.qnav-scholarship:hover .qnav-label,
.qnav-scholarship:hover .qnav-count {
  color: #fff;
}

.qnav-private:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.qnav-mocktest {
  border-top: 3px solid #7f5af0;
}

.qnav-mocktest:hover {
  background: linear-gradient(135deg, #7f5af0, #8b5cf6);
}

.qnav-mocktest:hover .qnav-label,
.qnav-mocktest:hover .qnav-count {
  color: #fff;
}

.qnav-private:hover .qnav-label,
.qnav-private:hover .qnav-count {
  color: #fff;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  padding: 13px 16px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Follow Grid */
.follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px;
  gap: 8px;
}

.follow-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.follow-btn:hover {
  transform: scale(1.04);
}

.follow-btn svg {
  width: 22px;
  height: 22px;
}

.follow-btn small {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.88;
}

.follow-btn.fb {
  background: linear-gradient(135deg, #1877f2, #0d6efd);
}

.follow-btn.tg {
  background: linear-gradient(135deg, #26a5e4, #0088cc);
}

.follow-btn.yt {
  background: linear-gradient(135deg, #ff0000, #cc0000);
}

.follow-btn.tw {
  background: linear-gradient(135deg, #111, #333);
}

/* Trending List */
.trending-list {
  padding: 10px 4px;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  transition: var(--transition);
  cursor: pointer;
}

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

.trending-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.trending-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.trending-num.top1 {
  background: var(--primary);
}

.trending-num.top2 {
  background: #f59e0b;
}

.trending-num.top3 {
  background: #22c55e;
}

.trending-num.rest {
  background: var(--text-muted);
}

.trending-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  transition: var(--transition);
}

.trending-item:hover .trending-title {
  color: var(--primary-light);
}

/* Quick Links */
.quick-link-list {
  padding: 8px 0;
}

.quick-link-list li {
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.quick-link-list li:last-child {
  border-bottom: none;
}

.quick-link-list a {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.quick-link-list a:hover {
  color: var(--primary-light);
  background: rgba(255, 255, 255, 0.04);
  padding-left: 22px;
}

/* Widget Search */
.widget-search {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.widget-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  background: transparent;
}

.widget-search input::placeholder {
  color: var(--text-muted);
}

.widget-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.widget-search button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.widget-search button:hover {
  background: var(--primary-dark);
}

/* Ad Widget */
.ad-widget {
  border: 2px dashed rgba(139, 92, 246, 0.3);
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.ad-box {
  padding: 20px 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ad-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.ad-emoji {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.ad-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.ad-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.ad-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* =============================================
   SEARCH OVERLAY
   ============================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(139, 92, 246, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 55px 30px 30px;
  position: relative;
  transform: translateY(-20px);
  transition: var(--transition);
}

.search-overlay.active .search-overlay-box {
  transform: translateY(0);
}

.search-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.search-close-btn:hover {
  background: var(--primary);
  color: #fff;
}

.search-overlay-box h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-right: 40px;
  line-height: 1.4;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  padding-left: 8px;
}

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

.search-result-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow-wrap: break-word;
  word-break: break-word;
}

.search-result-title mark {
  background: rgba(255, 243, 205, 0.2);
  color: #fff3cd;
  padding: 1px 2px;
  border-radius: 2px;
}

.no-results {
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: #111;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  color: rgba(255, 255, 255, 0.7);
  margin-top: 40px;
}

.footer-top {
  padding: 50px 0 35px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.footer-col p {
  font-size: 0.86rem;
  line-height: 1.7;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.f-social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.f-social:hover {
  transform: scale(1.15);
}

.f-social svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.f-social.fb:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.f-social.tg:hover {
  background: #26a5e4;
  border-color: #26a5e4;
}

.f-social.yt:hover {
  background: #ff0000;
  border-color: #ff0000;
}

.footer-link-list li {
  margin-bottom: 8px;
}

.footer-link-list a {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-link-list a::before {
  content: '›';
  color: var(--primary);
  font-size: 1rem;
}

.footer-link-list a:hover {
  color: #fff;
  padding-left: 4px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.newsletter-form input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.newsletter-form input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

.newsletter-form button {
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--primary-dark);
}

.success-msg {
  display: none;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #22c55e;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  padding: 18px 0;
  background: #0a0a0a;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-bottom p {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom strong {
  color: rgba(255, 255, 255, 0.9);
}

.back-to-top {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* =============================================
   RESPONSIVE MEDIA QUERIES
   ============================================= */
@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr 280px;
    gap: 18px;
  }

  .main-layout.sidebar-left {
    grid-template-columns: 220px 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

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

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .main-layout.sidebar-left {
    grid-template-columns: 1fr;
  }

  .main-layout.sidebar-left .sidebar {
    display: none;
  }

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

  .join-banner {
    grid-template-columns: 1fr;
  }

  .content-area>.join-banner {
    display: grid;
    margin-top: 16px;
  }

  .sidebar>.join-banner {
    display: none;
  }

  #search-widget {
    display: none;
  }
}

@media (max-width: 700px) {
  .top-bar {
    overflow: hidden;
  }

  .top-bar-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
  }

  .top-bar-left .top-bar-date,
  .top-bar-divider {
    display: none;
  }

  .top-bar-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .top-bar-right {
    justify-content: center;
    flex-shrink: 0;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--bg);
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: visible;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .header-search {
    display: none;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-search-toggle {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 67px;
    /* Sits exactly beneath the 66px sticky header */
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 67px);
    overflow-y: auto;
    background: var(--bg-card);
    z-index: 9999;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    border-top: 1px solid var(--border);
    border-bottom: 3px solid var(--primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    border-bottom: 1px solid var(--border);
    width: 100%;
    color: var(--text-primary);
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--primary-light);
    border-bottom-color: var(--border);
  }

  .main-nav {
    position: static;
    overflow: visible;
  }

  .breaking-news-bar {
    position: static;
  }

  /* Hide the sidebar WhatsApp banner on mobile so only the top one is visible */
  #join-banner {
    display: none;
  }

  /* 2×2 grid for Quick Nav so all items fit on screen without scrolling */
  .quick-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 4px;
    overflow-x: visible;
  }

  .quick-nav-grid::-webkit-scrollbar {
    display: none;
  }

  .qnav-box {
    flex: none;
    padding: 14px 10px;
  }

  /* Structural collapse of inner elements */
  .post-details-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .detail-item.full-width {
    grid-column: span 1;
    flex-direction: column;
  }

  .text-right {
    text-align: right;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .detail-item.full-width .text-right,
  .detail-item.full-width .text-left {
    text-align: left;
  }

  .view-details-btn,
  .apply-btn {
    white-space: normal;
    word-break: break-word;
  }

  /* Stack and self-align footer zones */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-link-list a {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* 1. Fix mobile text cut-off (forces text to wrap and stay inside the screen) */
.post-item {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.post-content {
  flex: 1 1 0%;
  min-width: 0 !important;
}

.post-title {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  display: block;
}

/* Styling for the JS keyword highlighter */
.exam-highlight-badge {
  background-color: var(--primary);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-block;
  margin: 0 2px;
  border: 2px solid var(--primary-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Final structural layout fix for mobile viewports under 700px */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  /* Stack footer items */
  .join-banner {
    grid-template-columns: 1fr;
  }

  .content-area>.join-banner {
    display: grid;
    margin-top: 16px;
  }

  .sidebar>.join-banner {
    display: none;
  }

  #search-widget {
    display: none;
  }

  /* Collapse details grid early on tablet to avoid flex row horizontal overflow */
  .post-details-grid {
    grid-template-columns: 1fr;
  }

  /* FIX: Reset the layout to keep it as a row, just tighten the spacing */
  .post-item {
    flex-direction: row;
    padding: 12px 18px 12px 12px;
    /* Increased right padding for visual balance */
    gap: 10px;
  }

  /* Removed static post-title font override, now handled globally by clamp() */

  .post-badge {
    font-size: 0.65rem;
    padding: 2px 4px;
    white-space: nowrap;
    /* Prevents badge text from breaking */
  }
}

/* Ultra-small mobile screens (320px - 480px) */
@media (max-width: 480px) {

  /* Stack detail items to prevent horizontal cutoff */
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .text-right {
    text-align: left;
  }

  /* Tighter padding on job cards, but preserve right-side spacing */
  .post-item {
    padding: 12px 16px 12px 10px;
    /* Extra space on the right */
    gap: 8px;
  }

  .post-badge {
    padding: 2px 4px;
    font-size: 0.6rem;
  }

  .post-arrow {
    margin-left: auto;
  }

  /* Reduce header spacing */
  .section-header {
    padding: 12px 10px;
  }

  .section-title {
    font-size: 0.9rem;
  }

  .view-all-link {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* Reduce top bar header elements size */
  .logo-main {
    font-size: 1.2rem;
  }

  .logo-sub {
    font-size: 0.65rem;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* Make container padding tighter */
  .container {
    padding: 0 10px;
  }
}

/* =============================================
   JOIN BANNERS (WhatsApp + Mock Test)
   ============================================= */
.join-banner {
  display: none;
  /* Hidden on desktop by default; shown by sidebar or mobile rules */
  margin-bottom: 14px;
}

.sidebar>.join-banner {
  display: block;
  /* Sidebar banners always visible on desktop */
}

.join-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

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

.join-card.whatsapp,
.join-card.mocktest-card {
  background: var(--bg-card);
}

.join-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-icon svg {
  width: 28px;
  height: 28px;
}

.join-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.join-title {
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-heading);
}

.join-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.join-btn {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  border: 1.5px solid var(--primary);
}

.join-card:hover .join-btn {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* =============================================
   MOBILE TOP JOIN (shown only on mobile)
   ============================================= */
.mobile-top-join {
  display: none;
}

/* =============================================
   MOBILE BOTTOM NAVIGATION BAR
   ============================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.mobile-nav-item .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--primary);
}

/* Show mobile elements on ≤900px */
@media (max-width: 900px) {
  .mobile-top-join {
    display: block;
    margin-bottom: 14px;
  }

  .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
  }

  /* Add bottom padding to body so content isn't hidden behind bottom nav */
  body {
    padding-bottom: 70px;
  }
}

/* =============================================
   NUCLEAR MOBILE FALLBACK
   ============================================= */
@media screen and (max-width: 768px) {

  /* Lightweight performance fix for mobile scrolling */
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
  }

  /* Ensure fixed headers or absolute icons do not stall the scroll paint layout thread */
  header,
  .main-nav,
  .header-actions {
    position: sticky;
    top: 0;
    z-index: 999;
    will-change: transform;
  }

  /* Guarantee touch inputs register smoothly on icons */
  #search-btn,
  #mobile-search-toggle,
  #hamburger-btn {
    pointer-events: auto;
  }

  /* Retain strict containment only for content containers */
  main,
  section,
  .container,
  .main-layout,
  .section-block,
  [class*="wrapper"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Force the apply buttons and job cards to fit and stack vertically
       — exclude mobile nav items and join banner buttons */
  .post-details .apply-btn,
  .post-details .apply-button,
  .post-details a[class*="btn"],
  .post-details button:not(.action-share-btn) {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }
}

/* =============================================
   TRENDING EXAM BANNER
   ============================================= */
.trending-exam-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid #7c3aed;
  border-radius: var(--radius-lg);
  margin-top: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.trending-exam-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.25);
}

.trending-badge-wrapper {
  flex-shrink: 0;
}

.trending-live-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  border-radius: 50px;
  letter-spacing: 0.5px;
  animation: pulse-live 2s infinite;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

@keyframes pulse-live {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-exam-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.trending-exam-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.trending-helper-note {
  font-size: 0.76rem;
  color: var(--primary-light);
  font-weight: 600;
}

.trending-exam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  text-decoration: none;
  flex-shrink: 0;
}

.trending-exam-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.trending-exam-btn:active {
  transform: translateY(0);
}

/* Responsive details */
@media (max-width: 768px) {
  .trending-exam-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .trending-exam-btn {
    width: 100%;
    padding: 14px;
  }
}

/* Responsive design for small mobile screens — header layout is handled by
   the 700px breakpoint above; only keep non-header tweaks here if needed. */

/* =============================================
   SCHOLARSHIP GRID AND CARDS
   ============================================= */
.scholarship-grid,
.result-admit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 10px 0;
}

.scholar-card {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.scholar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.scholar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.scholar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.scholar-icon-wrap {
  width: 38px;
  height: 38px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.scholarship-section,
.result-admit-section {
  margin-top: 30px;
}

.scholar-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scholar-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scholar-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

.scholar-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.s-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.s-meta-item span {
  font-size: 0.9rem;
}

.scholar-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(16, 185, 129, 0.15);
}

.scholar-apply-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.scholar-apply-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.scholar-share-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.scholar-share-btn:hover {
  background: #22c55e;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Expired Scholarship Card Override */
.scholar-card.expired-card {
  opacity: 0.7;
  filter: grayscale(0.5);
}

.scholar-card.expired-card::before {
  background: var(--text-muted);
}

.scholar-card.expired-card .scholar-badge {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

.scholar-card.expired-card .scholar-apply-btn {
  background: var(--text-muted);
  box-shadow: none;
}

/* =============================================
   CONTACT MODAL
   ============================================= */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.contact-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.contact-modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  padding: 30px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}
.contact-modal-overlay.hidden .contact-modal-content {
  transform: translateY(20px);
}
.contact-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.contact-close-btn:hover {
  color: var(--text-primary);
}
.contact-modal-content h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  color: var(--text-primary);
}
.contact-modal-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 15px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.form-group .required {
  color: var(--red);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.contact-submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 10px;
}
.contact-submit-btn:hover {
  opacity: 0.9;
}
.contact-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.contact-status {
  margin-top: 15px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}
.contact-status.success {
  color: var(--green);
}
.contact-status.error {
  color: var(--red);
}

/* =============================================
   INFO MODAL (About, Disclaimer, etc.)
   ============================================= */
.info-modal-content {
  max-height: 80vh;
  overflow-y: auto;
}
.info-modal-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.info-modal-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px;
}
.info-modal-body p {
  margin-bottom: 12px;
}
.info-modal-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.info-modal-body ul li {
  margin-bottom: 6px;
}
.info-modal-body a {
  color: var(--primary);
  text-decoration: underline;
}

/* =============================================
   COMPACT CARDS (NEW JOB FEED)
   ============================================= */
.compact-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}
.compact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.compact-card-body .post-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-primary);
}
.compact-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.compact-meta .meta-row {
  display: flex;
  gap: 8px;
}
.compact-card-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}
.compact-btn {
  margin: 0;
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s;
  text-decoration: none;
  box-sizing: border-box;
}
.compact-btn:hover {
  background: var(--primary-dark);
}
.compact-share-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:hover {
  background: var(--border-light);
  color: var(--text-primary);
}
.icon-btn.whatsapp:hover {
  color: #25D366;
  border-color: #25D366;
}
.icon-btn.mocktest {
  text-decoration: none;
}
.icon-btn.mocktest:hover {
  color: #2c8bea;
  border-color: #2c8bea;
}

/* =============================================
   TOP PROMO BANNER
   ============================================= */
.top-promo-banner {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 100;
  position: relative;
}
.top-promo-banner .promo-btn {
  background: #fff;
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.top-promo-banner .promo-btn:hover {
  background: var(--border-light);
}
@media (max-width: 768px) {
}

/* =============================================
   STRUCTURED JOB DETAILS PAGE
   ============================================= */
.structured-job-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
  width: 96%;
  margin-left: auto;
  margin-right: auto;
}
.job-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.job-section-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 8px;
  font-family: var(--font-heading);
}
.job-details-table {
  width: 100%;
  border-collapse: collapse;
}
.job-details-table th, .job-details-table td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.job-details-table th {
  background: var(--bg);
  width: 35%;
  color: var(--text-secondary);
  font-weight: 600;
}
.job-details-table td {
  color: var(--text-primary);
}
.job-other-details {
  margin-top: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.job-fee-box {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  color: var(--text-primary);
}
.job-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .job-links-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.apply-btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.apply-btn.secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* =============================================
   MOCK TEST CTA — "Value Loop" Button
   ============================================= */
.mocktest-cta-section {
  position: relative;
  margin-top: 36px;
  padding: 0;
  text-align: center;
}

.mocktest-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  animation: ctaGlowPulse 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes ctaGlowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

.mocktest-cta-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 22px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10b981, #0ea5e9, #6366f1);
  background-size: 200% 200%;
  animation: ctaGradientShift 4s ease infinite;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow:
    0 0 20px rgba(16, 185, 129, 0.35),
    0 0 60px rgba(14, 165, 233, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

@keyframes ctaGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.mocktest-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: skewX(-25deg);
  animation: ctaShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaShimmer {
  0% { left: -100%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

.mocktest-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 30px rgba(16, 185, 129, 0.5),
    0 0 80px rgba(14, 165, 233, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.3);
}

.mocktest-cta-btn:active {
  transform: translateY(0) scale(0.98);
}

.mocktest-cta-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mocktest-cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.mocktest-cta-main {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mocktest-cta-sub {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.88;
  letter-spacing: 0.01em;
}

.mocktest-cta-arrow {
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.mocktest-cta-btn:hover .mocktest-cta-arrow {
  transform: translateX(6px);
}

/* Light theme adjustments */

/* Responsive */
@media (max-width: 600px) {
  .mocktest-cta-btn {
    padding: 18px 18px;
    gap: 12px;
    border-radius: var(--radius-md);
  }

  .mocktest-cta-main {
    font-size: 1rem;
  }

  .mocktest-cta-sub {
    font-size: 0.75rem;
  }

  .mocktest-cta-icon {
    font-size: 1.6rem;
  }

  .mocktest-cta-arrow {
    font-size: 1.4rem;
  }
}

/* ── Skeleton Loading Cards ────────────────────── */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: var(--border);
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

/* ── NJU Brand Specific ──────────────────────── */
.logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.logo-accent {
  background: linear-gradient(135deg, #2c8bea, #ed6712);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.logo-light {
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 480px) {
  .logo-main {
    font-size: 1.4rem;
  }
}
@media (max-width: 480px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* =============================================
   EXAM DETAILS SECTION
   ============================================= */

/* Marking Scheme Grid */
.exam-marking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.exam-mark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.exam-mark-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
}
.exam-mark-card.negative::before { background: #ef4444; }
.exam-mark-card.time::before    { background: #f59e0b; }
.exam-mark-card.total::before   { background: #10b981; }
.exam-mark-card.correct::before { background: var(--primary); }

.exam-mark-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  display: block;
}
.exam-mark-card.negative .exam-mark-value { color: #ef4444; }
.exam-mark-card.time    .exam-mark-value  { color: #f59e0b; }
.exam-mark-card.total   .exam-mark-value  { color: #10b981; }

.exam-mark-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

/* Syllabus subject pills */
.exam-syllabus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.exam-subject-pill {
  background: rgba(var(--primary-rgb, 2, 132, 199), 0.1);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 2, 132, 199), 0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Detailed Syllabus List */
.exam-detailed-syllabus {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}
.exam-detailed-syllabus li {
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-card);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.exam-detailed-syllabus li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.exam-topic-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.exam-topic-pill {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
  transition: all 0.2s ease;
}
.exam-topic-pill:hover {
  background: rgba(var(--primary-rgb, 2, 132, 199), 0.05);
  border-color: rgba(var(--primary-rgb, 2, 132, 199), 0.3);
  color: var(--primary);
}

/* Exam pattern table */
.exam-pattern-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.exam-pattern-table th,
.exam-pattern-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  text-align: left;
}
.exam-pattern-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.exam-pattern-table tbody tr:nth-child(even) td {
  background: var(--bg);
}

/* Sub-section headings inside exam section */
.exam-sub-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.exam-sub-heading:first-child { margin-top: 0; }
.exam-sub-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Important note box */
.exam-note-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.exam-note-box strong {
  color: #b45309;
}

/* Responsive */
@media (max-width: 480px) {
  .exam-marking-grid {
    grid-template-columns: 1fr 1fr;
  }
  .exam-mark-value { font-size: 1.3rem; }
}