/* --------------------------------------------------
   DESIGN SYSTEM & VARIABLES (ม.5/5 CLASSROOM WEBSITE)
   -------------------------------------------------- */
:root {
  /* Color Palette */
  --primary-color: #1A3C72;
  --primary-light: #2E6AD1;
  --primary-dark: #0F2548;
  --secondary-color: #F5A623;
  --secondary-dark: #D97706;
  --secondary-light: #FBBF24;
  --accent-bg: #F8F9FA;
  --white: #FFFFFF;
  --text-dark: #2D3748;
  --text-muted: #718096;
  --border-color: #E2E8F0;
  
  /* Status Colors */
  --danger-color: #EF4444;
  --danger-bg: #FEE2E2;
  --success-color: #10B981;
  --success-bg: #D1FAE5;
  --info-color: #3B82F6;
  
  /* Timetable Colors */
  --subject-sci: #EBF8FF;
  --subject-sci-border: #bee3f8;
  --subject-sci-text: #2b6cb0;
  
  --subject-math: #FEF3C7;
  --subject-math-border: #fde68a;
  --subject-math-text: #b45309;
  
  --subject-lang: #D1FAE5;
  --subject-lang-border: #a7f3d0;
  --subject-lang-text: #047857;
  
  --subject-social: #F3E8FF;
  --subject-social-border: #e9d5ff;
  --subject-social-text: #6b21a8;
  
  --subject-art: #FCE7F3;
  --subject-art-border: #fbcfe8;
  --subject-art-text: #be185d;
  
  --subject-project: #E2E8F0;
  --subject-project-border: #cbd5e1;
  --subject-project-text: #475569;

  /* Typography */
  --font-header: 'Prompt', 'Kanit', sans-serif;
  --font-body: 'Sarabun', 'Noto Sans Thai', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(26, 60, 114, 0.15), 0 10px 10px -5px rgba(26, 60, 114, 0.04);
  --shadow-gold: 0 10px 15px -3px rgba(245, 166, 35, 0.25);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* --------------------------------------------------
   BASE STYLES & RESET
   -------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 600;
  line-height: 1.3;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--accent-bg);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------
   SCROLL REVEAL ANIMATION
   -------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.reveal-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* Fix stats grid inside stats bar (no double container) */
.stats-bar .stats-grid {
  padding: 0 1.5rem;
}

/* --------------------------------------------------
   TIMETABLE COLOR LEGEND
   -------------------------------------------------- */
