/* ==========================================================================
   KACST - Khanjahan Ali College of Science & Technology
   Enterprise Mobile-First Responsive Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #003366;
  --primary-dark: #002244;
  --primary-light: #0d6efd;
  --accent: #d4af37;
  --accent-hover: #b89528;
  --secondary: #059669;
  --danger: #dc2626;
  --warning: #f59e0b;
  --dark: #0f172a;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --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 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: 'Outfit', 'Hind Siliguri', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  color: var(--text-primary);
  background-color: var(--surface-alt);
  font-size: 16px;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 60px; /* Space for mobile sticky bottom bar */
}

@media (min-width: 769px) {
  body { padding-bottom: 0; }
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-padding { padding: 4rem 0; }
@media (max-width: 768px) { .section-padding { padding: 2.5rem 0; } }

.text-center { text-align: center; }
.badge {
  display: inline-block;
  padding: 0.35em 0.8em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: rgba(0, 51, 102, 0.1); color: var(--primary); }
.badge-accent { background: rgba(212, 175, 55, 0.15); color: #927310; }
.badge-success { background: rgba(5, 150, 105, 0.1); color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.section-title {
  position: relative;
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* Top Bar */
.top-bar {
  background: var(--primary-dark);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-contacts, .top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar a { color: #cbd5e1; }
.top-bar a:hover { color: var(--accent); }

/* Main Navbar & Header Dropdowns */
.main-header {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo img { height: 52px; width: auto; }
.brand-text h1 { font-size: 1.15rem; margin: 0; color: var(--primary-dark); line-height: 1.1; }
.brand-text span { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }

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

.nav-item { position: relative; }

.nav-link {
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem 0.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid var(--border);
  z-index: 1050;
}

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

.dropdown-item {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--surface-alt);
  color: var(--primary);
  padding-left: 1.5rem;
}

.btn-apply-nav {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #1e1b0c !important;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Language Toggle Switcher */
.lang-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
}

/* Mobile Drawer Toggle & Menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--primary-dark);
  cursor: pointer;
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1099;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}

.mobile-drawer {
  position: fixed;
  top: 0; right: -300px;
  width: 290px; height: 100vh;
  background: var(--surface);
  z-index: 1100;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  transition: var(--transition);
  box-shadow: -5px 0 25px rgba(0,0,0,0.2);
}

.mobile-drawer-overlay.active { opacity: 1; visibility: visible; }
.mobile-drawer.active { right: 0; }

@media (max-width: 991px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
}

/* Mobile Sticky Bottom Action Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary-dark);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
  z-index: 999;
  padding: 0.5rem 1rem;
}

.mobile-sticky-bar-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-sticky-item {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 2px;
}

.mobile-sticky-item i { font-size: 1.2rem; color: var(--accent); }

@media (max-width: 768px) {
  .mobile-sticky-bar { display: block; }
}

/* Countdown Banner */
.countdown-banner {
  background: linear-gradient(90deg, #1e3a8a, #003366);
  color: #fff;
  padding: 1.25rem 0;
  border-bottom: 2px solid var(--accent);
}

.countdown-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.countdown-boxes {
  display: flex;
  gap: 0.75rem;
}

.countdown-box {
  background: rgba(255,255,255,0.15);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-align: center;
  min-width: 55px;
}

.countdown-box .num { font-size: 1.25rem; font-weight: 800; color: var(--accent); display: block; line-height: 1; }
.countdown-box .lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Hero Banner */
.hero-section {
  position: relative;
  color: #fff;
  padding: 5rem 0 6rem;
  text-align: center;
}

.hero-content { max-width: 850px; margin: 0 auto; }
.hero-subtitle { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.95rem; margin-bottom: 0.75rem; }
.hero-title { color: #fff; font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.hero-description { font-size: 1.15rem; color: #cbd5e1; margin-bottom: 2rem; line-height: 1.7; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }
.btn-accent { background: var(--accent); color: #1a1505; }
.btn-accent:hover { background: var(--accent-hover); color: #1a1505; }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.4); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--primary-dark); }

/* Quick Action Cards */
.quick-actions-section { margin-top: -3rem; position: relative; z-index: 10; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

.quick-card {
  background: var(--surface);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-left: 5px solid var(--accent);
  transition: var(--transition);
}

.quick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.quick-card-icon { font-size: 2.5rem; color: var(--primary); }

/* Why KACST Grid */
.why-kacst-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

.why-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.why-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }

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

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-img { height: 200px; object-fit: cover; width: 100%; }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card-text { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.25rem; flex: 1; }

/* Notices Item */
.notice-item {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: var(--transition);
}

.notice-item.pinned { border-left-color: var(--accent); background: #fffdf5; }
.notice-item:hover { box-shadow: var(--shadow-md); }

/* Form Controls */
.form-card { background: var(--surface); padding: 2.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: 1px solid var(--border); }
@media (max-width: 640px) { .form-card { padding: 1.5rem; } }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-primary); font-size: 0.95rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; font-family: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* Footer */
.main-footer { background: var(--primary-dark); color: #cbd5e1; margin-top: auto; padding-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { color: var(--accent); font-size: 1.15rem; margin-bottom: 1.25rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { color: #94a3b8; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom { background: rgba(0,0,0,0.3); padding: 1.25rem 0; font-size: 0.85rem; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }

/* Table */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; background: #fff; }
.table th, .table td { padding: 0.85rem 1rem; border: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
.table th { background: var(--surface-alt); font-weight: 700; color: var(--primary-dark); }
.table tr:hover { background: rgba(248, 250, 252, 0.8); }
