:root {
  /* Modern Professional Palette */
  --primary: #0f172a;        /* Slate 900 */
  --primary-light: #334155;  /* Slate 700 */
  --accent: #0ea5e9;         /* Sky 500 */
  --accent-hover: #0284c7;   /* Sky 600 */
  
  --bg-body: #f8fafc;        /* Slate 50 */
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-main: #1e293b;
  --text-main-hover: #0f172a;
  --text-light: #64748b;
  
  --border: #e2e8f0;
  
  /* UI Elements */
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --container: 1200px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  /* 1. ENABLE SMOOTH SCROLLING ANIMATION */
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  max-width: 100%;
}


.hidden-section {
  display: none !important;
}


.text-nowrap { white-space: nowrap; }

h1, h2, h3, h4 { color: var(--primary); font-weight: 700; line-height: 1.2; }
a { text-decoration: none; transition: 0.2s ease; }
ul { list-style: none; }

.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

header .container {
  max-width: 100%;
  width: 100%;
  padding: 0 24px;
}

.section-pad { padding: 80px 0; }
.bg-light { background: var(--bg-white); }

/* --- Header & Glassmorphism --- */
header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0px 2px 4px rgba(15, 23, 42, 0.1);
  isolation: isolate;
}

header .header-flex .brand img {
  height: 64px;      /* Adjust as needed */
  width: auto;       /* Preserve aspect ratio */
  max-height: 72px;  /* Safety limit */
  object-fit: contain;
}


#structure .structure-card{
  box-shadow: 3px 4px 12px 2px rgba(199, 216, 255, 0.651);
}

#structure .card.structure-card:hover {box-shadow: 3px 4px 12px 2.5px rgba(199, 216, 255, 0.651); border-color: white; }

.vision{
  font-style: italic;
}

.show-section {
  display: block;
}

/* Page Mode (SPA View) */

body.page-mode main > section {
  display: none !important;
}

body.page-mode main > section.active-page {
  display: block !important;
  min-height: calc(100vh - 120px);
  padding-top: 40px;
}



.text-nowrap.skipTo{
  color: var(--primary-light);
  padding: 2px 4px;
  font-size: 0.7em;
  opacity: 0.8;
}

.text-nowrap.skipTo:hover {
  text-decoration: underline;
  color: black;
  transition: ease-in-out 0.5s;
}

.header-flex { display: flex; align-items: center; width: 100%;}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }

.logo-circle {
  height: 40px; width: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}

.brand-text h1 { font-size: 1.1rem; margin: 0; letter-spacing: -0.02em; text-align: left;}
.brand-text p { font-size: 0.6rem; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.05em; text-align: left}

nav { margin-left: auto; }
nav ul { display: flex; gap: 24px; align-items: center; flex-wrap: nowrap;}
nav a { color: var(--text-light); font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: var(--primary); }

#about-page{
  scroll-margin-top: 120px;
  padding-top: 40px;
}

.about-content{
  background-color: var(--bg-subtle);
  padding: 1rem;
  border-radius: 1rem;
  text-align: justify;
}

/* --- New Styles for Regulations Cards --- */
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-left: 4px solid var(--text-main); /* Visual cue for documents */
}

