/* ============================================================
   The Tunisian Engineers — Shared Theme (Dark + Light)
   ============================================================ */

/* --- Dark mode variables (default) ------------------------- */
:root {
  --accent:       #7c8edb;
  --accent-2:     #a08cc8;
  --gradient:     linear-gradient(135deg, #7c8edb 0%, #a08cc8 100%);

  --bg:           #0d1117;
  --bg-2:         #161b27;
  --bg-3:         #1c2133;
  --bg-hero:      linear-gradient(135deg, #161b50 0%, #2a1a60 100%);
  --navbar-bg:    rgba(11, 14, 20, 0.97);

  --text:         #c9d1d9;
  --text-h:       #f0f6fc;
  --text-muted:   #8b949e;

  --border:       rgba(124, 142, 219, 0.14);
  --border-hover: rgba(124, 142, 219, 0.45);

  --shadow:       0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 8px 40px rgba(124, 142, 219, 0.18);
  --radius:       12px;
  --radius-lg:    16px;
  --t:            all 0.3s ease;
}

/* --- Light mode variables ---------------------------------- */
html.light-mode {
  --bg:           #f5f6fa;
  --bg-2:         #ffffff;
  --bg-3:         #eef0f7;
  --bg-hero:      linear-gradient(135deg, #1e2d8a 0%, #4a2a80 100%);
  --navbar-bg:    rgba(255, 255, 255, 0.97);

  --text:         #2d3448;
  --text-h:       #111827;
  --text-muted:   #6b7280;

  --border:       rgba(90, 100, 160, 0.15);
  --border-hover: rgba(90, 100, 160, 0.4);

  --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 40px rgba(124, 142, 219, 0.2);
}

/* Light mode overrides for hardcoded dark values */
html.light-mode .dropdown-menu {
  background: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}
html.light-mode .accordion-button { color: var(--text-h) !important; }
html.light-mode .accordion-button::after { filter: invert(1) sepia(1) hue-rotate(200deg); }
html.light-mode .navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08) !important; }
html.light-mode { background-image: none !important; }

/* --- Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 60%, rgba(124, 142, 219, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(160, 140, 200, 0.06) 0%, transparent 70%) !important;
  background-attachment: fixed !important;
  color: var(--text) !important;
  min-height: 100vh;
}

/* --- Accessibility ----------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--accent); color: #fff; padding: .6rem 1.2rem;
  border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Coming Soon badge ------------------------------------- */
.badge-soon {
  display: inline-block;
  background: var(--bg-3);
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(124, 142, 219, 0.3);
  white-space: nowrap;
  vertical-align: middle;
}

/* --- Header placeholder (prevent layout shift) -------------- */
#header { min-height: 97px; }
@media (max-width: 768px) { #header { min-height: 77px; } }

/* --- Page Progress Bar ------------------------------------- */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient);
  z-index: 9999;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(124, 142, 219, 0.6);
  pointer-events: none;
}

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(124, 142, 219, 0.28); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 142, 219, 0.5); }

