/* ==========================================================================
   TNPSC Portal - Core Stylesheet & Design System
   Independent TNPSC Exam Preparation Portal (Tamil Nadu)
   Optimized for Performance, Accessibility, and Mobile Usability
   ========================================================================== */

:root {
  --primary: #123B68;
  --primary-dark: #0B2545;
  --primary-light: #1E4F8A;
  --primary-subtle: #EDF3FA;
  --secondary: #1C6E8C;
  --secondary-dark: #145269;
  --secondary-light: #268BB0;
  --accent: #E9A23B;
  --accent-hover: #D68F26;
  --accent-light: #FDF4E6;
  --success: #198754;
  --success-light: #E8F5E9;
  --danger: #C0392B;
  --danger-light: #FDEDEC;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --background: #F5F7FA;
  --surface: #FFFFFF;
  --surface-alt: #F0F4F8;
  --text-primary: #1C2733;
  --text-secondary: #5F6B78;
  --text-muted: #8493A3;
  --border: #DFE5EC;
  --border-dark: #CBD5E1;
  --shadow-sm: 0 1px 3px rgba(18, 59, 104, 0.06), 0 1px 2px rgba(18, 59, 104, 0.04);
  --shadow-md: 0 4px 12px rgba(18, 59, 104, 0.08), 0 2px 4px rgba(18, 59, 104, 0.03);
  --shadow-lg: 0 10px 25px rgba(18, 59, 104, 0.12), 0 4px 8px rgba(18, 59, 104, 0.04);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", "Latha", Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1220px;
  --header-height: 72px;
  --topbar-height: 38px;
  --font-scale: 1;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.28;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

a:hover {
  color: var(--secondary);
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-main {
  flex: 1 0 auto;
  padding-bottom: 3.5rem;
}

/* Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Top Announcement & Accessibility Utility Bar
   ========================================================================== */
.topbar {
  background-color: var(--primary-dark);
  color: #E2E8F0;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 40;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  gap: 1rem;
}

.topbar-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.badge-urgent {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ticker-text {
  color: #F8FAFC;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-text a {
  color: #FEF3C7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.font-resizer {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.font-resizer button {
  background: transparent;
  border: none;
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 2px;
}

.font-resizer button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.lang-toggle {
  background: rgba(233, 162, 59, 0.15);
  color: #FDE68A;
  border: 1px solid rgba(233, 162, 59, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Main Portal Header & Navigation (Ultra-Professional & Ad-Isolated)
   ========================================================================== */
.site-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 20px -4px rgba(18, 59, 104, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 999999 !important;
  isolation: isolate;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.25rem;
}

/* Brand Identity */
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(18, 59, 104, 0.12);
  border: 1.5px solid #E2E8F0;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.site-brand:hover .brand-emblem {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 14px rgba(18, 59, 104, 0.22);
  border-color: #CBD5E1;
}

.brand-emblem img,
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.brand-emblem svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F2D4A;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.72rem;
  color: #1E4F8A;
  font-weight: 600;
  letter-spacing: 0.1px;
  line-height: 1.2;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-link {
  font-size: 0.835rem;
  font-weight: 600;
  color: #334155;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover {
  color: #123B68;
  background-color: #F1F5F9;
  transform: translateY(-1px);
}

.nav-link.active {
  color: #123B68;
  background-color: #EDF3FA;
  font-weight: 700;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2.5px;
  background-color: #E9A23B;
  border-radius: 9999px;
}

/* Header Utilities */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-icon:hover {
  background: #EEF2F6;
  border-color: #94A3B8;
  color: #123B68;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-icon .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.btn-header-cta {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.52rem 1.15rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #123B68 0%, #1A5694 100%) !important;
  color: #FFFFFF !important;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(18, 59, 104, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn-header-cta:hover {
  background: linear-gradient(135deg, #0B2545 0%, #123B68 100%) !important;
  box-shadow: 0 4px 14px rgba(18, 59, 104, 0.32);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--primary-dark);
  cursor: pointer;
}

/* ==========================================================================
   Google AdSense Policy & Menubar Protection Rules
   Prevents Google Auto Ads from breaking navigation, injecting into header,
   or obscuring the menubar with floating intent dialogs.
   ========================================================================== */

/* 1. Prevent any auto-ad from rendering inside header, topbar, or mobile drawer */
.site-header ins.adsbygoogle,
.site-header .google-auto-placed,
.site-header iframe,
.topbar ins.adsbygoogle,
.topbar .google-auto-placed,
.topbar iframe,
.mobile-drawer ins.adsbygoogle,
.mobile-drawer .google-auto-placed {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
}

/* 2. Suppress intrusive Google Auto-Ad "Related Search" / "Ad Intent" popup that overlaps menubar */
.goog-rentry,
.google-anno-skip.goog-rentry,
div[aria-label="மேலும் கண்டறிக"],
div[data-ad-type="intent"],
.google-auto-placed:has(.goog-rentry) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

/* 3. Keep Auto-Ad anchor ads at bottom of screen so they NEVER overlap the sticky header */
ins.adsbygoogle[data-anchor-status="displayed"],
div[id^="aswift_"][style*="position: fixed"][style*="top: 0"] {
  top: auto !important;
  bottom: 0 !important;
}

/* 4. Enforce clear spacing on in-page auto ads so they never push or touch the header */
.google-auto-placed {
  margin-top: 1.25rem !important;
  margin-bottom: 1.25rem !important;
  clear: both !important;
}

/* ==========================================================================
   Mobile Navigation Drawer (Slide-out)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 84%;
  max-width: 340px;
  background: var(--surface);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.drawer-backdrop.active .mobile-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.drawer-close {
  background: transparent;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-links {
  list-style: none;
  padding: 1rem 0;
}

.drawer-links li a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  border-left: 3px solid transparent;
}

.drawer-links li a:hover,
.drawer-links li a.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border-left-color: var(--accent);
}

.drawer-footer {
  margin-top: auto;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: #FAFCFE;
}

/* ==========================================================================
   Mobile Bottom App Navigation Bar (App Experience below 768px)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(18, 59, 104, 0.08);
  z-index: 45;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 60px;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  height: 100%;
  transition: var(--transition);
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.bottom-nav-item.active svg {
  stroke: var(--primary);
  stroke-width: 2.3;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background-color: var(--primary-dark);
  color: #CBD5E1;
  font-size: 0.875rem;
  border-top: 4px solid var(--accent);
}

.footer-top {
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}

.footer-col h3 {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background-color: var(--accent);
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.footer-disclaimer-badge {
  background: rgba(233, 162, 59, 0.12);
  border: 1px solid rgba(233, 162, 59, 0.3);
  color: #FDE68A;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.45;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
  transform: translateX(3px);
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-newsletter-form input {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-size: 0.85rem;
}

.footer-newsletter-form input::placeholder {
  color: #94A3B8;
}

.footer-newsletter-form button {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.footer-newsletter-form button:hover {
  background: var(--accent-hover);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 0 1.5rem;
  font-size: 0.85rem;
  color: #64748B;
  background: rgba(0, 0, 0, 0.15);
}

.footer-bottom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.footer-menu-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-menu-row a {
  color: #CBD5E1;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-menu-row a:hover {
  color: #38BDF8;
  text-decoration: underline;
}

.footer-dot-sep {
  color: #64748B;
  user-select: none;
  font-weight: bold;
}

.footer-copy-text {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 500;
}

/* ==========================================================================
   Toast Notification & Search Modal
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent);
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  max-width: 360px;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Global Search Modal */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.7);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
}

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

.search-modal {
  background: var(--surface);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.search-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-modal-header input {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
  background: transparent;
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem 0;
  list-style: none;
}

.search-item-link {
  display: block;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--surface-alt);
  color: var(--text-primary);
}

.search-item-link:hover {
  background: var(--surface-alt);
}

.search-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.search-item-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Samacheer School Books Standard-wise Table Layout
   ========================================================================== */
.school-books-section {
  margin-bottom: 3.5rem;
}

.std-jump-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
}

.std-jump-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-right: 0.25rem;
}

