/* Modern Design System - APSI-PTMA (High Contrast Light Mode & Sticky Footer) */

:root {
  /* High-Contrast Light Mode Default Variables */
  --bg-dark: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #E2E8F0;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --border-glass: #CBD5E1;
  --text-main: #0F172A;
  --text-muted: #334155;
  --text-dim: #475569;
  --primary-navy: #0F172A;
  --primary-blue: #0284C7;
  --primary-light: #0369A1;
  --accent-gold: #E31B23;
  --accent-amber: #B45309;
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-glow: 0 10px 30px rgba(2, 132, 199, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --header-heading: #0F172A;
  --footer-heading: #0F172A;
  --footer-bg: #F1F5F9;
  --section-alt-bg: #CBD5E1;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-dark: #070F1E;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-subtle: rgba(30, 41, 59, 0.5);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --primary-light: #38BDF8;
  --accent-gold: #EF4444;
  --accent-amber: #D97706;
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
  --nav-bg: rgba(10, 25, 47, 0.92);
  --header-heading: #FFFFFF;
  --footer-heading: #FFFFFF;
  --footer-bg: #040914;
  --section-alt-bg: rgba(10, 25, 47, 0.5);
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-wrapper {
  flex: 1 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--header-heading);
}

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

a:hover {
  color: var(--primary-blue);
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

[data-theme="dark"] .glass-card {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* Gradient Text - Matches Official APSI Logo Palette (Cyan -> Deep Blue -> Red) */
.gradient-text {
  background: linear-gradient(135deg, #00AEEF 0%, #1F2874 55%, #E31B23 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #38BDF8 0%, #60A5FA 55%, #F87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #1F2874 0%, #E31B23 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .gradient-text-gold {
  background: linear-gradient(135deg, #60A5FA 0%, #F87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), #0369A1);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284C7, #38BDF8);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #1F2874 0%, #E31B23 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(227, 27, 35, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #0284C7 0%, #00AEEF 100%);
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(0, 174, 239, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: var(--primary-light);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: rotate(15deg);
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), #0369A1);
  color: #FFFFFF;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
  background: linear-gradient(135deg, #0284C7, #38BDF8);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--header-heading);
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-light);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  padding: 160px 0 100px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 15% 50%, rgba(2, 132, 199, 0.08), transparent 45%),
              radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.08), transparent 40%);
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-card-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stats Counter Grid */
.stats-section {
  padding: 60px 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: var(--bg-card-subtle);
}

.stats-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-light);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  font-weight: 600;
}

/* Section Wrapper */
.section {
  padding: 100px 0;
}

.section-title-wrap {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-subtitle {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

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

/* Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.825rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.post-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* DataTables Light/Dark Custom Styling & Responsive Column Layout */
.dataTables_wrapper {
  color: var(--text-main);
  overflow-x: auto;
}
.dataTables_length, .dataTables_filter {
  margin-bottom: 18px !important;
  padding-bottom: 4px !important;
}
.dataTables_length select, .dataTables_filter input {
  padding: 8px 14px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-main) !important;
  outline: none;
}
table.dataTable {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 16px 0 20px 0 !important;
  table-layout: auto !important;
}
table.dataTable header, table.dataTable thead th {
  background: var(--bg-card-subtle) !important;
  color: var(--header-heading) !important;
  border-bottom: 2px solid var(--border-glass) !important;
  padding: 14px 16px !important;
  white-space: nowrap;
}
table.dataTable tbody td {
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--border-glass) !important;
  color: var(--text-main) !important;
  vertical-align: middle;
}
table.dataTable tbody tr {
  background-color: var(--bg-card) !important;
}
table.dataTable tbody tr:hover {
  background-color: var(--bg-card-subtle) !important;
}
.dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  color: var(--text-main) !important;
}
.badge-category {
  display: inline-block;
  white-space: nowrap;
  padding: 6px 14px;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 600;
}

/* Badge System */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-primary { background: rgba(2, 132, 199, 0.18); color: var(--primary-light); border: 1px solid rgba(2, 132, 199, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.18); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger  { background: rgba(239, 68, 68, 0.18); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-purple  { background: rgba(168, 85, 247, 0.18); color: #A855F7; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-orange  { background: rgba(249, 115, 22, 0.18); color: #F97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-blue    { background: rgba(2, 132, 199, 0.18); color: #0284C7; border: 1px solid rgba(2, 132, 199, 0.3); }
.badge-muted   { background: rgba(100, 116, 139, 0.18); color: #94A3B8; border: 1px solid rgba(100, 116, 139, 0.3); }

/* Degree Level Badges */
.badge-lvl-d3 { background: rgba(245, 158, 11, 0.18) !important; color: #F59E0B !important; border: 1px solid rgba(245, 158, 11, 0.3) !important; }
.badge-lvl-d4 { background: rgba(249, 115, 22, 0.18) !important; color: #F97316 !important; border: 1px solid rgba(249, 115, 22, 0.3) !important; }
.badge-lvl-s1 { background: rgba(2, 132, 199, 0.18) !important; color: #0284C7 !important; border: 1px solid rgba(2, 132, 199, 0.3) !important; }
.badge-lvl-s2 { background: rgba(16, 185, 129, 0.18) !important; color: #10B981 !important; border: 1px solid rgba(16, 185, 129, 0.3) !important; }
.badge-lvl-s3 { background: rgba(168, 85, 247, 0.18) !important; color: #A855F7 !important; border: 1px solid rgba(168, 85, 247, 0.3) !important; }

/* Footer (Forced Bottom / Sticky Footer) */
.footer {
  flex-shrink: 0;
  background: var(--footer-bg);
  border-top: 1px solid var(--border-glass);
  padding: 60px 0 30px;
  color: var(--text-muted);
}

.footer h4 {
  color: var(--footer-heading) !important;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Dropdown Menu Navbar Styling */
.nav-item-dropdown {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
}

.nav-item-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item a {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.nav-dropdown-item a:hover {
  background: var(--bg-card-subtle);
  color: var(--primary-light);
  padding-left: 24px;
}

/* Mobile Hamburger Button Styling */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.registration-container {
  grid-template-columns: 1.1fr 1.3fr;
}

.grid-2-mobile {
  grid-template-columns: 1fr 1fr;
}

.grid-journal {
  grid-template-columns: 240px 1fr;
}

.grid-journal-meta {
  grid-template-columns: 120px 1fr;
}

/* Responsive */
@media (max-width: 992px) {
  .registration-container,
  .grid-2-mobile,
  .grid-journal,
  .grid-journal-meta {
    grid-template-columns: 1fr !important;
  }
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .nav-menu {
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-item-dropdown:hover .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding-left: 16px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
  .nav-portal-btn {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
}

/* Share Buttons Hover Effect */
.share-btn {
  transition: all 0.2s ease-in-out;
}
.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Article & Markdown Rich Text Styles */
.article-body ul, .article-body ol {
  margin-top: 10px;
  margin-bottom: 16px;
  padding-left: 28px;
}
.article-body ul {
  list-style-type: disc !important;
}
.article-body ol {
  list-style-type: decimal !important;
}
.article-body li {
  margin-bottom: 6px;
  line-height: 1.7;
  color: var(--text-main);
  display: list-item !important;
}
.article-body blockquote {
  border-left: 4px solid var(--primary-light);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--bg-card-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}
.article-body blockquote p {
  margin: 0;
}
.article-body h3, .article-body h4 {
  color: var(--header-heading);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 12px;
}
.article-body h3 {
  font-size: 1.35rem;
}
.article-body h4 {
  font-size: 1.15rem;
}
.article-body p {
  margin-bottom: 14px;
}