/* --- Navbar ------------------------------------------------ */
.navbar {
  background: var(--navbar-bg) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 var(--border) !important;
}
.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}
.nav-link { color: var(--text) !important; }
.nav-link:hover { color: var(--accent) !important; }
.brand-name {
  background: var(--gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
.tagline { color: var(--text-muted) !important; }
.dropdown-menu {
  background: #14182a !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}
.dropdown-item { color: var(--text) !important; border-radius: 6px !important; }
.dropdown-item:hover {
  background: rgba(124, 142, 219, 0.1) !important;
  color: var(--accent) !important;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(124,142,219,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.navbar-toggler { border-color: var(--border) !important; }

/* --- Hero Section ------------------------------------------ */
.hero-section {
  background: var(--bg-hero) !important;
  border-bottom: 1px solid var(--border) !important;
}
.hero-section h1,
.hero-section p { color: rgba(255,255,255,0.97) !important; }

/* --- Section Headers --------------------------------------- */
h1, h2, h3, h4, h5, h6 { color: var(--text-h) !important; }
p, li { color: var(--text) !important; }
.text-muted, small, .stat-label, .count-text p {
  color: var(--text-muted) !important;
}

/* --- Cards ------------------------------------------------- */
.stat-card,
.feature-card,
.content-card,
.value-item,
.contact-card,
.count-bar,
.controls-container,
.table-container,
.form-section,
.news-card,
.accordion-body,
.empty-state {
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text) !important;
}
.stat-card:hover,
.feature-card:hover,
.content-card:hover,
.value-item:hover,
.contact-card:hover,
.news-card:hover {
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--border-hover) !important;
}

/* Index page — stats wrapper */
.stats-section .container > div {
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

/* Card accent lines */
.feature-card { border-top: 3px solid var(--accent) !important; }
.content-card { border-left: 4px solid var(--accent) !important; }
.news-card::before { background: var(--gradient) !important; }

/* Stat numbers & icons */
.stat-number { color: var(--accent) !important; }
.stat-card i { color: var(--accent) !important; }

/* Feature card text */
.feature-card p { color: var(--text) !important; }
.feature-card a { color: var(--accent) !important; }
.feature-card a:hover { color: var(--accent-2) !important; }
.feature-icon {
  background: var(--gradient) !important;
}

/* --- Forms ------------------------------------------------- */
.form-control, .form-select {
  background: var(--bg-3) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.form-control:focus, .form-select:focus {
  background: var(--bg-3) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 142, 219, 0.18) !important;
}
.form-control::placeholder { color: var(--text-muted) !important; opacity: 1 !important; }
.form-label { color: var(--text) !important; }

/* Filter dropdowns */
.filter-toggle {
  background: var(--bg-3) !important;
  border: 2px solid var(--border) !important;
  color: var(--text) !important;
}
.filter-toggle:hover { border-color: var(--accent) !important; }
.filter-toggle.active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 142, 219, 0.15) !important;
}
.filter-options {
  background: var(--bg-2) !important;
  border: 2px solid var(--border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}
.filter-search { border-bottom-color: var(--border) !important; }
.filter-search input {
  background: var(--bg-3) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.filter-search input:focus { border-color: var(--accent) !important; outline: none; }
.filter-option:hover { background: rgba(124, 142, 219, 0.1) !important; }
.filter-option label { color: var(--text) !important; }
.filter-option input[type="checkbox"] { accent-color: var(--accent) !important; }

/* Dividers */
.sort-controls { border-bottom: 2px solid var(--border) !important; }
.active-filters { border-top: 2px solid var(--border) !important; }

/* --- Table ------------------------------------------------- */
.table { color: var(--text) !important; }
.table > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--text) !important;
}
table thead th {
  background: rgba(124, 142, 219, 0.08) !important;
  color: var(--text-h) !important;
  border-color: var(--border) !important;
}
table td { border-color: rgba(124, 142, 219, 0.07) !important; }
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(124, 142, 219, 0.04) !important;
  --bs-table-accent-bg: rgba(124, 142, 219, 0.04) !important;
}
.table > tbody > tr:hover > td {
  background-color: rgba(124, 142, 219, 0.08) !important;
}
.table-bordered > :not(caption) > * { border-color: var(--border) !important; }

/* --- Accordion -------------------------------------------- */
.accordion-button {
  background: var(--bg-2) !important;
  color: var(--text-h) !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
}
.accordion-button:not(.collapsed) {
  background: rgba(124, 142, 219, 0.1) !important;
  color: var(--accent) !important;
  box-shadow: 0 6px 25px rgba(124, 142, 219, 0.15) !important;
}
.accordion-button::after {
  filter: invert(1) brightness(1.5) !important;
}
.accordion-item {
  background: transparent !important;
  border: none !important;
}

/* Accordion subsection header */
h5.subsection-header {
  color: var(--accent) !important;
  border-bottom: 2px solid var(--border) !important;
}

/* --- Contact page ------------------------------------------ */
.contact-card h3 { color: var(--text-h) !important; }
.contact-card p, .contact-card a:not(:hover) { color: var(--text-muted) !important; }
.social-link { background: var(--bg-3) !important; box-shadow: var(--shadow) !important; }

/* --- Alerts ------------------------------------------------ */
.alert-success {
  background: rgba(40, 167, 69, 0.12) !important;
  border-color: rgba(40, 167, 69, 0.3) !important;
  color: #6ee7a0 !important;
}
.alert-danger {
  background: rgba(220, 53, 69, 0.12) !important;
  border-color: rgba(220, 53, 69, 0.3) !important;
  color: #f87171 !important;
}

/* --- News -------------------------------------------------- */
.news-category {
  background: rgba(124, 142, 219, 0.12) !important;
  color: var(--accent) !important;
}
.news-title { color: var(--text-h) !important; }
.news-summary { color: var(--text) !important; }
.news-description { color: var(--text-muted) !important; }
.news-date { color: var(--text-muted) !important; }
.news-date i { color: var(--accent) !important; }

/* --- Footer ------------------------------------------------ */
.modern-footer {
  background: rgba(10, 12, 18, 0.98) !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.4) !important;
}
.footer-top { border-bottom-color: var(--border) !important; }
.footer-section a { color: var(--text-muted) !important; }
.footer-section a:hover { color: var(--accent) !important; }
.footer-section p { color: var(--text-muted) !important; }
.footer-bottom { color: var(--text-muted) !important; }
.footer-bottom strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