.std-jump-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.std-jump-pill:hover,
.std-jump-pill:focus {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.standard-book-block {
  margin-bottom: 2.25rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.standard-books-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.35rem;
  letter-spacing: -0.2px;
}

.standard-title-bar {
  width: 72px;
  height: 4px;
  background: #E63946;
  border-radius: 2px;
  margin-bottom: 0.85rem;
}

.school-books-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.5rem;
}

.school-books-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.school-books-table thead th {
  padding: 10px 16px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9375rem;
  text-align: left;
  background: #545B82;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.2px;
}

.school-books-table thead th.th-tamil {
  width: 50%;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.school-books-table thead th.th-english {
  width: 50%;
}

.school-books-table tbody td {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  vertical-align: middle;
}

.school-books-table .td-tamil {
  width: 50%;
  background: #3B7E98;
}

.school-books-table .td-english {
  width: 50%;
  background: #5E467F;
}

.school-books-table .book-table-link {
  color: #FFFFFF !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: underline;
  display: inline-block;
  line-height: 1.45;
  transition: transform 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
}

.school-books-table .book-table-link:hover,
.school-books-table .book-table-link:focus {
  color: #FFFFFF;
  opacity: 0.9;
  transform: translateX(3px);
  text-decoration: underline;
}

/* ==========================================================================
   Samacheer School Books Overview Table (Index Page)
   ========================================================================== */
/* ==========================================================================
   Samacheer School Books Overview (Modern Responsive Cards)
   ========================================================================== */
.standards-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.standard-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.standard-overview-card:hover {
  border-color: #CBD5E1;
  border-left-color: var(--primary);
  box-shadow: 0 4px 14px rgba(27, 75, 120, 0.08);
  transform: translateY(-1px);
}

.std-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.std-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.3;
}

.std-card-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.std-card-title .std-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.std-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #BFDBFE;
  letter-spacing: 0.2px;
}

.std-card-subjects {
  min-width: 0;
  width: 100%;
}

.subject-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.subject-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1E293B;
  text-decoration: none;
  transition: var(--transition);
}

.subject-pill:hover,
.subject-pill:focus {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.std-card-action {
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

.std-action-btn {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
}