.tt-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.tt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.tt-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* --------------------------------------------------
   LOADER & TRANSITIONS
   -------------------------------------------------- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-normal) ease;
}
.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}
.page-loader p {
  font-family: var(--font-header);
  color: var(--primary-color);
  font-weight: 500;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-content {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity var(--transition-normal) ease, transform var(--transition-normal) ease;
}
.fade-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s infinite;
  border-radius: 4px;
}
@keyframes loading-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------
   GLOBAL HEADER (NAVBAR) & FOOTER
   -------------------------------------------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(26, 60, 114, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--secondary-color);
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-fast);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
}
.logo-accent {
  color: var(--secondary-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.logo-divider {
  opacity: 0.3;
}
.logo-sub {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.9;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
}
.nav-link.active {
  border-bottom: 2px solid var(--secondary-color);
  border-radius: 6px 6px 0 0;
  background-color: rgba(255, 255, 255, 0.05);
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-drawer.active {
  right: 0;
}
.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-title {
  color: var(--white);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1.2rem;
}
.drawer-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
}
.drawer-nav {
  padding: 1.5rem 0;
  flex-grow: 1;
  overflow-y: auto;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-header);
  font-weight: 500;
}
.drawer-link:hover, .drawer-link.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.08);
}
.drawer-link.active {
  border-left: 4px solid var(--secondary-color);
}
.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-align: center;
}
.drawer-year {
  color: var(--secondary-color);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Breadcrumbs Banner */
.breadcrumb-container {
  background-color: var(--accent-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 0;
}
.breadcrumb-nav ol {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.breadcrumb-item a {
  color: var(--primary-color);
}
.breadcrumb-item a:hover {
  text-decoration: underline;
}
.breadcrumb-item.active {
  color: var(--text-dark);
  font-weight: 500;
}
.breadcrumb-item:not(:last-child)::after {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* Footer Section */
.main-footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 4rem 0 2rem 0;
  border-top: 5px solid var(--secondary-color);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-info {
  flex: 1 1 500px;
}
.school-title {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}
.class-info {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.school-address {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.school-address i {
  margin-top: 0.3rem;
  color: var(--secondary-color);
}
.footer-social {
  flex: 1 1 300px;
}
.footer-social h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}
.social-icons {
  display: flex;
  gap: 0.8rem;
}
.social-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--white);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}
.social-btn:hover {
  transform: translateY(-4px);
}
.social-btn.facebook:hover { background-color: #1877F2; }
.social-btn.line:hover { background-color: #06C755; }
.social-btn.github:hover { background-color: #24292E; }
.social-btn.youtube:hover { background-color: #FF0000; }

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
}
.btn-primary:hover {
  background-color: var(--secondary-light);
  box-shadow: 0 8px 20px rgba(245, 166, 35, 0.4);
}
.btn-secondary {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}
.btn-outline {
  background: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* --------------------------------------------------
   PAGE 1 — HOME VIEW STYLES
   -------------------------------------------------- */
/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 6rem 0 8rem 0;
  display: flex;
  align-items: center;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}
.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  z-index: 2;
}
.hero-content {
  flex: 1;
}
.hero-school {
  font-family: var(--font-header);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-title {
  font-size: 3.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}
.hero-year {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-graphics {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-svg {
  width: 100%;
  max-width: 480px;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.scroll-indicator:hover {
  color: var(--white);
}
.scroll-indicator i {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Stats Bar */
.stats-bar {
  background-color: var(--secondary-color);
  padding: 2rem 0;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  border-radius: 16px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat-item-card {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border-bottom: 4px solid var(--primary-color);
  transition: transform var(--transition-fast);
}
.stat-item-card:hover {
  transform: translateY(-5px);
}
.stat-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.stat-number {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* About Section */
.about-section {
  background-color: var(--accent-bg);
}
.about-layout {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.about-image-wrap {
  flex: 1;
  position: relative;
}
.about-image {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  border: 4px solid var(--white);
}
.about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-header);
  font-weight: 700;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.about-badge-num {
  font-size: 1.8rem;
  display: block;
  line-height: 1;
}
.about-content {
  flex: 1.2;
}
.about-school-tag {
  color: var(--primary-color);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.about-desc {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}
.about-details {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.about-details li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}
.about-details i {
  color: var(--secondary-color);
  font-size: 1.2rem;
}
.about-quote-box {
  background-color: var(--white);
  border-left: 4px solid var(--secondary-color);
  padding: 1.2rem 1.5rem;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
}
.about-quote-title {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}
.about-quote-text {
  font-style: italic;
  color: var(--text-muted);
}

/* Highlight Section */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.highlight-card {
  background-color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.highlight-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-premium);
}
.highlight-img-wrap {
  height: 200px;
  position: relative;
  overflow: hidden;
}
.highlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.highlight-card:hover .highlight-img {
  transform: scale(1.08);
}
.highlight-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-header);
  font-weight: 500;
}
.highlight-tag.achievement { background-color: var(--secondary-color); color: var(--primary-dark); }
.highlight-tag.announcement { background-color: var(--danger-color); }
.highlight-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.highlight-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.highlight-card-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  line-height: 1.4;
  height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.highlight-card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.highlight-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--primary-color);
  font-family: var(--font-header);
}
.highlight-more-btn:hover {
  color: var(--secondary-color);
}

/* Quick Links Section */
.quicklinks-section {
  background-color: var(--accent-bg);
}
.quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}
.quicklink-card {
  background-color: var(--white);
  padding: 1.8rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.quicklink-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}
.quicklink-icon-wrap {
  width: 60px;
  height: 60px;
  background-color: rgba(26, 60, 114, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  color: var(--primary-color);
  font-size: 1.6rem;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}
.quicklink-card:hover .quicklink-icon-wrap {
  transform: scale(1.1);
  background-color: var(--primary-color);
  color: var(--white);
}
.quicklink-name {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

/* --------------------------------------------------
   GLOBAL SUB-PAGE HERO BANNER
   -------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}
.page-hero.orange-gradient {
  background: linear-gradient(135deg, #E65C00 0%, #F5A623 100%);
}
.page-hero.gold-gradient {
  background: linear-gradient(135deg, #B45309 0%, #F5A623 100%);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.page-hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.page-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Confetti particles for achievements */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* --------------------------------------------------
   PAGE 2 — MEMBERS VIEW STYLES (ใช้ styles จาก section ด้านล่าง)
   -------------------------------------------------- */
/* Committee Section */
.committee-section {
  background-color: var(--white);
  padding-bottom: 2rem;
}

/* Search & Filters */
.search-filter-section {
  background-color: var(--accent-bg);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.search-filter-wrap {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.search-box-wrap {
  flex-grow: 1;
  max-width: 450px;
  position: relative;
}
.search-box-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}
.search-input:focus {
  border-color: var(--primary-color);
}
.filters-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-select {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--text-dark);
  cursor: pointer;
  min-width: 140px;
}
.results-count {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--primary-color);
}

/* Students Grid */
.students-section {
  background-color: var(--white);
  padding-top: 3rem;
}
.students-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}
.student-card {
  background-color: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  cursor: pointer;
  overflow: hidden;
}
.student-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}
.std-no {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-family: var(--font-header);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.std-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--white);
  margin: 0.2rem auto 1.2rem auto;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-sm);
  outline: 2px solid rgba(0,0,0,0.05);
}
.std-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}
.std-nickname {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.std-badge {
  display: inline-block;
  background-color: var(--accent-bg);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Hover extra info overlay panel */
.std-hover-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(26, 60, 114, 0.95) 0%, rgba(15, 37, 72, 0.98) 100%);
  color: var(--white);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
}
.student-card:hover .std-hover-panel {
  transform: translateY(0);
}
.std-hover-title {
  font-family: var(--font-header);
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}
.std-hover-text {
  font-size: 0.9rem;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Student Modal Layout */
.student-modal-card {
  max-width: 650px;
}
.std-modal-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding-top: 1rem;
}
.std-modal-aside {
  flex: 1;
  text-align: center;
}
.std-modal-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 3rem;
  margin: 0 auto 1rem auto;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  outline: 2px solid rgba(0,0,0,0.05);
}
.std-modal-role {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.std-modal-role.normal {
  background-color: var(--primary-color);
  color: var(--white);
}
.std-modal-no {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.std-modal-main {
  flex: 2;
}
.std-modal-name {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}
.std-modal-nickname {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.std-info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.std-info-item {
  display: flex;
  flex-direction: column;
}
.std-info-label {
  font-family: var(--font-header);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.std-info-val {
  font-size: 1.05rem;
  color: var(--text-dark);
}
.std-info-val.quote {
  font-style: italic;
  color: var(--primary-color);
  background-color: var(--accent-bg);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  margin-top: 0.2rem;
}
.std-modal-socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}
.std-social-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background-color: var(--accent-bg);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}
.std-social-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* --------------------------------------------------
   PAGE 3 — ACTIVITIES VIEW STYLES
   -------------------------------------------------- */
/* Upcoming Section */
.upcoming-section {
  background-color: var(--white);
  padding-bottom: 2rem;
}
.upcoming-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.upcoming-banner-card {
  background-color: #E6F7ED;
  border-left: 6px solid var(--success-color);
  border-radius: 0 16px 16px 0;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.upcoming-banner-card:hover {
  transform: translateX(4px);
}
.up-badge {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.up-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.up-meta-list {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.up-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.up-meta-item i {
  color: var(--primary-color);
}
.up-countdown {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.countdown-box {
  background-color: var(--white);
  border: 1px solid var(--success-bg);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  text-align: center;
  min-width: 65px;
  box-shadow: var(--shadow-sm);
}
.countdown-num {
  font-family: var(--font-header);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--success-color);
  display: block;
  line-height: 1.2;
}
.countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.countdown-text {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 600;
  color: var(--success-color);
  white-space: nowrap;
}

/* Vertical Timeline */
.timeline-section {
  background-color: var(--accent-bg);
  position: relative;
}
.timeline-container-el {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
/* Center Line */
.timeline-container-el::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background-color: var(--border-color);
}
.timeline-item-el {
  display: flex;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 4rem;
}
.timeline-item-el:nth-child(even) {
  justify-content: flex-start;
}
/* Dot marker */
.timeline-dot {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  border: 4px solid var(--white);
  z-index: 5;
  box-shadow: var(--shadow-sm);
}
.timeline-card-content {
  width: 45%;
  background-color: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast);
}
.timeline-card-content:hover {
  transform: translateY(-5px);
}
.timeline-item-el:nth-child(even) .timeline-card-content {
  margin-left: 2rem;
}
.timeline-item-el:nth-child(odd) .timeline-card-content {
  margin-right: 2rem;
}
.time-date {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}
.time-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.time-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.time-tags-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.time-tag {
  font-size: 0.75rem;
  background-color: var(--accent-bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Photo Gallery Section */
.gallery-section {
  background-color: var(--white);
}
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  background-color: var(--accent-bg);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.4rem;
  border-radius: 25px;
  font-family: var(--font-header);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.gallery-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.gallery-img-wrap {
  height: 220px;
  overflow: hidden;
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}
.gallery-title-bar {
  padding: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.gallery-actions {
  text-align: center;
}

/* Lightbox Modal */
.lightbox-card {
  background-color: transparent;
  box-shadow: none;
  border: none;
  max-width: 900px;
}
.lightbox-body {
  text-align: center;
}
.lightbox-body img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.lightbox-caption {
  color: var(--white);
  margin-top: 1rem;
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 500;
}
.lightbox-close-btn {
  color: var(--white);
  background: rgba(0,0,0,0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  top: -45px;
  right: 0;
}
.lightbox-close-btn:hover {
  background: var(--secondary-color);
  color: var(--primary-dark);
}

/* --------------------------------------------------
   PAGE 4 — ACHIEVEMENTS VIEW STYLES
   -------------------------------------------------- */
/* Achievement Stats */
.ach-stats-section {
  background-color: var(--white);
  padding-bottom: 2rem;
}
.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.ach-stat-card {
  background-color: var(--accent-bg);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast);
}
.ach-stat-card:hover {
  transform: translateY(-4px);
}
.ach-stat-icon {
  font-size: 2.2rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}
.ach-stat-num {
  font-family: var(--font-header);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}
.ach-stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Spotlight Showcase */
.spotlight-section {
  background-color: var(--accent-bg);
}
.spotlight-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.spotlight-card {
  background-color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: stretch;
}
.spotlight-img-column {
  flex: 1;
  min-height: 350px;
}
.spotlight-img-column img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spotlight-info-column {
  flex: 1.2;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spotlight-tag-badge {
  background-color: #FEF3C7;
  color: #D97706;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.spotlight-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.spotlight-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.spotlight-meta-item {
  font-size: 0.95rem;
}
.spotlight-meta-label {
  font-weight: 700;
  color: var(--text-dark);
}
.spotlight-meta-val {
  color: var(--text-muted);
}
.spotlight-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Spotlight Navigation Dots */
.spotlight-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.spotlight-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}
.spotlight-dot.active {
  background-color: var(--secondary-color);
  transform: scale(1.2);
}

/* GPA Summary Section */
.gpa-section {
  background-color: var(--white);
}
.gpa-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.gpa-card-box {
  flex: 1.2;
  background-color: var(--accent-bg);
  padding: 2.2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}
.gpa-card-box h3 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.gpa-ranges-table {
  width: 100%;
  border-collapse: collapse;
}
.gpa-ranges-table th, .gpa-ranges-table td {
  padding: 1rem;
  text-align: left;
}
.gpa-ranges-table th {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}
.gpa-ranges-table td {
  border-bottom: 1px solid var(--border-color);
}
.gpa-bar-visual-wrap {
  width: 120px;
  background-color: var(--border-color);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.gpa-bar-visual-fill {
  background-color: var(--primary-color);
  height: 100%;
  border-radius: 6px;
}
.gpa-chart-box {
  flex: 1;
  background-color: var(--accent-bg);
  padding: 2.2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.gpa-chart-box h3 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
/* HTML/CSS Bar Chart representation */
.gpa-chart-visual {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 200px;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
}
.gpa-chart-column-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 60px;
}
.gpa-chart-bar {
  width: 40px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height var(--transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.gpa-chart-bar::after {
  content: attr(data-gpa);
  position: absolute;
  top: -25px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-color);
}
.gpa-chart-bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wall of Fame */
.wof-section {
  background-color: var(--accent-bg);
}
.wof-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}
.wof-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 2rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wof-card:hover {
  transform: scale(1.03) rotate(1.5deg);
  box-shadow: var(--shadow-md);
}
.wof-badge {
  color: var(--white);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-block;
  margin-bottom: 1rem;
}
.wof-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 0 auto 1rem auto;
  box-shadow: var(--shadow-sm);
}
.wof-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.wof-award {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Certificate Gallery */
.cert-section {
  background-color: var(--white);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}
.cert-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
}
.cert-img-stub {
  height: 140px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.cert-img-stub i {
  transition: transform var(--transition-fast);
}
.cert-card:hover .cert-img-stub i {
  transform: scale(1.15) rotate(-5deg);
  color: var(--secondary-color);
}
.cert-caption-bar {
  padding: 0.8rem;
  font-size: 0.85rem;
  text-align: center;
}
.cert-title-el {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.1rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.cert-sub-el {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.cert-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 60, 114, 0.9);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-header);
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.cert-card:hover .cert-overlay {
  opacity: 1;
}

/* --------------------------------------------------
   PAGE 5 — TEACHERS VIEW STYLES
   -------------------------------------------------- */
/* Teacher Profile Grid */
.teach-profile-section {
  background-color: var(--white);
  padding-bottom: 2rem;
}
.teach-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.teach-profile-card {
  background-color: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.teach-profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}
.teach-portrait-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: rgba(26, 60, 114, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  outline: 2px solid rgba(0,0,0,0.05);
  color: var(--primary-color);
  font-size: 4rem;
}
.teach-name {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}
.teach-nickname-tag {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-weight: 500;
}
.teach-role-badge {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.teach-meta-box {
  background-color: var(--accent-bg);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
}
.teach-meta-col {
  text-align: center;
}
.teach-meta-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.teach-meta-val {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Expandable Teacher Details */
.teach-details-section {
  background-color: var(--accent-bg);
}
.teach-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.teach-tab-btn {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.teach-tab-btn:hover, .teach-tab-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}
.teach-tab-content {
  background-color: var(--white);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: none;
}
.teach-tab-content.active {
  display: block;
}

.teach-details-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}
.teach-details-col h4 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.teach-edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.teach-edu-list li {
  display: flex;
  gap: 0.6rem;
}
.teach-edu-list i {
  color: var(--secondary-color);
  margin-top: 0.3rem;
}
.teach-awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.teach-awards-list li {
  display: flex;
  gap: 0.6rem;
}
.teach-awards-list i {
  color: var(--secondary-color);
  margin-top: 0.3rem;
}
.teach-phil-box {
  background-color: rgba(245, 166, 35, 0.08);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem 2rem;
  border-radius: 0 12px 12px 0;
  height: fit-content;
}
.teach-phil-lbl {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--secondary-dark);
  margin-bottom: 0.5rem;
}
.teach-phil-txt {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Teaching Schedules */
.teach-schedule-section {
  background-color: var(--white);
}
.schedule-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
.schedule-table th, .schedule-table td {
  border: 1px solid var(--border-color);
  padding: 0.9rem;
  text-align: center;
}
.schedule-table th {
  background-color: var(--accent-bg);
  font-family: var(--font-header);
  font-weight: 600;
}
.schedule-table td.active-slot {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 700;
}

/* Messages from Teachers */
.teach-messages-section {
  background-color: var(--accent-bg);
}
.teach-messages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
/* Premium Lined Paper Box */
.teach-message-card {
  background-color: #FFFDF5;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid #EAE3C8;
  padding: 3rem 2.5rem;
  position: relative;
  background-image: linear-gradient(#f0e9d2 1px, transparent 1px);
  background-size: 100% 2.2rem;
  line-height: 2.2rem;
}
.teach-message-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 3rem;
  bottom: 0;
  width: 1px;
  background-color: #ffb3b3;
}
.msg-hdr-lbl {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: block;
}
.msg-body-txt {
  color: #4A4A4A;
  font-size: 1.05rem;
  text-indent: 1.5rem;
  margin-bottom: 2rem;
}
.msg-signature {
  text-align: right;
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.msg-sig-name {
  font-size: 1.1rem;
}
.msg-sig-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Contacts section */
.teach-contacts-section {
  background-color: var(--white);
}
.teach-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.teach-contact-col h4 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.teach-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.teach-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.teach-contact-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(26, 60, 114, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 0.1rem;
}
.teach-contact-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}
.teach-contact-val {
  font-weight: 600;
  font-size: 1rem;
}
.teach-contact-item.line-click {
  cursor: pointer;
}
.teach-contact-item.line-click:hover .teach-contact-icon {
  background-color: var(--success-color);
  color: var(--white);
}
.teach-contact-office-box {
  background-color: var(--accent-bg);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}
.teach-office-lbl {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}
.teach-office-val {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --------------------------------------------------
   PAGE 6 — ANNOUNCEMENTS & TIMETABLE VIEW STYLES
   -------------------------------------------------- */
/* Urgent Notice Banner */
.urgent-banner-row {
  background-color: var(--white);
  padding: 2rem 0 0 0;
}
.urgent-banner {
  background-color: var(--danger-bg);
  border-left: 6px solid var(--danger-color);
  border-radius: 0 12px 12px 0;
  padding: 1.2rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.urgent-main-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.urgent-banner i.fa-triangle-exclamation {
  color: var(--danger-color);
  font-size: 1.6rem;
  margin-top: 0.2rem;
}
.urgent-banner-title {
  font-family: var(--font-header);
  font-weight: 700;
  color: #7f1d1d;
  font-size: 1.05rem;
}
.urgent-banner-desc {
  color: #991b1b;
  font-size: 0.95rem;
  margin-top: 0.2rem;
}
.urgent-banner-close {
  background: none;
  border: none;
  color: #b91c1c;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
  padding: 0.5rem;
}
.urgent-banner-close:hover {
  transform: scale(1.1);
}

/* Classroom Timetable Section */
.timetable-section {
  background-color: var(--white);
  padding-bottom: 2rem;
}
.tt-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.tt-tabs {
  display: flex;
  gap: 0.5rem;
}
.tt-tab-btn {
  background-color: var(--accent-bg);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.tt-tab-btn:hover, .tt-tab-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}
.tt-export-btn {
  background-color: var(--white);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.tt-export-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.timetable-grid-wrap {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.timetable-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 950px;
}
.timetable-table th, .timetable-table td {
  border: 1px solid var(--border-color);
  padding: 0.8rem;
  text-align: center;
  vertical-align: middle;
}
.timetable-table th {
  background-color: var(--accent-bg);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.9rem;
}
.timetable-table th.time-header {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.timetable-table td.day-cell {
  background-color: var(--accent-bg);
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  width: 100px;
}
.subject-slot {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 60px;
  cursor: default;
}
.subject-slot.clickable {
  cursor: pointer;
}
.subject-slot:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.sub-title-cell {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}
.sub-room-cell, .sub-teacher-cell {
  font-size: 0.75rem;
  display: block;
  opacity: 0.85;
}

/* Timetable Color Codes */
.subject-slot.science { background-color: var(--subject-sci); border-left: 4px solid var(--subject-sci-border); color: var(--subject-sci-text); }
.subject-slot.math { background-color: var(--subject-math); border-left: 4px solid var(--subject-math-border); color: var(--subject-math-text); }
.subject-slot.language { background-color: var(--subject-lang); border-left: 4px solid var(--subject-lang-border); color: var(--subject-lang-text); }
.subject-slot.social { background-color: var(--subject-social); border-left: 4px solid var(--subject-social-border); color: var(--subject-social-text); }
.subject-slot.art { background-color: var(--subject-art); border-left: 4px solid var(--subject-art-border); color: var(--subject-art-text); }
.subject-slot.project { background-color: var(--subject-project); border-left: 4px solid var(--subject-project-border); color: var(--subject-project-text); }
.subject-slot.lunch { background-color: #FFFDF5; border-left: 4px solid #fde68a; color: #b45309; font-weight: 600; }

/* Realtime active slot indicator */
.subject-slot.current-active-class {
  outline: 3px solid var(--secondary-color);
  outline-offset: -3px;
  position: relative;
}
.subject-slot.current-active-class::after {
  content: 'เรียนอยู่ 📚';
  position: absolute;
  top: -10px;
  right: -5px;
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  animation: pulse-badge 1.5s infinite alternate;
}
@keyframes pulse-badge {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.05); }
}

/* Announcements feed list & calendar layout */
.news-feed-section {
  background-color: var(--accent-bg);
}
.news-feed-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}
.news-feed-col h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.news-filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.news-filter-btn {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--font-header);
  cursor: pointer;
}
.news-filter-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.news-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.news-feed-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.news-feed-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.news-card-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.news-badges-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.news-cat-badge {
  background-color: rgba(26, 60, 114, 0.08);
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-header);
  font-weight: 600;
}
.news-prio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.news-prio-dot.high { background-color: var(--danger-color); box-shadow: 0 0 6px var(--danger-color); }
.news-prio-dot.medium { background-color: var(--secondary-color); box-shadow: 0 0 6px var(--secondary-color); }
.news-prio-dot.low { background-color: var(--success-color); box-shadow: 0 0 6px var(--success-color); }

.news-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.news-card-title {
  font-size: 1.15rem;
  color: var(--primary-color);
  margin-bottom: 0.6rem;
}
.news-card-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-readmore-btn {
  color: var(--primary-color);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.news-readmore-btn:hover {
  color: var(--secondary-color);
}

/* Pagination */
.pagination-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.page-num-btn {
  width: 35px;
  height: 35px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.page-num-btn.active, .page-num-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Mini Calendar Widget */
.calendar-widget-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}
.cal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.cal-title-lbl {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}
.cal-nav-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.5rem;
  transition: transform var(--transition-fast);
}
.cal-nav-btn:hover {
  transform: scale(1.1);
  color: var(--secondary-color);
}
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 0.4rem;
}
.cal-day-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.2rem 0;
}
.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 6px;
  position: relative;
  cursor: default;
  font-weight: 500;
}
.cal-day-cell.other-month {
  color: #cbd5e1;
}
.cal-day-cell.today {
  background-color: rgba(26, 60, 114, 0.08);
  color: var(--primary-color);
  font-weight: 700;
}
.cal-day-cell.has-event {
  cursor: pointer;
}
.cal-day-cell.has-event::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  position: absolute;
  bottom: 3px;
  box-shadow: 0 0 4px var(--secondary-color);
}
.cal-day-cell.has-event:hover {
  background-color: var(--accent-bg);
}

/* Tooltip on Calendar hover */
.cal-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.cal-day-cell.has-event:hover .cal-tooltip {
  opacity: 1;
}

/* Quick links hub section */
.ql-hub-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.ql-hub-card h4 {
  font-family: var(--font-header);
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.ql-hub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ql-hub-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--accent-bg);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}
.ql-hub-item:hover {
  transform: translateX(4px);
  border-color: var(--secondary-color);
  background-color: var(--white);
}
.ql-hub-icon {
  width: 35px;
  height: 35px;
  background-color: rgba(26, 60, 114, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.1rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.ql-hub-item:hover .ql-hub-icon {
  background-color: var(--primary-color);
  color: var(--white);
}
.ql-hub-title {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  display: block;
}
.ql-hub-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.1rem;
}

/* News Modal Dialog content */
.news-modal-card {
  max-width: 600px;
}
.news-m-hdr {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.news-m-title {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  padding-top: 0.5rem;
}
.news-m-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.news-m-body {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.7;
}

/* --------------------------------------------------
   GLOBAL MODALS BACKDROP & LAYOUT
   -------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 37, 72, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal) ease;
  padding: 1rem;
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--white);
  border-radius: 20px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 2.5rem;
  transform: translateY(20px);
  transition: transform var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-backdrop.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10;
}
.modal-close:hover {
  background-color: var(--accent-bg);
  color: var(--text-dark);
}

/* --------------------------------------------------
   RESPONSIVE LAYOUT BREAKPOINTS
   -------------------------------------------------- */
@media (max-width: 1200px) {
  /* Stats Bar */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
  
  /* Quicklinks Grid */
  .quicklinks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  /* Global headers */
  .desktop-nav {
    display: none;
  }
  .mobile-toggle-btn {
    display: block;
  }
  
  /* About Layout */
  .about-layout {
    flex-direction: column-reverse;
    gap: 2.5rem;
  }
  .about-image-wrap {
    width: 80%;
    max-width: 450px;
  }
  
  /* Highlights Grid */
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Members Grid */
  .committee-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .committee-card.president {
    grid-column: span 3;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  
  .students-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Achievements */
  .ach-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wof-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gpa-layout {
    flex-direction: column;
    width: 100%;
  }
  .gpa-card-box, .gpa-chart-box {
    width: 100%;
    flex: none;
  }
  
  /* Teachers */
  .teach-profile-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 500px;
    margin: 0 auto;
  }
  .teach-details-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .teach-messages-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .teach-contacts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Announcements */
  .news-feed-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.8rem;
  }
  
  /* Hero Banner */
  .hero-layout {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-graphics {
    width: 80%;
    max-width: 320px;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  /* Highlights Grid */
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  
  /* Quicklinks Grid */
  .quicklinks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Members Grid */
  .committee-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .committee-card.president {
    grid-column: span 2;
  }
  .students-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Student Modal */
  .std-modal-grid {
    flex-direction: column;
    align-items: center;
  }
  .std-modal-aside {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Upcoming Activities Banner */
  .upcoming-banner-card {
    flex-direction: column;
    text-align: center;
    border-left: none;
    border-top: 6px solid var(--success-color);
    border-radius: 0 0 16px 16px;
    padding: 1.5rem;
  }
  
  /* Vertical Timeline Shift to Left-aligned */
  .timeline-container-el::before {
    left: 20px;
  }
  .timeline-dot {
    left: 20px;
  }
  .timeline-item-el {
    justify-content: flex-start;
    margin-bottom: 3rem;
  }
  .timeline-card-content {
    width: calc(100% - 50px);
    margin-left: 45px !important;
    margin-right: 0 !important;
  }
  
  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  /* Achievements */
  .spotlight-card {
    flex-direction: column;
  }
  .spotlight-img-column {
    min-height: 250px;
  }
  .spotlight-info-column {
    padding: 1.8rem;
  }
  .wof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Teachers paper message */
  .teach-message-card {
    padding: 2.2rem 1.5rem;
  }
  
  /* Urgent Announcements Banner */
  .urgent-banner {
    flex-direction: column;
    text-align: center;
  }
  .urgent-main-content {
    flex-direction: column;
    align-items: center;
  }
  .urgent-banner-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* Logo */
  .logo-sub {
    display: none;
  }
  .logo-divider {
    display: none;
  }
  
  /* Quicklinks Grid */
  .quicklinks-grid {
    grid-template-columns: 1fr;
  }
  
  /* Members */
  .committee-grid {
    grid-template-columns: 1fr;
  }
  .committee-card.president {
    grid-column: span 1;
  }
  .students-grid {
    grid-template-columns: 1fr;
  }
  
  /* Achievements */
  .ach-stats-grid {
    grid-template-columns: 1fr;
  }
  .wof-grid {
    grid-template-columns: 1fr;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  
  /* Timetable headers */
  .timetable-table th {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
  .timetable-table td {
    padding: 0.4rem;
  }
  .sub-title-cell {
    font-size: 0.85rem;
  }
}

/* ==================================================
   MULTI-PAGE ADDITIONAL STYLES
   (Added for separated HTML pages)
   ================================================== */

/* Page load fade-in animation */
@keyframes pageLoad {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
body {
  animation: pageLoad 0.35s ease forwards;
}

/* --------------------------------------------------
   TEACHER PAGES — TABS & PROFILES
   -------------------------------------------------- */
.teach-profiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.teach-profile-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.teach-profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium);
}
.teach-portrait-wrap {
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 3rem;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(26,60,114,0.3);
}
.teach-name {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}
.teach-nickname-tag {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}
.teach-role-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--primary-dark);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.teach-meta-box {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--accent-bg);
  border-radius: 10px;
}
.teach-meta-col { text-align: center; }
.teach-meta-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.teach-meta-val {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* Tab Navigation (shared for detail + schedule tabs) */
.teach-tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
}
.teach-tab-btn {
  padding: 0.7rem 1.5rem;
  border: none;
  background: none;
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  border-radius: 6px 6px 0 0;
}
.teach-tab-btn:hover { color: var(--primary-color); }
.teach-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  background: rgba(26,60,114,0.04);
}
.teach-tab-content { display: none; }
.teach-tab-content.active { display: block; }

/* Detail Tab Content Layout */
.teach-details-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2rem;
  background: var(--accent-bg);
  border-radius: 16px;
}
.teach-details-col h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-color);
}
.teach-details-col h4:first-child { margin-top: 0; }
.teach-edu-list, .teach-awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.teach-edu-list li, .teach-awards-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.teach-edu-list li i  { color: var(--success-color); margin-top: 0.2rem; }
.teach-awards-list li i { color: var(--secondary-color); margin-top: 0.2rem; }
.teach-phil-box {
  background: rgba(245, 166, 35, 0.08);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  border-radius: 0 12px 12px 0;
}
.teach-phil-lbl {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-dark, #b8860b);
  margin-bottom: 0.6rem;
  display: block;
}
.teach-phil-txt {
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--text-dark);
}

/* Teacher Messages */
.teach-messages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.teach-message-card {
  background: repeating-linear-gradient(
    to bottom,
    var(--white) 0px, var(--white) 30px,
    #e8f4f8 30px, #e8f4f8 32px
  );
  border-radius: 4px;
  padding: 3rem 2.5rem;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.08), -1px -1px 4px rgba(0,0,0,0.03);
  border-left: 5px solid var(--secondary-color);
  position: relative;
}
.msg-hdr-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1.2rem;
}
.msg-body-txt {
  line-height: 2.15;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}
.msg-signature {
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
  text-align: right;
}
.msg-sig-name {
  display: block;
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
}
.msg-sig-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Teacher Contacts */
.teach-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.teach-contact-col h4 {
  font-family: var(--font-header);
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}
.teach-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.teach-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--accent-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast);
}
.teach-contact-item:hover { border-color: var(--primary-light); }
.teach-contact-item.line-click { cursor: pointer; }
.teach-contact-icon {
  width: 38px; height: 38px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1rem;
  flex-shrink: 0;
}
.teach-contact-lbl { display: block; font-size: 0.75rem; color: var(--text-muted); }
.teach-contact-val {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}
.teach-contact-office-box {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
}
.teach-office-lbl { font-size: 0.8rem; opacity: 0.75; margin-bottom: 0.4rem; color: var(--white); }
.teach-office-val { font-family: var(--font-header); font-weight: 600; color: var(--white); }