/* --- CTA Section ------------------------------------------ */
.cta-section {
  background: linear-gradient(135deg, #1e2a5e 0%, #2d1b69 100%) !important;
  border: 1px solid var(--border) !important;
}
.cta-section h2, .cta-section p { color: rgba(255,255,255,0.97) !important; }
.cta-section .btn { background: white !important; color: var(--accent) !important; }
.cta-section .btn:hover { color: var(--accent-2) !important; }

/* --- Back to Top ------------------------------------------ */
#backToTop {
  background: var(--gradient) !important;
  box-shadow: 0 4px 15px rgba(124, 142, 219, 0.3) !important;
}

/* --- Skeleton Loaders ------------------------------------- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.skeleton-row {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.skeleton-cell {
  background: var(--bg-3);
  border-radius: 4px;
  height: 14px;
  flex-shrink: 0;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
.skeleton-cell:nth-child(2) { animation-delay: 0.1s; }
.skeleton-cell:nth-child(3) { animation-delay: 0.2s; }
.skeleton-cell:nth-child(4) { animation-delay: 0.3s; }
.skeleton-cell:nth-child(5) { animation-delay: 0.4s; }
.skeleton-cell:nth-child(6) { animation-delay: 0.5s; }
.skeleton-cell:nth-child(7) { animation-delay: 0.6s; }

/* --- Search bar -------------------------------------------- */
.search-bar-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}
.search-bar-wrapper .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar-wrapper input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  background: var(--bg-3) !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  font-size: 1rem;
  transition: var(--t);
}
.search-bar-wrapper input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 142, 219, 0.15) !important;
  outline: none;
}
.search-bar-wrapper input::placeholder { color: var(--text-muted) !important; }
.search-results-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding-left: 0.25rem;
  min-height: 1.2em;
  transition: var(--t);
}

/* --- Highlight matched text -------------------------------- */
mark, .highlight {
  background: rgba(124, 142, 219, 0.28) !important;
  color: var(--text-h) !important;
  border-radius: 2px;
  padding: 0 2px;
}

/* --- AOS fix ----------------------------------------------- */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* --- Page fade-in ------------------------------------------ */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 'backwards' (not 'both') so the finished animation releases opacity control —
   pages animate their own content afterwards (e.g. ranks year-switch fade) */
main { animation: pageFadeIn 0.4s ease backwards; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .hero-section h1 { font-size: 2rem !important; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-nav {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.breadcrumb {
  background: transparent;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
.breadcrumb-item a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb-item a:hover { color: var(--accent-2); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ============================================================
   NAVBAR — extracted from header.html
   ============================================================ */
.navbar-brand {
  position: relative;
  padding: 0.5rem 0;
  transition: transform 0.3s ease;
}
.navbar-brand:hover { transform: translateY(-2px); }
.navbar-brand img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}
.navbar-brand .brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-transform: none;
  position: relative;
  display: inline-block;
}
.navbar-brand .brand-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.navbar-brand:hover .brand-name::after { opacity: 1; }
.navbar-brand .tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: -2px;
}

.nav-link {
  position: relative;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 142, 219, 0.1) 0%, rgba(160, 140, 200, 0.1) 100%);
  transition: left 0.3s ease;
  z-index: -1;
}
.nav-link:hover::before { left: 0; }