.doc-icon {
  font-size: 2rem;
  background: var(--bg-subtle);
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.doc-content h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.doc-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.text-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.text-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.btn-nav-log {
  background: var(--primary-light);
  color: white !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
}
.btn-nav-log:hover { background: var(--text-main-hover); }

/* --- Hero Section --- */
.hero-section {
  background: radial-gradient(circle at top right, #f1f5f9, #ffffff);
  padding: 100px 0;
  border-bottom: 1px solid var(--border);
}

.icon {
  width: 24px;
  height: 24px;
  /* fill: var(--text-main); */
  color: var(--text-main);
}

.icon-small {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  fill: var(--text-main);
}

.hero-content { max-width: 700px; }
.badge-hero {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-content h2 { font-size: 3rem; margin-bottom: 20px; letter-spacing: -0.03em; color: var(--primary); }
.hero-content p { font-size: 1.15rem; color: var(--text-light); margin-bottom: 32px; }

.hero-actions { display: flex; gap: 16px; }
.btn-primary {
  background: var(--text-main); color: white;
  padding: 12px 24px; border-radius: 8px; font-weight: 600;
}
.btn-primary:hover { background: var(--text-main-hover); transform: translateY(-1px); }
.btn-secondary {
  background: white; color: var(--text-main); border: 1px solid var(--border);
  padding: 12px 24px; border-radius: 8px; font-weight: 600;
}
.btn-secondary:hover { background: var(--bg-subtle); }

/* --- Grids & Cards --- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--text-main); }

#about {
  background: 
    url('../assets/icons/bootstrap-icons/bg3.jpeg') center/cover no-repeat;
  min-height: 50vh;
  box-shadow: 0px 7px 17px rgba(0,0,0,0.3);
}

#structure{
  background: 
    url('../assets/icons/bootstrap-icons/6113099.jpg') center/cover no-repeat;
  min-height: 20vh;
}

#structure h3{
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- About Modal --- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-box {
  background: white;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: modalFade 0.3s ease;
}

/* Organogram Styling */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.org-node {
  background: white;
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
  min-width: 260px;
  box-shadow: 3px 4px 12px 2px rgba(199, 216, 255, 0.651);
}

.org-node:hover { box-shadow: 3px 4px 12px 2.5px rgba(199, 216, 255, 0.651); border-color: white; }


.org-row {
  display: flex;
  gap: 40px;
  position: relative;
}


@keyframes modalFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

/* --- Vision & Mission Section --- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.vm-card {
  text-align: center;
  padding: 32px 24px;
}

.vm-card h4 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.vm-card p {
  font-size: 1.5rem;
  color: var(--text-light);
  line-height: 1.7;
}


.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-light);
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 24px;
  line-height: 1.8;
}

.modal-body p {
  margin-bottom: 16px;
  text-align: justify;
}

.modal-list {
  margin: 16px 0 24px 20px;
}

.modal-list li {
  margin-bottom: 10px;
  color: var(--text-dark);
}


section {
  scroll-margin-top: 120px;
}

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h3 { font-size: 2rem; margin-bottom: 8px; }
.section-header p { color: var(--text-light); }

.icon-box {
  height: 48px; width: 48px;
  background: var(--bg-subtle);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px;
}

.grid-sidebar {
  display: flex;
  justify-content: center;
}
.grid-sidebar > .main-col {
  width: 100%;
  max-width: 900px;
}


.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.status-indicator { font-size: 0.8rem; color: var(--text-dark); background: var(--bg-subtle); padding: 4px 8px; border-radius: 4px; }

/* Tables */
.table-wrapper { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--bg-subtle); color: var(--text-dark); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; padding: 16px 24px; text-align: left; }
td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
.badge {
  padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600;
}
.badge.success { background: #dcfce7; color: #15803d; }

/* Notifications */
.notification-card { padding: 0; }
.notif-header { padding: 20px; border-bottom: 1px solid var(--border); }
.notif-header h3 { font-size: 1.1rem; margin: 0; }
.notif-list li { padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.notif-list li:hover { background: var(--bg-subtle); }
.notif-list li:last-child { border: none; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.notif-list .date { font-size: 0.75rem; color: var(--text-light); display: block; margin-bottom: 4px; }
.notif-list a { color: var(--text-main); font-weight: 500; font-size: 0.9rem; }
.notif-list a:hover { color: var(--text-main); }
.important-update { background: #fefce8; } /* Light yellow for important */

/* --- Footer --- */
footer { background: var(--primary); color: #94a3b8; padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h4 { color: white; font-size: 1.5rem; margin-bottom: 10px; }
.footer-contact p { margin-bottom: 12px; font-size: 0.95rem; }
.footer-contact strong { color: white; }
.footer-bottom { text-align: center; border-top: 1px solid var(--primary-light); padding-top: 20px; font-size: 0.85rem; }
.back-top { color: white; opacity: 0.7; }

/* Accessibility Widget Theme Override */

#uw-widget-custom-trigger {
  background: var(--text-main) !important;
  color: white !important;
  border: none !important;
}

/* --- Mobile --- */
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 768px) {
  html {
    font-size: 90%;
  }
  .hero-content h2 { font-size: 2rem; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  .nav-toggle-label { display: block; cursor: pointer; padding: 10px; }
  .nav-toggle-label span { display: block; width: 24px; height: 2px; background: var(--primary); position: relative; }
  .nav-toggle-label span::before, .nav-toggle-label span::after { content: ''; position: absolute; width: 100%; height: 2px; background: var(--primary); left: 0; }
  .nav-toggle-label span::before { bottom: 7px; } .nav-toggle-label span::after { top: 7px; }

  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
  }

  main {
    padding-top: 90px;
  }
  nav {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: white; border-bottom: 1px solid var(--border);
    transform: scaleY(0); transform-origin: top; transition: 0.3s;
  }
  nav .skipTo {
    display: none;
  }
  .nav-toggle:checked ~ nav { transform: scaleY(1); }
  nav ul { flex-direction: column; padding: 20px; align-items: flex-start; }
}

@media (max-width: 768px) {
  .table-wrapper table, 
  .table-wrapper thead, 
  /* .table-wrapper tbody,  */
  .table-wrapper th, 
  .table-wrapper td, 
  .table-wrapper tr {
    display: block;
    width: 100%;
  }

  .table-wrapper {
    background: transparent;
    border: none;
  }

  .table-wrapper tbody{
    width: 100%;
    border: none;
  } 

  .table-wrapper thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px; 
  }


  .table-wrapper tr {
    background: var(--bg-white);
    margin-bottom: 16px;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }


  .table-wrapper td {
    border: none !important;
    background: transparent;

    padding: 10px 12px;
  }

  .table-wrapper td + td {
    border-top: 1px solid var(--border);
  }

  .table-wrapper td::before {
    font-size: 0.8rem;
    border: none;

  }

  .table-wrapper td:last-child {
    border-bottom: none;
  }

  .table-wrapper td:nth-of-type(2)::before {
    content: "University: ";
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
  }
  
  .table-wrapper td:nth-of-type(3)::before {
    content: "Location: ";
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
  }

  .table-wrapper td:nth-of-type(1) {
    background: var(--bg-subtle);
    color: var(--primary);
    text-align: left;
    padding: 16px;
    display: block; /* Full width block */
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .table-wrapper td:nth-of-type(1)::before {
    content: none;
  }

  footer, .footer-brand, .footer-brand p, .footer-contact, .footer-contact p {
    width: 100%;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {

  #uw-widget-custom-trigger span {
    display: none !important;
  }

  #uw-widget-custom-trigger {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 !important;
    min-width: 42px !important;
  }

  #uw-widget-custom-trigger img {
    width: 22px;
    height: 22px;

    display: block;

    margin: 0 !important;
    padding: 0 !important;
  }
}


@media (max-width: 768px) {
  .org-chart {
    gap: 24px;
  }

  .org-row {
    flex-direction: column;   
    gap: 20px;
  }

  .org-node {
    min-width: auto;  
    width: 100%;
    max-width: 320px; 
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .org-node h4 {
    font-size: 1rem;
  }

  .org-node p {
    font-size: 0.9rem;
  }

  .org-node small {
    font-size: 0.8rem;
  }
}
