/* ==========================================================================
   IVEACER Smart Audience Portal & Modern Gateway Landing Page
   สถาบันการอาชีวศึกษาเกษตรภาคกลาง (INSTITUTE OF VOCATIONAL EDUCATION IN AGRICULTURE CENTRAL REGION)
   UX/UI Redesign & Modern Design System (2026 Edition)
   ========================================================================== */

:root {
  --ivea-font-scale: 1rem;
  
  --bg-main: radial-gradient(circle at 10% 15%, rgba(251, 192, 45, 0.16), transparent 30%),
             radial-gradient(circle at 90% 85%, rgba(46, 125, 50, 0.15), transparent 32%),
             linear-gradient(135deg, #f8fbf9 0%, #f0f7f2 100%);
  --bg-card: #ffffff;
  --bg-box: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --heading: #14381e;
  --border-light: rgba(46, 125, 50, 0.12);
  --border-card: #e2e8f0;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(20, 56, 30, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 56, 30, 0.12);

  --ivea-green-dark: #14381e;
  --ivea-green-primary: #1e4d2b;
  --ivea-green-medium: #2e7d32;
  --ivea-green-light: #4caf50;
  --ivea-green-surface: #f1f8f4;
  --ivea-green-subtle: #e8f5e9;

  --ivea-gold-primary: #d4af37;
  --ivea-gold-hover: #b8941f;
  --ivea-gold-light: #fff9e6;
  --ivea-gold-gradient: linear-gradient(135deg, #f5af19 0%, #d4af37 100%);
  --ivea-royal-yellow: #fbc02d;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-full: 9999px;

  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Theme */
[data-theme="dark"], [data-bs-theme="dark"] {
  --bg-main: radial-gradient(circle at 10% 15%, rgba(251, 192, 45, 0.05), transparent 30%),
             radial-gradient(circle at 90% 85%, rgba(46, 125, 50, 0.05), transparent 32%),
             linear-gradient(135deg, #09140c 0%, #020704 100%);
  --bg-card: #112217;
  --bg-box: #142a1d;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --heading: #4ade80;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-card: #1e3a27;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
  --ivea-green-surface: #142e1d;
  --ivea-green-subtle: #193823;
}

/* Accessibility Modes */
html.grayscale-mode { filter: grayscale(100%) !important; }
html.text-large { font-size: 18px !important; }
html.text-xlarge { font-size: 20px !important; }

* { box-sizing: border-box; }

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Prompt', sans-serif;
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

/* Search Highlight Mark */
mark.search-highlight {
  background-color: #fef08a;
  color: #854d0e;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 700;
}
[data-theme="dark"] mark.search-highlight {
  background-color: #ca8a04;
  color: #ffffff;
}

/* Floating Particles Background */
#particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -20px;
  background: #fbc02d;
  border-radius: 50%;
  animation: floatUp linear infinite;
  filter: blur(2px);
  opacity: 0.35;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.45; }
  90% { opacity: 0.45; }
  100% { transform: translateY(-110vh) translateX(50px) rotate(360deg); opacity: 0; }
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Skip link for screen-readers */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: #1b5e20;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   1. Unified Top Accessibility & Utilities Bar
   ========================================================================== */
.top-accessibility-bar {
  background: #0b1f11;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.45);
  padding: 0.45rem 0;
  position: relative;
  z-index: 1050;
}

.access-btn-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.access-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.access-btn:hover {
  background: rgba(212, 175, 55, 0.35);
  color: #fff;
}

.access-btn.active {
  background: var(--ivea-gold-primary);
  color: #000;
  font-weight: 700;
}

.btn-royal-blessing {
  background: linear-gradient(135deg, #fbc02d 0%, #f57f17 100%);
  color: #1a1a1a !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.38rem 1rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(251, 192, 45, 0.35);
  border: 1px solid #fff;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-royal-blessing:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(251, 192, 45, 0.55);
}

.btn-main-website-link {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38rem 1.05rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  transition: var(--transition-fast);
}

.btn-main-website-link:hover {
  background: var(--ivea-green-primary);
  border-color: var(--ivea-gold-primary);
  color: var(--ivea-gold-primary) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   2. Main Navigation Bar
   ========================================================================== */
.navbar-custom {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 3px solid var(--ivea-gold-primary);
  position: relative;
  z-index: 1040;
}

[data-theme="dark"] .navbar-custom {
  background: rgba(13, 35, 19, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-logo-img {
  height: 65px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.brand-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ivea-green-primary);
  line-height: 1.2;
}

[data-theme="dark"] .brand-title {
  color: #4ade80;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.brand-ministry {
  font-size: 0.75rem;
  color: var(--ivea-gold-hover);
  font-weight: 600;
}

.nav-link-custom {
  font-weight: 500;
  color: var(--text-main) !important;
  padding: 0.55rem 0.9rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link-custom:hover {
  color: var(--ivea-green-primary) !important;
  background: var(--ivea-green-subtle);
  transform: translateY(-1px);
}

[data-theme="dark"] .nav-link-custom {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .nav-link-custom:hover {
  color: #4ade80 !important;
  background: var(--ivea-green-surface);
}

/* ==========================================================================
   3. Decluttered & Focused Hero Section
   ========================================================================== */
.hero-portal-section {
  position: relative;
  background: linear-gradient(135deg, #0d2814 0%, #1a4926 50%, #205c2f 100%);
  color: #fff;
  padding: 3.75rem 0 3.25rem;
  overflow: hidden;
  z-index: 10;
}

[data-theme="dark"] .hero-portal-section {
  background: linear-gradient(135deg, #061509 0%, #102917 50%, #0b2011 100%);
}

.hero-portal-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(251, 192, 45, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(76, 175, 80, 0.22) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  pointer-events: none;
}

.hero-logo-img {
  height: 85px;
  width: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

.hero-slogan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1.4rem;
  border-radius: var(--radius-full);
  color: #fff9e6;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-title-main {
  font-size: 2.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.hero-title-en {
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  color: var(--ivea-gold-primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.hero-ministry-tag {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Focused Hero Actions (Clean Primary + Secondary) */
.hero-focused-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #2e7d32 0%, #1e4d2b 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.btn-hero-primary:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.btn-hero-gold {
  background: var(--ivea-gold-gradient);
  color: #1a1a1a !important;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #fff;
  box-shadow: 0 8px 24px rgba(251, 192, 45, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.btn-hero-gold:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(251, 192, 45, 0.5);
}

.btn-hero-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.btn-hero-glass:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* Breaking Alert Banner */
.breaking-alert-card {
  max-width: 980px;
  margin: 0 auto 2.25rem;
  background: rgba(0, 0, 0, 0.42);
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.breaking-alert-card .alert-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  color: #ffffff;
  font-size: 0.88rem;
}

.breaking-alert-card .alert-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.breaking-alert-card .alert-item a {
  color: var(--ivea-gold-primary);
  font-weight: 600;
}

.breaking-alert-card .alert-item a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Search Box Container with Keyboard Shortcut UI */
.portal-search-box {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.search-input-group {
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: 0.5rem 0.65rem 0.5rem 1.5rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
  border: 2px solid transparent;
}

[data-theme="dark"] .search-input-group {
  background: #132a1b;
  border-color: #2a5836;
}

.search-input-group:focus-within {
  border-color: var(--ivea-gold-primary);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(212, 175, 55, 0.25);
}

.search-input-group input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 1.02rem;
  color: var(--text-main);
  width: 100%;
  padding-right: 0.75rem;
  font-family: 'Prompt', sans-serif;
}

[data-theme="dark"] .search-input-group input {
  color: #ffffff;
}

.kbd-shortcut {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.75rem;
  font-family: inherit;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
}

[data-theme="dark"] .kbd-shortcut {
  background: #1e3a27;
  color: #94a3b8;
  border-color: #2e593c;
}

.search-icon-btn {
  background: var(--ivea-green-primary);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.search-icon-btn:hover {
  background: var(--ivea-green-medium);
  transform: scale(1.05);
}

.search-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0 8px;
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
}
.search-clear-btn:hover {
  color: #ef4444;
}

.quick-tags {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.quick-tag-item {
  background: rgba(255, 255, 255, 0.14);
  color: #f1f8f4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-tag-item:hover {
  background: var(--ivea-gold-primary);
  color: #000;
  border-color: var(--ivea-gold-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   4. News Section, Swiper & Skeleton Screen
   ========================================================================== */
.latest-news-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.latest-news-section h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1b5e20, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .latest-news-section h3 {
  background: linear-gradient(135deg, #4ade80, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.news-nav-buttons {
  display: flex;
  gap: 8px;
}

.news-nav-btn {
  background: var(--bg-box);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: bold;
}

.news-nav-btn:hover {
  background: var(--ivea-green-subtle);
  transform: scale(1.15);
  border-color: #a5d6a7;
}

/* Swiper Styling */
.news-swiper {
  width: 100%;
  padding-bottom: 45px !important;
  padding-top: 10px;
  position: relative;
}

.news-swiper .swiper-slide {
  width: 75%;
  max-width: 620px;
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.65) scale(0.94);
}

.news-swiper .swiper-slide-active {
  filter: brightness(1) scale(1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  z-index: 10;
}

.news-swiper .swiper-slide img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  transition: transform 0.6s ease;
}

.news-swiper .swiper-slide-active:hover img {
  transform: scale(1.03);
}

.swiper-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 4px;
  background: rgba(46, 125, 50, 0.12);
  width: 100%;
  z-index: 20;
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="dark"] .swiper-progress-bar { background: rgba(255,255,255,0.1); }
.swiper-progress-bar .progress { height: 100%; background: #2e7d32; width: 0; transition: width 0.1s linear; }
[data-theme="dark"] .swiper-progress-bar .progress { background: #4ade80; }

.swiper-pagination-bullet {
  background: #1b5e20;
  opacity: 0.25;
  width: 8px; height: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.swiper-pagination-bullet-active {
  opacity: 1;
  background: #2e7d32;
  width: 24px;
  border-radius: 4px;
}

/* Skeleton Loading Screen */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-line {
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
[data-theme="dark"] .skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* News List */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.text-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  padding: 14px 18px;
  background: var(--bg-box);
  border-radius: 14px;
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  line-height: 1.6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.text-link::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #34d399;
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 4px 0 0 4px;
}

.text-link:hover {
  transform: translateX(8px);
  background: var(--bg-card);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.1);
  color: #1b5e20;
  border-color: rgba(46, 125, 50, 0.3);
}

[data-theme="dark"] .text-link:hover {
  color: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 8px 25px rgba(74, 222, 128, 0.15);
}

.text-link:hover::before { transform: scaleY(1); }
.text-link::after {
  content: '→';
  margin-left: auto;
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #34d399;
  font-weight: bold;
  font-size: 1.125rem;
}
.text-link:hover::after { opacity: 1; transform: translateX(0); }

.highlight-link {
  background: linear-gradient(to right, rgba(251, 192, 45, 0.08), var(--bg-box));
  border: 1px solid rgba(251, 192, 45, 0.35);
  color: #d97706;
  font-weight: 600;
}

[data-theme="dark"] .highlight-link {
  color: #fde047;
  background: linear-gradient(to right, rgba(251, 192, 45, 0.15), var(--bg-box));
  border-color: rgba(253, 224, 71, 0.3);
}

/* ==========================================================================
   5. Role Switcher Tabs & Audience Portals (Color-Coded Themes)
   ========================================================================== */
.role-filter-wrapper {
  margin-top: -2rem;
  position: relative;
  z-index: 20;
}

.role-filter-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  padding: 1rem;
}

.role-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.role-pill-btn {
  background: var(--bg-box);
  color: var(--text-main);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.role-pill-btn:hover {
  background: var(--ivea-green-subtle);
  border-color: var(--ivea-green-light);
  color: var(--ivea-green-primary);
  transform: translateY(-2px);
}

.role-pill-btn.active {
  background: linear-gradient(135deg, var(--ivea-green-primary) 0%, var(--ivea-green-medium) 100%);
  color: #ffffff;
  border-color: var(--ivea-green-primary);
  box-shadow: 0 6px 16px rgba(30, 77, 43, 0.28);
}

.role-pill-btn.active i { color: var(--ivea-gold-primary); }

.role-pill-btn .count-badge {
  background: rgba(0, 0, 0, 0.08);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.role-pill-btn.active .count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Category Color Accents */
.category-section-block[data-category-role="student"] .portal-card::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.category-section-block[data-category-role="academic"] .portal-card::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.category-section-block[data-category-role="staff"] .portal-card::before { background: linear-gradient(90deg, #7e22ce, #a855f7); }
.category-section-block[data-category-role="public"] .portal-card::before { background: linear-gradient(90deg, #1e4d2b, #4ade80); }
.category-section-block[data-category-role="aunqa"] .portal-card::before { background: linear-gradient(90deg, #c2410c, #fb923c); }

.category-section-title {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-light);
}

.category-section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 80px; height: 2px;
  background: var(--ivea-gold-primary);
}

.category-title-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-icon-wrapper {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.category-icon-wrapper.cat-student { background: #e0f2fe; color: #0284c7; }
.category-icon-wrapper.cat-academic { background: #fef3c7; color: #d97706; }
.category-icon-wrapper.cat-staff { background: #f3e8ff; color: #7e22ce; }
.category-icon-wrapper.cat-public { background: #e8f5e9; color: #1e4d2b; }
.category-icon-wrapper.cat-aunqa { background: #ffedd5; color: #c2410c; }

/* Modern Clean Card UI */
.portal-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ivea-green-primary), var(--ivea-gold-primary));
  opacity: 0;
  transition: var(--transition-fast);
}

.portal-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 40px rgba(30, 77, 43, 0.16);
  border-color: rgba(46, 125, 50, 0.4);
}

.portal-card:hover::before { opacity: 1; }

.portal-card-body {
  padding: 1.5rem 1.4rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.card-icon-box {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  transition: var(--transition-fast);
}

.portal-card:hover .card-icon-box {
  transform: scale(1.1) rotate(4deg);
}

.card-icon-box.icon-green { background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); color: #1e4d2b; }
.card-icon-box.icon-gold { background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%); color: #b45309; }
.card-icon-box.icon-blue { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #0369a1; }
.card-icon-box.icon-purple { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); color: #6b21a8; }
.card-icon-box.icon-orange { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); color: #c2410c; }

.card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-featured { background: rgba(212, 175, 55, 0.15); color: #92400e; border: 1px solid rgba(212, 175, 55, 0.4); }
.badge-hot { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-official { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.badge-active { background: #e8f5e9; color: #166534; border: 1px solid #86efac; }
.badge-aunqa { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }

.card-title-text {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  transition: var(--transition-fast);
}

.portal-card:hover .card-title-text {
  color: var(--ivea-green-primary);
}

[data-theme="dark"] .portal-card:hover .card-title-text {
  color: var(--ivea-gold-primary);
}

.card-desc-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.portal-card-footer {
  padding: 0.85rem 1.4rem;
  background: var(--bg-box);
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.portal-card:hover .portal-card-footer {
  background: var(--ivea-green-subtle);
}

.action-link-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ivea-green-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="dark"] .action-link-text {
  color: var(--ivea-gold-primary);
}

.action-arrow-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivea-green-primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: var(--transition-fast);
}

[data-theme="dark"] .action-arrow-icon {
  background: #14381e;
  color: #fff;
}

.portal-card:hover .action-arrow-icon {
  background: var(--ivea-green-primary);
  color: #ffffff;
  transform: translateX(4px);
}

/* ==========================================================================
   6. Interactive Central Region Network Showcase (10 Colleges)
   ========================================================================== */
.colleges-network-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.college-item-card {
  background: var(--bg-box);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: var(--transition-smooth);
  color: var(--text-main);
}

.college-item-card:hover {
  background: var(--ivea-green-subtle);
  border-color: var(--ivea-green-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.12);
  color: var(--ivea-green-primary);
}

.college-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.college-province-tag {
  font-size: 0.72rem;
  background: rgba(46, 125, 50, 0.1);
  color: var(--ivea-green-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ==========================================================================
   7. Gateway Bottom & Stats Section
   ========================================================================== */
.gateway-bottom {
  background: linear-gradient(160deg, rgba(16, 48, 25, 0.98), rgba(30, 77, 43, 0.95));
  color: #fff;
  padding: 42px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ivea-gold-primary);
}

.side-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.side-content h2 {
  color: #ffffff;
  margin: 0 0 12px;
  font-size: 1.75rem;
  line-height: 1.35;
}

.side-content p {
  margin: 0;
  line-height: 1.8;
  opacity: 0.92;
  font-size: 0.9375rem;
}

.side-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 18px 12px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.18);
}

.stat-item strong {
  display: block;
  font-size: 2.35rem;
  line-height: 1;
  color: #fbc02d;
  font-variant-numeric: tabular-nums;
}

.stat-item span {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.contact-box {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 24px;
  backdrop-filter: blur(10px);
  height: 100%;
}

.contact-box h4 {
  color: #ffffff;
  margin: 0 0 16px;
  font-size: 1.125rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 12px;
}

.contact-box p {
  margin: 8px 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.contact-box a {
  color: #fbc02d;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-box a:hover {
  text-decoration: underline;
  color: #fff8e1;
}

/* ==========================================================================
   8. Footer Section
   ========================================================================== */
.portal-footer {
  background: #08170c;
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem;
  border-top: 4px solid var(--ivea-gold-primary);
  position: relative;
  z-index: 10;
}

.footer-logo-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links-list a {
  color: #94a3b8;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links-list a:hover {
  color: var(--ivea-gold-primary);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.footer-contact-item i {
  color: var(--ivea-gold-primary);
  font-size: 1.1rem;
  margin-top: 2px;
}

.footer-bottom-bar {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #64748b;
}

/* Floating Clean Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--ivea-green-primary);
  color: #fff;
  border: 2px solid var(--ivea-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 998;
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--ivea-green-medium);
  transform: translateY(-4px);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* Empty Search State Box */
.no-results-box {
  background: var(--bg-card);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  display: none;
}

/* Royal Celebration Modal (King / Queen Celebrations) */
.royal-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.royal-modal-overlay.show { opacity: 1; pointer-events: auto; }

.royal-modal-content {
  background: #ffffff;
  padding: 22px;
  border-radius: 26px;
  width: 95%;
  max-width: 1050px;
  max-height: 95vh;
  overflow-y: auto;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  position: relative;
}

.royal-modal-content::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #fbc02d, #ffeb3b, #d4af37, #fbc02d);
  z-index: -1;
  border-radius: 28px;
  filter: blur(8px);
  opacity: 0.6;
}

.royal-modal-overlay.show .royal-modal-content { transform: scale(1); }

.btn-close-x {
  position: absolute;
  top: 20px; right: 20px;
  width: 34px; height: 34px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}
.btn-close-x:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.15); }

.royal-modal-content img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(90vh - 140px);
  margin: 0 auto 18px auto;
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  object-fit: contain;
  display: block;
}

.royal-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.btn-bless {
  background: linear-gradient(135deg, #fbc02d, #f57f17);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(251, 192, 45, 0.4);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-bless:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(135deg, #fdd835, #f9a825);
  box-shadow: 0 12px 25px rgba(251, 192, 45, 0.5);
}

.btn-close-modal {
  background: #f1f5f9;
  color: #475569;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-close-modal:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ==========================================================================
   9. Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 1024px) {
  .gateway-bottom { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991.98px) {
  .hero-title-main { font-size: 1.95rem; }
  .role-pill-btn { flex: 1 1 45%; justify-content: center; }
  .kbd-shortcut { display: none; }
}

@media (max-width: 768px) {
  .gateway-bottom { grid-template-columns: 1fr; padding: 28px; }
  .news-swiper .swiper-slide { width: 90%; filter: brightness(1) scale(1); }
  .colleges-network-card { padding: 22px; }
}

@media (max-width: 575.98px) {
  .hero-title-main { font-size: 1.55rem; }
  .role-pill-btn { flex: 1 1 100%; padding: 0.6rem 0.9rem; font-size: 0.88rem; }
  .brand-title { font-size: 0.95rem; }
  .btn-hero-primary, .btn-hero-gold, .btn-hero-glass { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