.nav-item:not(.dropdown) .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-item:not(.dropdown) .nav-link:hover::after { width: 80%; }
.nav-link:active { transform: translateY(0); }

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(124, 142, 219, 0.25); }

.dropdown-menu {
  display: none;
  border-radius: 12px;
  padding: 0.75rem;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

@media (min-width: 992px) {
  .dropdown { position: relative; }
  .dropdown:hover > .dropdown-menu,
  .dropdown:focus-within > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
  }
}

.dropdown > .nav-link::after {
  display: inline-block;
  margin-left: 0.4em;
  vertical-align: middle;
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dropdown:hover > .nav-link::after,
.dropdown:focus-within > .nav-link::after { transform: rotate(180deg); }
.dropdown > .nav-link {
  position: relative;
  background-image: var(--gradient);
  background-size: 0 3px;
  background-position: center bottom;
  background-repeat: no-repeat;
}
.dropdown:hover > .nav-link,
.dropdown:focus-within > .nav-link { background-size: 80% 3px; }
.dropdown > .nav-link.active-page { background-size: 80% 3px; }

.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -0.5rem;
  margin-left: -5px;
  min-width: 200px;
  z-index: 1001;
}
.dropdown > .dropdown-menu { min-width: 220px; }

@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu,
  .dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.dropdown-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdown-submenu > a::after {
  margin-left: 0.5em;
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dropdown-submenu:hover > a::after,
.dropdown-submenu:focus-within > a::after { transform: translateX(5px); }

@media (min-width: 992px) {
  .dropdown-menu > li:hover > .dropdown-menu,
  .dropdown-menu > li:focus-within > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  transition: all 0.2s ease;
  display: block;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}
.dropdown-item:active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}
.dropdown-toggle::after { display: none !important; }

@media (max-width: 768px) {
  .navbar-brand .brand-name { font-size: 1.1rem; letter-spacing: 0.3px; }
  .navbar-brand .tagline { font-size: 0.65rem; letter-spacing: 1px; }
  .navbar-brand img { width: 60px; height: 60px; }
}

/* ============================================================
   FOOTER — extracted from footer.html
   ============================================================ */
.modern-footer {
  padding: 3rem 0 2rem 0;
  margin-top: 4rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}
.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 0.6rem; }
.footer-section a {
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}
.footer-section a:hover { transform: translateX(3px); display: inline-block; }
.footer-section p { line-height: 1.6; font-size: 0.95rem; }