/* --------------------------------------------------
   ACHIEVEMENTS PAGE
   -------------------------------------------------- */
.ach-stats-section { background: var(--accent-bg); }
.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.ach-stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-bottom: 4px solid var(--secondary-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.ach-stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ach-stat-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 0.8rem; }
.ach-stat-num  { font-family: var(--font-header); font-size: 2.5rem; font-weight: 700; color: var(--secondary-color); }
.ach-stat-label{ font-size: 0.9rem; color: var(--text-muted); font-weight: 500; margin-top: 0.3rem; }

/* Spotlight */
.spotlight-section { background: var(--primary-dark); padding: 6rem 0; }
.spotlight-section .section-title { color: var(--white); }
.spotlight-section .section-subtitle { color: rgba(255,255,255,0.6); }
.spotlight-card {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  min-height: 380px;
}
.spotlight-img-column {
  flex: 1;
  min-height: 320px;
  overflow: hidden;
}
.spotlight-img-column img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.spotlight-card:hover .spotlight-img-column img { transform: scale(1.04); }
.spotlight-info-column {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spotlight-tag-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--primary-dark);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.spotlight-title { color: var(--white); font-size: 1.5rem; margin-bottom: 1.2rem; }
.spotlight-meta-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.2rem; }
.spotlight-meta-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.spotlight-meta-label { color: rgba(255,255,255,0.5); }
.spotlight-meta-val  { color: var(--white); font-weight: 600; }
.spotlight-desc { color: rgba(255,255,255,0.75); line-height: 1.7; font-size: 0.95rem; }
.spotlight-dots-row {
  display: flex; gap: 0.6rem;
  justify-content: center;
  margin-top: 2rem;
}
.spotlight-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.spotlight-dot.active { background: var(--secondary-color); transform: scale(1.3); }