.footer-social { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}
.footer-social a:hover { display: inline-flex !important; }
.footer-social a::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.footer-social a:hover::before { opacity: 1; }
.footer-social a i { position: relative; z-index: 1; }
.footer-social a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 25px rgba(124, 142, 219, 0.4);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.9rem;
}
.footer-heart {
  color: #e74c3c;
  animation: heartbeat 1.5s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   PAGE: INDEX
   ============================================================ */
.hero-section { padding: 5rem 0 3rem 0; position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.07)" stroke-width="1" fill="none"/></svg>'); opacity: 0.5; }
.hero-content { position: relative; z-index: 1; }
.hero-section h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; }
.hero-section .lead { font-size: 1.25rem; margin-bottom: 2.5rem; line-height: 1.6; opacity: 0.95; }
.hero-buttons .btn { padding: 1rem 2.5rem; font-weight: 600; border-radius: 8px; transition: all 0.3s ease; margin: 0.5rem; }
.btn-light-custom { background: white; color: #7c8edb; border: none; }
.btn-light-custom:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255,255,255,0.2); color: #a08cc8; }
.btn-outline-light-custom { border: 2px solid rgba(255,255,255,0.7); color: white; background: transparent; }
.btn-outline-light-custom:hover { background: white; color: #7c8edb; transform: translateY(-3px); }
.stats-section { margin: -2rem 0 4rem 0; position: relative; z-index: 10; }
.stat-card { border-radius: 12px; padding: 2rem; text-align: center; transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-8px); }
.stat-card i { font-size: 3rem; margin-bottom: 1rem; }
.stat-card .stat-number { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.stat-card .stat-label { font-size: 0.95rem; font-weight: 500; }
.features-section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; max-width: 700px; margin: 0 auto; }
.feature-card { border-radius: 12px; padding: 2.5rem; height: 100%; transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-8px); }
.feature-icon { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.feature-icon i { font-size: 2rem; color: white; }
.feature-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.feature-card h3 .badge { font-size: 0.6rem; padding: 0.35rem 0.65rem; font-weight: 600; }
.feature-card p { line-height: 1.7; margin-bottom: 1.5rem; }
.feature-card a { font-weight: 600; text-decoration: none; transition: all 0.3s ease; }
.feature-card a:hover { text-decoration: underline; }
.cta-section { border-radius: 20px; padding: 4rem 2rem; text-align: center; margin: 4rem 0 3rem 0; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.07)" stroke-width="1" fill="none"/></svg>'); opacity: 0.3; }
.cta-section h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; position: relative; z-index: 1; }
.cta-section p { font-size: 1.2rem; margin-bottom: 2rem; position: relative; z-index: 1; }
.cta-section .btn { padding: 1rem 3rem; font-weight: 600; border-radius: 8px; border: none; transition: all 0.3s ease; position: relative; z-index: 1; }
.cta-section .btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
#backToTop { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; border: none; border-radius: 50%; color: white; font-size: 1.3rem; cursor: pointer; transition: all 0.3s ease; z-index: 99; display: none; }
#backToTop:hover { transform: translateY(-5px); }

/* ============================================================
   PAGE: ABOUT
   ============================================================ */
.content-card { border-radius: 12px; padding: 2.5rem; margin-bottom: 2rem; transition: all 0.3s ease; }
.content-card:hover { transform: translateX(5px); }
.content-card h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.content-card h2 i { color: var(--accent); font-size: 1.5rem; }
.content-card p { line-height: 1.8; font-size: 1.05rem; margin-bottom: 0; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 2rem; }
.value-item { border-radius: 12px; padding: 2rem; text-align: center; transition: all 0.3s ease; }
.value-item:hover { transform: translateY(-8px); }
.value-item i { font-size: 3rem; color: var(--accent); margin-bottom: 1.5rem; }
.value-item h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; }
.value-item p { line-height: 1.6; margin-bottom: 0; }

/* ============================================================
   PAGE: CONTACT
   ============================================================ */
.contact-card { border-radius: 12px; padding: 2.5rem; transition: all 0.3s ease; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact-card:hover { transform: translateY(-8px); }
.contact-card .icon { width: 80px; height: 80px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; transition: all 0.3s ease; }
.contact-card:hover .icon { transform: scale(1.1); }
.contact-card .icon i { font-size: 2rem; color: white; }
.contact-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.75rem; }
.contact-card p, .contact-card a { font-size: 1.05rem; margin-bottom: 0; }
.contact-card a { text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.contact-card a:hover { text-decoration: underline; }
.form-section { border-radius: 16px; padding: 3rem; margin: 4rem 0 3rem 0; }
.form-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; text-align: center; }
.form-section .subtitle { text-align: center; margin-bottom: 2.5rem; font-size: 1.05rem; }
.form-label { font-weight: 600; margin-bottom: 0.5rem; }
.btn-submit { padding: 0.9rem 3rem; width: 100%; }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(124,142,219,0.3); background: linear-gradient(135deg, #a08cc8 0%, #7c8edb 100%); }
.social-section { text-align: center; padding: 3rem 0; }
.social-section h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 2rem; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.social-link { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none; position: relative; will-change: transform; }
.social-link:not(.coming-soon):hover { transform: translateY(-5px) !important; box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.social-link i { font-size: 1.5rem; transition: color 0.3s ease; }
.social-link.coming-soon { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.social-link-wrapper { position: relative; display: inline-block; }
.coming-soon-badge { position: absolute; top: -8px; right: -8px; background: var(--bg-3); color: var(--accent); border: 1px solid rgba(124, 142, 219, 0.3); font-size: 0.6rem; padding: 0.2rem 0.4rem; border-radius: 6px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index: 10; }
.social-link.linkedin i { color: #0077b5; }
.social-link.x-twitter i { color: #9ba3af; }
.social-link.facebook i { color: #4267B2; }
.social-link.instagram i { color: #E1306C; }
@media (max-width: 768px) { .form-section { padding: 2rem 1.5rem; } }

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */
/* Pill buttons — filter pills on the Ranks & Engineering Path pages */
.pill-btn {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 20px;
  padding: .3rem .9rem;
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  display: inline-block;
}
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.pill-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Gradient action buttons — shared base; per-class rules keep geometry only */
.btn-submit, .btn-other-years, .btn-pdf, .news-link {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

/* ============================================================
   PAGE: NEWS
   ============================================================ */
.news-card { border-radius: 16px; padding: 2rem; margin-bottom: 2rem; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1); position: relative; overflow: hidden; will-change: transform; }
.news-card::before { content: ''; position: absolute; top: 0; left: 0; width: 5px; height: 100%; transition: width 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s cubic-bezier(0.4,0,0.2,1); opacity: 1; z-index: 0; pointer-events: none; }
.news-card:hover { transform: translateY(-5px) !important; }
.news-card:hover::before { width: 100%; opacity: 0.06; }
.news-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; margin-bottom: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); position: relative; z-index: 1; }
.news-image { width: 100%; max-width: 500px; height: auto; border-radius: 12px; margin: 1.5rem auto; display: block; }
.news-category { display: inline-block; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }
.news-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.news-date { font-size: 0.9rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.news-summary { font-size: 1.1rem; font-weight: 500; margin-bottom: 1rem; line-height: 1.6; }
.news-description { line-height: 1.8; margin-bottom: 1.5rem; }
.news-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; position: relative; z-index: 10; }
.news-link:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 20px rgba(124,142,219,0.3); color: white; }
.empty-state { text-align: center; padding: 4rem 2rem; border-radius: 16px; }
.empty-state i { font-size: 4rem; color: var(--accent); margin-bottom: 1.5rem; }
.loading { text-align: center; padding: 3rem; }
.loading i { font-size: 3rem; color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@media (max-width: 768px) { .news-title { font-size: 1.4rem; } }

/* ============================================================
   PAGE: PFE
   ============================================================ */
.count-bar { border-radius: 12px; padding: 1.5rem 2rem; margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.count-info { display: flex; align-items: center; gap: 1rem; }
.count-icon { width: 60px; height: 60px; background: var(--gradient); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.count-text h3 { margin: 0; font-size: 2rem; font-weight: 700; }
.count-text p { margin: 0; font-size: 0.9rem; }
.btn-other-years { padding: 0.75rem 1.5rem; display: inline-flex; align-items: center; box-shadow: 0 4px 15px rgba(124,142,219,0.3); }
.btn-other-years:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,142,219,0.4); color: white; }
.btn-other-years:active { transform: translateY(0); }
.controls-container { border-radius: 12px; padding: 1.5rem 2rem; margin-bottom: 2rem; }
.sort-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1.5rem; }
.filter-controls { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; min-width: 200px; }
.sort-controls label, .filter-group label { font-weight: 600; margin: 0; display: flex; align-items: center; font-size: 0.9rem; }
.sort-controls .form-select, .filter-group .form-select { border-radius: 8px; padding: 0.6rem 1rem; font-weight: 500; transition: all 0.3s ease; cursor: pointer; }
.sort-controls .form-select { max-width: 300px; }
.filter-dropdown { position: relative; min-width: 250px; }
.filter-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; }
.filter-options { position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.5rem; border-radius: 8px; max-height: 300px; display: none; z-index: 1000; overflow: hidden; }
.filter-options.show { display: block; }
.filter-search { padding: 0.75rem; }
.filter-search input { width: 100%; padding: 0.5rem; border-radius: 6px; font-size: 0.9rem; }
.filter-list { max-height: 200px; overflow-y: auto; padding: 0.5rem; }
.filter-option { display: flex; align-items: center; padding: 0.5rem; cursor: pointer; border-radius: 6px; transition: background 0.2s ease; }
.filter-option input[type="checkbox"] { width: 18px; height: 18px; margin-right: 0.75rem; cursor: pointer; }
.filter-option label { margin: 0; cursor: pointer; flex: 1; font-weight: 500; }
.btn-clear-filters { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); color: white; border: none; border-radius: 8px; padding: 0.6rem 1.5rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; height: fit-content; }
.btn-clear-filters:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(220,53,69,0.3); }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; min-height: 20px; }
.filter-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gradient); color: white; padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.filter-badge i { cursor: pointer; transition: transform 0.2s ease; }
.filter-badge i:hover { transform: scale(1.2); }
.table-container { border-radius: 12px; padding: 2rem; overflow-x: auto; }
table thead th { text-align: center; vertical-align: middle; font-weight: 600; padding: 1rem 0.75rem; }
table td { text-align: left; vertical-align: middle; padding: 0.75rem; }
.table th:nth-child(7) { min-width: 200px; width: 20%; }
.badge { font-size: 0.75rem; margin: 2px; padding: 0.4em 0.7em; border-radius: 6px; color: #fff; font-weight: 500; }
.btn-pdf { padding: 0.5rem 1rem; display: inline-block; white-space: nowrap; }
.btn-pdf:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,142,219,0.3); color: white; }