/* GPA */
.gpa-section { background: var(--accent-bg); }
.gpa-layout { display: flex; gap: 3rem; align-items: flex-start; }
.gpa-table-wrap { flex: 1.2; }
.gpa-chart-wrap { flex: 1; }
.gpa-ranges-table { width: 100%; border-collapse: collapse; }
.gpa-ranges-table th, .gpa-ranges-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.gpa-ranges-table th { background: var(--primary-color); color: var(--white); font-family: var(--font-header); }
.gpa-ranges-table tr:hover td { background: rgba(26,60,114,0.04); }
.gpa-bar-visual-wrap {
  height: 8px; background: var(--border-color);
  border-radius: 4px; overflow: hidden;
  width: 100%;
}
.gpa-bar-visual-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 4px;
  transition: width 1s ease;
}
.gpa-chart-visual {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 1.5rem; height: 200px;
  padding: 0 1rem;
  border-bottom: 2px solid var(--border-color);
  border-left: 2px solid var(--border-color);
}
.gpa-chart-column-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; flex: 1; }
.gpa-chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--primary-light), var(--primary-color));
  border-radius: 6px 6px 0 0;
  position: relative;
  min-width: 40px;
  transition: height 1s ease;
}
.gpa-chart-bar::after {
  content: attr(data-gpa);
  position: absolute; top: -26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-header); font-weight: 700;
  font-size: 0.85rem; color: var(--primary-color);
}
.gpa-chart-bar-label { font-size: 0.78rem; color: var(--text-muted); text-align: center; font-weight: 500; }