/* ============================================================
   PAGE: INTERNSHIPS
   ============================================================ */
.accordion-button { font-weight: 600; border-radius: 12px !important; margin-bottom: 1rem; padding: 1.25rem 1.5rem; font-size: 1.15rem; transition: all 0.3s ease; }
.accordion-button:hover { box-shadow: 0 6px 25px rgba(124,142,219,0.15) !important; }
.accordion-item { border: none; margin-bottom: 1.5rem; background: transparent; }
.accordion-body { border-radius: 0 0 12px 12px; padding: 1.5rem; }
h5.subsection-header { font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; font-size: 1.1rem; }
.list-group { margin-bottom: 2rem; }
.list-group-item { border: none; border-radius: 10px; margin-bottom: 0.75rem; padding: 0.85rem 1.25rem; background: var(--bg-3) !important; border: 1px solid var(--border) !important; transition: all 0.3s ease; display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; gap: 2rem; }
.list-group-item:hover { transform: translateY(-3px); border-color: var(--border-hover) !important; box-shadow: 0 6px 20px rgba(124,142,219,0.15) !important; }
.list-group-item h5 { margin-bottom: 0.25rem; font-size: 1.05rem; font-weight: 600; }
.list-group-item p { margin-bottom: 0; font-size: 0.9rem; line-height: 1.4; }
.list-group-item .btn { border-radius: 8px; padding: 0.5rem 1.25rem; font-weight: 600; transition: all 0.3s ease; white-space: nowrap; flex-shrink: 0 !important; align-self: center !important; margin-left: auto !important; }
.btn-outline-primary { border: 2px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline-primary:hover { background: var(--gradient); border-color: transparent; color: white; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(124,142,219,0.3); }
.btn-outline-success { border: 2px solid #10b981; color: #10b981; background: transparent; }
.btn-outline-success:hover { background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-color: transparent; color: white; transform: translateY(-2px); }
.btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   PAGE: ENGINEERING
   ============================================================ */
.engineering-page section { margin-top: 3rem; }
.engineering-page .content-card { background: var(--bg-3) !important; }
.engineering-page .feature-card { background: var(--bg-3) !important; }
.engineering-page .accordion-item { background: var(--bg-3) !important; border-radius: 10px !important; overflow: hidden; }
.engineering-page .accordion-button { background: var(--bg-3) !important; }
.engineering-page .accordion-body { background: var(--bg-3) !important; }
.engineering-page .list-group-item {
  border-radius: 8px;
  margin-bottom: 0.5rem;
  padding: 0.6rem 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--accent);
  text-decoration: none;
  display: block;
  font-weight: 500;
}
.engineering-page .list-group-item:hover {
  transform: translateY(-2px);
  color: var(--accent-2);
  text-decoration: none;
}

/* ============================================================
   PAGE: SCHOOL
   ============================================================ */
.school-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.school-info dt { font-weight: bold; }

/* ============================================================
   LIGHT MODE — component overrides
   ============================================================ */
html.light-mode .stat-card,
html.light-mode .feature-card,
html.light-mode .content-card,
html.light-mode .value-item,
html.light-mode .contact-card,
html.light-mode .count-bar,
html.light-mode .controls-container,
html.light-mode .table-container,
html.light-mode .form-section,
html.light-mode .news-card,
html.light-mode .accordion-body,
html.light-mode .empty-state {
  background: var(--bg-2) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.07) !important;
}
html.light-mode .form-control,
html.light-mode .form-select { background: var(--bg-3) !important; color: var(--text) !important; }
html.light-mode .table { color: var(--text) !important; }
html.light-mode .table > :not(caption) > * > * { background-color: transparent !important; }
html.light-mode table thead th { background: var(--bg-3) !important; color: var(--text-h) !important; }
html.light-mode table td { border-color: rgba(90,100,160,.1) !important; }
html.light-mode .breadcrumb-nav { background: var(--bg-2) !important; }
html.light-mode .school-block,
html.light-mode .admin-school { background: var(--bg-2) !important; }
html.light-mode .field-row { background: var(--bg-3) !important; }
html.light-mode .field-row:nth-child(even) { background: rgba(238,240,247,.8) !important; }
html.light-mode .filters-bar { background: var(--bg-2) !important; box-shadow: 0 4px 20px rgba(0,0,0,.08) !important; }
html.light-mode .track-cell { background: rgba(0,0,0,.04) !important; }
html.light-mode .pill-btn { border-color: var(--border) !important; color: var(--text) !important; }
html.light-mode .accordion-item { background: var(--bg-2) !important; }
html.light-mode .accordion-button { background: var(--bg-2) !important; color: var(--text-h) !important; }
html.light-mode .stats-section .container > div { background: var(--bg-2) !important; }
html.light-mode .engineering-page .content-card { background: var(--bg-2) !important; }
html.light-mode .engineering-page .feature-card { background: var(--bg-2) !important; }
html.light-mode .engineering-page .accordion-item { background: var(--bg-2) !important; }
html.light-mode .engineering-page .list-group-item { background: var(--bg-3) !important; }