/* Wall of Fame */
.wof-section { background: var(--white); }
.wof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.wof-card {
  background: var(--accent-bg);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wof-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.wof-badge {
  display: inline-block;
  color: var(--white);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.wof-avatar {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--white);
  margin: 0 auto 1rem;
}
.wof-name { font-size: 1rem; color: var(--primary-color); margin-bottom: 0.3rem; }
.wof-award { font-size: 0.85rem; color: var(--text-muted); }

/* Certificates */
.cert-section { background: var(--accent-bg); }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cert-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cert-img-stub {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: rgba(255,255,255,0.6);
  position: relative; overflow: hidden;
}
.cert-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 0.9rem;
  opacity: 0; transition: opacity var(--transition-fast);
}
.cert-card:hover .cert-overlay { opacity: 1; }
.cert-caption-bar { padding: 1rem; }
.cert-title-el { font-family: var(--font-header); font-weight: 600; font-size: 0.9rem; color: var(--text-dark); margin-bottom: 0.2rem; }
.cert-sub-el { font-size: 0.8rem; color: var(--text-muted); }

/* --------------------------------------------------
   ANNOUNCEMENTS PAGE — TIMETABLE CELLS
   -------------------------------------------------- */
.tt-day-cell {
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--primary-color);
  background: var(--accent-bg);
  text-align: center;
  white-space: nowrap;
  min-width: 60px;
}
.tt-cell {
  text-align: center;
  padding: 0.6rem 0.4rem !important;
  font-size: 0.8rem;
  vertical-align: middle;
  cursor: default;
  transition: filter var(--transition-fast);
}
.tt-cell:hover { filter: brightness(0.93); }
.tt-empty { background: #f9fafb; color: #cbd5e1; }
.tt-current {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: -3px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px var(--secondary-color);
}
.today-row > td { border-left: 3px solid var(--secondary-color); }
.tt-subj-name { display: block; font-weight: 700; font-size: 0.78rem; line-height: 1.3; }
.tt-subj-sub  { display: block; font-size: 0.68rem; opacity: 0.7; }

/* Timetable cell colors */
.tt-cell-sci     { background: var(--subject-sci);     color: var(--subject-sci-text);     border: 1px solid var(--subject-sci-border); }
.tt-cell-math    { background: var(--subject-math);    color: var(--subject-math-text);    border: 1px solid var(--subject-math-border); }
.tt-cell-lang    { background: var(--subject-lang);    color: var(--subject-lang-text);    border: 1px solid var(--subject-lang-border); }
.tt-cell-social  { background: var(--subject-social);  color: var(--subject-social-text);  border: 1px solid var(--subject-social-border); }
.tt-cell-art     { background: var(--subject-art);     color: var(--subject-art-text);     border: 1px solid var(--subject-art-border); }
.tt-cell-project { background: var(--subject-project); color: var(--subject-project-text); border: 1px solid var(--subject-project-border); }

/* --------------------------------------------------
   ANNOUNCEMENTS PAGE — NEWS FEED & CALENDAR
   -------------------------------------------------- */
.news-calendar-section { background: var(--accent-bg); }
.news-calendar-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: flex-start;
}
.news-cat-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.news-cat-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--white);
  font-family: var(--font-header);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.news-cat-btn:hover, .news-cat-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.news-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.news-cat-pill {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.cat-academic { background: #EBF8FF; color: #2b6cb0; }
.cat-activity { background: #D1FAE5; color: #047857; }
.cat-important{ background: #FEE2E2; color: #991b1b; }
.cat-all      { background: var(--accent-bg); color: var(--text-muted); }

.news-modal-pill {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.news-card-title { font-size: 1.05rem; color: var(--primary-color); font-family: var(--font-header); margin-bottom: 0.3rem; }
.news-card-date  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.news-card-summary { font-size: 0.9rem; color: var(--text-dark); line-height: 1.6; margin-bottom: 0.8rem; }
.news-readmore {
  background: none; border: none;
  color: var(--primary-light); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-header);
  padding: 0;
}
.news-readmore:hover { color: var(--primary-color); }

.news-pagination { display: flex; gap: 0.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--white);
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}
.page-btn.active, .page-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* News modal content */
.news-modal-ttl {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.news-modal-body { line-height: 1.8; color: var(--text-dark); font-size: 0.95rem; }

/* Mini Calendar */
.mini-calendar-wrap {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-nav button {
  background: none; border: none; cursor: pointer;
  color: var(--primary-color); font-size: 1rem; padding: 0.3rem 0.6rem;
  border-radius: 6px; transition: background var(--transition-fast);
}
.cal-nav button:hover { background: var(--accent-bg); }
.cal-month-lbl { font-family: var(--font-header); font-weight: 700; color: var(--primary-color); font-size: 0.95rem; }
.cal-table { width: 100%; border-collapse: collapse; }
.cal-th {
  text-align: center; font-size: 0.72rem;
  color: var(--text-muted); font-weight: 700;
  padding: 0.3rem; font-family: var(--font-header);
}
.cal-day {
  text-align: center; font-size: 0.82rem;
  padding: 0.4rem; border-radius: 6px;
  cursor: default; position: relative; transition: background var(--transition-fast);
}
.cal-day.today {
  background: var(--primary-color); color: var(--white);
  font-weight: 700; border-radius: 50%;
}
.cal-day.has-event { cursor: pointer; font-weight: 600; color: var(--primary-color); }
.cal-day.has-event:hover { background: var(--accent-bg); }
.ev-dot {
  display: block; width: 5px; height: 5px;
  background: var(--secondary-color);
  border-radius: 50%; margin: 0 auto; margin-top: 1px;
}
.cal-day.empty { color: transparent; pointer-events: none; }
.cal-event-list {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.cal-ev-item { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; color: var(--text-dark); }
.cal-ev-dot {
  width: 8px; height: 8px; background: var(--secondary-color);
  border-radius: 50%; margin-top: 0.35rem; flex-shrink: 0;
}

/* --------------------------------------------------
   RESPONSIVE ADJUSTMENTS FOR NEW PAGES
   -------------------------------------------------- */
@media (max-width: 1024px) {
  .teach-profiles-grid  { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .ach-stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .wof-grid             { grid-template-columns: repeat(2, 1fr); }
  .cert-grid            { grid-template-columns: repeat(2, 1fr); }
  .teach-contacts-grid  { grid-template-columns: 1fr; }
  .teach-messages-grid  { grid-template-columns: 1fr; }
  .teach-details-layout { grid-template-columns: 1fr; }
  .news-calendar-layout { grid-template-columns: 1fr; }
  .gpa-layout           { flex-direction: column; }
  .mini-calendar-wrap   { position: static; }
}
@media (max-width: 768px) {
  .spotlight-card       { flex-direction: column; }
  .spotlight-img-column { min-height: 220px; }
  .ach-stats-grid       { grid-template-columns: 1fr; }
  .wof-grid             { grid-template-columns: 1fr 1fr; }
  .cert-grid            { grid-template-columns: 1fr 1fr; }
  .news-cat-bar         { gap: 0.4rem; }
}
@media (max-width: 480px) {
  .wof-grid  { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   MEMBERS PAGE — Student Cards & Committee Cards
   ========================================================= */

/* Committee grid */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Committee card */
.committee-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: visible; /* ต้องเป็น visible เพื่อไม่ให้ตัด badge ที่ลอยออกมา */
}
.committee-card:hover {
  border-color: var(--secondary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.committee-card.president {
  border-color: var(--secondary-color);
  background: linear-gradient(135deg, #fffbeb, #fff);
}

.committee-badge {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  /* ไม่ใช้ position:absolute เพื่อป้องกันการซ้อนทับการ์ดอื่น */
}
.committee-card.president .committee-badge {
  background: var(--secondary-color);
  color: #1a1a1a;
}
.com-no-tag {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.com-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.com-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.com-nickname {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.com-role-sub {
  font-size: 0.75rem;
  color: var(--primary-color);
}

/* Students grid */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Student card */
.student-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.student-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(26,60,114,0.15);
}
.student-card:hover .std-hover-panel {
  opacity: 1;
  transform: translateY(0);
}

.std-no {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.std-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.std-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.std-nickname {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.std-badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--primary-color);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Student hover panel */
.std-hover-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--primary-color) 0%, rgba(26,60,114,0.95) 100%);
  padding: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border-radius: 0 0 14px 14px;
}
.std-hover-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.3rem;
}
.std-hover-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
}

/* Students section */
.students-section {
  padding: 2rem 0 4rem;
}

/* Search & filter section */
.search-filter-section {
  background: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 70px;
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
}
.search-filter-wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.search-box-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border-color);
  min-width: 200px;
}
.search-box-wrap i { color: var(--text-muted); }
.search-input {
  background: none;
  border: none;
  outline: none;
  flex: 1;
  font-family: var(--font-th);
  font-size: 0.9rem;
  color: var(--text-dark);
}
.filters-group {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}
.filter-select {
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-family: var(--font-th);
  font-size: 0.85rem;
  color: var(--text-dark);
  cursor: pointer;
}
.results-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Committee section */
.committee-section {
  padding: 3rem 0 2rem;
  background: var(--bg-light);
}

/* Info list in modal */
.std-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.2rem 0;
}
.std-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.std-info-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.std-info-val {
  font-size: 0.9rem;
  color: var(--text-dark);
}
.std-info-val.quote {
  font-style: italic;
  color: var(--primary-color);
}
.std-modal-socials {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.std-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-dark);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: background 0.2s;
  cursor: pointer;
}
.std-social-btn:hover { background: var(--accent-bg); }

/* Responsive */
@media (max-width: 768px) {
  .committee-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .students-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .search-filter-wrap { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .committee-grid { grid-template-columns: 1fr 1fr; }
  .students-grid { grid-template-columns: 1fr 1fr; }
}