/* ============================================================
   MOBILE LAYOUT IMPROVEMENTS
   ============================================================ */
@media (max-width: 768px) {
  /* PFE table — stacked cards instead of a horizontally scrolling table */
  .table-container { padding: 1rem !important; }
  .pfe-table thead { display: none; }
  .pfe-table, .pfe-table tbody, .pfe-table tr, .pfe-table td { display: block; width: 100%; border: none !important; }
  .pfe-table { margin-bottom: 0; }
  .pfe-table tr {
    background: var(--bg-3);
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    padding: .3rem .9rem;
    margin-bottom: .9rem;
  }
  .pfe-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .pfe-table td + td { border-top: 1px solid var(--border) !important; }
  .pfe-table td::before {
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    flex-shrink: 0;
  }
  .pfe-table td.row-num { display: none; }
  .pfe-table .cell-v { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; text-align: right; min-width: 0; word-break: break-word; }

  /* Ranks page — tighter grid (column counts are set inline per school by JS) */
  .field-row { gap: .25rem !important; padding: .4rem .5rem !important; }
  .field-row-headers { gap: .25rem !important; }
  .field-name { font-size: .78rem !important; }
  .rank-range { font-size: .8rem !important; }
  .track-cell { padding: .2rem .1rem !important; }
  .track-cap { display: none; }

  /* Admin field rows */
  .admin-field-row { grid-template-columns: 1fr !important; }
  .field-row-headers { display: none !important; }

  /* Engineering guide feature cards — full width on mobile */
  .feature-card { padding: 1.5rem !important; }

  /* Hero text scaling */
  .hero-section h1 { font-size: 1.9rem !important; }
  .hero-section p  { font-size: .95rem !important; }

  /* Theme toggle positioning in mobile menu */
  .theme-toggle { width: 100%; justify-content: center; margin-top: .5rem; }
}

/* Smooth theme transition — body-level only to avoid breaking component transitions */
body {
  transition: background-color .25s ease, color .2s ease;
}

/* Verified-data badge — registry entries with "verified": true */
.verified-badge { color: #4da3ff; font-size: .85em; margin-inline-start: .3rem; }
