/* Custom CSS Variables */
/* ==========================================
   MIEM LOGO-MATCHED DESIGN SYSTEM & VARIABLES
   ========================================== */

:root {
  /* Exact Colors Extracted from the MIEM Logo */
  --primary-blue: #0A1E3F;       /* Deep Logo Navy (Outer gear & main headers) */
  --primary-dark: #050F22;       /* Darker Navy Contrast */
  --accent-cyan: #00B4D8;        /* Logo Cyan/Electric Blue (Tech accents) */
  --accent-cyan-hover: #0096B4;  /* Darker cyan for button hovers */
  
  /* Retaining legacy compatibility variable names */
  --accent-gold: #00B4D8;        
  --accent-gold-hover: #0096B4;  

  /* Neutral Palette */
  --dark-gray: #1A1A1A;          /* Main text & footer background */
  --light-gray: #F0F4F8;         /* Clean ice-blue-gray section background */
  --white: #FFFFFF;              /* Pure white panels & cards */
  --text-dark: #222222;          /* High-contrast body text */
  --text-muted: #555555;         /* Secondary descriptions */
  --border-color: #D1D9E0;       /* Clean structural borders */
  
  /* Typography & Transitions */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-speed: 0.3s;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ==========================================
   AI VIRTUAL ASSISTANT WIDGET STYLING
   ========================================== */

.ai-chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1050;
  font-family: var(--font-family);
}

.ai-chat-toggle-btn {
  width: 60px;
  height: 60px;
  background-color: var(--primary-blue);
  color: var(--accent-gold);
  border: 3px solid var(--accent-gold);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform var(--transition-speed) ease;
}

.ai-chat-toggle-btn:hover {
  transform: scale(1.08);
}

.ai-pulse-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background-color: #22c55e;
  border: 2px solid var(--white);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ai-chat-box {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 350px;
  max-width: 90vw;
  height: 480px;
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-speed) ease;
}

.ai-chat-box.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ai-chat-header {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent-gold);
}

.ai-avatar {
  width: 35px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ai-close-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

.ai-chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: var(--light-gray);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 85%;
}

.bot-message {
  background-color: var(--white);
  color: var(--text-dark);
  align-self: flex-start;
  border-left: 3px solid var(--primary-blue);
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.user-message {
  background-color: var(--primary-blue);
  color: var(--white);
  align-self: flex-end;
}

.ai-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  color: var(--primary-blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.ai-chat-footer {
  padding: 10px;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.ai-chat-footer input {
  font-size: 0.88rem;
  padding: 8px 12px;
}

.ai-chat-footer button {
  padding: 8px 14px;
}



body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--dark-gray);
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-info span {
  margin-right: 15px;
}

.portal-links a {
  color: var(--white);
  text-decoration: none;
  margin-left: 15px;
  transition: color var(--transition-speed);
}

.portal-links a:hover {
  color: var(--accent-gold);
}

/* Header & Main Navigation */
.main-header {
  background-color: var(--primary-blue);
  border-bottom: 3px solid var(--accent-gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.brand-logo {
  text-decoration: none;
}

.brand-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  font-size: 0.70rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Navigation Menu Rules */
.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-link i {
  font-size: 0.60rem;
  margin-left: 0.1px;
}

.nav-item:hover > .nav-link,
.nav-item.active > .nav-link {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
}

/* Dropdown Base Styles */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background-color: var(--white);
  list-style: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--accent-gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-speed) ease;
  z-index: 99;
}

.dropdown-item {
  position: relative;
}

.dropdown-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dropdown-link i {
  font-size: 0.7rem;
}

.dropdown-item:hover > .dropdown-link {
  background-color: var(--light-gray);
  color: var(--primary-blue);
  padding-left: 20px;
}

/* Nested Submenu Dropdowns */
.dropdown-nested {
  top: 0;
  left: 100%;
  border-top: none;
  border-left: 3px solid var(--accent-gold);
}

/* Desktop Hover Triggers */
@media (min-width: 993px) {
  .nav-item:hover > .dropdown,
  .dropdown-item:hover > .dropdown-nested {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 51, 102, 0.85)), url('https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 750px;
  margin: 0 auto 30px auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--accent-gold);
  color: var(--dark-gray);
}

.btn-primary:hover {
  background-color: #b8962d;
  color: var(--white);
}

.btn-secondary {
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-blue);
}

/* Card Section Highlights */
.highlights-section {
  padding: 60px 0;
  background-color: var(--light-gray);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  color: var(--primary-blue);
  font-size: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
}

/* Footer Styling */
.main-footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding-bottom: 30px;
}

.footer-col h4 {
  color: var(--accent-gold);
  margin-bottom: 15px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li a {
  color: #ccc;
  text-decoration: none;
  line-height: 2;
  transition: color var(--transition-speed);
}

.footer-col ul li a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 15px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

/* Responsive Mobile Navigation Drawer */
@media (max-width: 992px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--primary-blue);
    flex-direction: column;
    padding-top: 60px;
    transition: right var(--transition-speed) ease;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .dropdown,
  .dropdown-nested {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.15);
    display: none;
  }

  .dropdown-nested {
    background-color: rgba(0, 0, 0, 0.3);
  }

  .dropdown-link {
    color: var(--white);
  }

  .nav-item.open > .dropdown,
  .dropdown-item.open > .dropdown-nested {
    display: block;
  }
}



/* Custom Design Variables */
:root {
  --primary-blue: #003366;
  --accent-gold: #d4af37;
  --dark-gray: #1a1a1a;
  --light-gray: #f4f6f9;
  --white: #ffffff;
  --text-dark: #333333;
  --text-muted: #666666;
  --border-color: #e2e8f0;
  --transition-speed: 0.3s;
}

/* Base Utility Classes */
.text-gold { color: var(--accent-gold) !important; }
.text-center { text-align: center; }
.sub-heading {
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 5px;
}
.badge {
  background-color: var(--accent-gold);
  color: var(--dark-gray);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 15px;
  text-transform: uppercase;
}

/* SECTION 1: Slider Carousel */
.slider-section {
  position: relative;
  overflow: hidden;
  height: 550px;
}
.slider-container {
  height: 100%;
  position: relative;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-content { color: var(--white); max-width: 800px; }
.slide-content h1 { font-size: 2.8rem; margin-bottom: 15px; line-height: 1.2; }
.slide-content p { font-size: 1.2rem; margin-bottom: 25px; color: #e0e0e0; }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-speed);
}
.slider-btn:hover { background: var(--accent-gold); color: var(--dark-gray); }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background var(--transition-speed);
}
.dot.active { background: var(--accent-gold); width: 28px; border-radius: 6px; }

/* SECTION 2: Ticker Bar */
.ticker-bar {
  background-color: var(--primary-blue);
  color: var(--white);
  border-bottom: 2px solid var(--accent-gold);
  padding: 10px 0;
  font-size: 0.9rem;
}
.ticker-container { display: flex; align-items: center; overflow: hidden; }
.ticker-label { font-weight: 800; color: var(--accent-gold); margin-right: 15px; white-space: nowrap; }
.ticker-text { white-space: nowrap; animation: ticker 25s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* SECTION 3: Stats Counters */
.stats-section { background-color: var(--white); padding: 40px 0; border-bottom: 1px solid var(--border-color); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; }
.stat-box i { font-size: 2.2rem; color: var(--primary-blue); margin-bottom: 10px; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--primary-blue); }

/* SECTION 4: Welcome Section */
.welcome-section { padding: 80px 0; background-color: var(--white); }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.welcome-image { position: relative; }
.welcome-image img { width: 100%; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.welcome-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: var(--primary-blue);
  color: var(--accent-gold);
  padding: 15px 25px;
  font-weight: 700;
  border-left: 4px solid var(--accent-gold);
  border-radius: 4px;
}
.welcome-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; font-weight: 600; }
.welcome-features i { color: var(--accent-gold); margin-right: 6px; }

/* SECTION 5: Academic Divisions Showcase (Tabs) */
.divisions-showcase { padding: 80px 0; background-color: var(--light-gray); }
.tab-buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.tab-btn {
  background: var(--white);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  font-weight: 700;
  color: var(--text-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-speed);
}
.tab-btn.active, .tab-btn:hover { background: var(--primary-blue); color: var(--accent-gold); border-color: var(--primary-blue); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }
.tab-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.tab-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.course-list { list-style: none; margin: 20px 0; }
.course-list li { padding: 6px 0; font-weight: 600; }
.course-list i { color: var(--accent-gold); margin-right: 8px; }

/* SECTION 6: Campus Life Facilities */
.facilities-section { padding: 80px 0; background: var(--white); }
.card-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px 6px 0 0; }
.card-body { padding: 20px; }

/* SECTION 7: News & Events Grid */
.news-events-section { padding: 80px 0; background: var(--light-gray); }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.news-card, .event-card { display: flex; gap: 20px; background: var(--white); padding: 20px; border-radius: 6px; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); }
.news-date { background: var(--primary-blue); color: var(--white); padding: 12px; text-align: center; border-radius: 4px; min-width: 65px; height: 65px; }
.news-date .day { font-size: 1.4rem; font-weight: 800; display: block; line-height: 1; }
.news-date .month { font-size: 0.75rem; color: var(--accent-gold); font-weight: 700; }
.news-content h4 a, .event-content h4 a { color: var(--primary-blue); text-decoration: none; font-size: 1.05rem; }
.event-icon { font-size: 2rem; color: var(--accent-gold); padding: 10px; }
.event-time { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 5px; }

/* SECTION 8: CTA Banner */
.cta-banner { background: linear-gradient(rgba(0,51,102,0.9), rgba(0,51,102,0.9)), url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=1200&q=80') center/cover; padding: 60px 0; text-align: center; color: var(--white); }
.cta-content h2 { font-size: 2.2rem; margin-bottom: 15px; }
.cta-content p { max-width: 700px; margin: 0 auto 25px auto; font-size: 1.1rem; color: #ddd; }

/* EXPANDED FOOTER */
.main-footer { background-color: var(--dark-gray); color: #bbb; padding-top: 60px; font-size: 0.9rem; }
.footer-content { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 40px; }
.footer-brand { color: var(--white); margin-bottom: 15px; letter-spacing: 1px; }
.social-links { display: flex; gap: 10px; margin-top: 15px; }
.social-links a { width: 35px; height: 35px; background: rgba(255,255,255,0.1); color: var(--white); display: flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; transition: background var(--transition-speed); }
.social-links a:hover { background: var(--accent-gold); color: var(--dark-gray); }

.footer-col h4 { color: var(--white); margin-bottom: 15px; font-size: 1.05rem; border-left: 3px solid var(--accent-gold); padding-left: 10px; }
.footer-col ul { list-style: none; }
.footer-col ul li a { color: #bbb; text-decoration: none; line-height: 2.2; transition: color var(--transition-speed); }
.footer-col ul li a:hover { color: var(--accent-gold); padding-left: 4px; }
.footer-col p { line-height: 1.8; margin-bottom: 10px; }

.footer-bottom { background: #111; padding: 18px 0; border-top: 1px solid #222; }
.footer-bottom-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 0.85rem; }
.legal-links a { color: #888; text-decoration: none; margin: 0 5px; }
.legal-links a:hover { color: var(--accent-gold); }

/* Responsive adjustments */
@media (max-width: 992px) {
  .welcome-grid, .tab-grid, .grid-2-col, .footer-content { grid-template-columns: 1fr; }
  .slider-section { height: 450px; }
  .slide-content h1 { font-size: 2rem; }
}




/* Page Title Banner */
.page-banner {
  background: linear-gradient(rgba(0, 51, 102, 0.9), rgba(0, 51, 102, 0.9)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1400&q=80') center/cover;
  color: var(--white);
  padding: 60px 0;
}
.page-banner h1 { font-size: 2.4rem; margin-bottom: 10px; }
.page-banner p { color: var(--accent-gold); font-size: 1.1rem; }

/* Qualification Levels Section */
.qual-levels-section { padding: 60px 0; background-color: var(--white); }
.border-top-accent { border-top: 4px solid var(--accent-gold); }

/* Program Tables Styling */
.program-table-section { padding: 60px 0; }
.division-header { margin-bottom: 25px; }
.division-header h2 { color: var(--primary-blue); font-size: 1.8rem; margin-bottom: 5px; }
.division-header p { color: var(--text-muted); }

.table-responsive { overflow-x: auto; }
.course-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-radius: 6px;
  overflow: hidden;
}

.course-table th, .course-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.course-table th {
  background-color: var(--primary-blue);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}

.course-table tbody tr:hover { background-color: #f1f5f9; }

/* Level Badges */
.level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
}
.level-badge.nc { background-color: #e0f2fe; color: #0369a1; }
.level-badge.nd { background-color: #fef3c7; color: #92400e; }
.level-badge.hnd { background-color: #dcfce7; color: #15803d; }


/* ==========================================
   RESEARCH & INNOVATIONS HUB STYLING
   ========================================== */

.research-hub-section {
  padding: 80px 0;
  background-color: var(--light-gray);
  border-top: 1px solid var(--border-color);
}

.research-content h3 {
  font-size: 1.6rem;
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 15px;
}

.research-content p {
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 15px;
}

.research-content ul li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark);
}

.research-image-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed) ease;
}

.research-image-card:hover {
  transform: translateY(-5px);
}

.research-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Specific Card Tweaks for Innovation Grid */
.border-top-accent {
  border-top: 4px solid var(--accent-gold) !important;
  border-radius: 6px;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.border-top-accent:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.border-top-accent h4 {
  color: var(--primary-blue);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.border-top-accent p {
  font-size: 0.88rem;
  line-height: 1.6;
}




/* Application Form Styling */
.form-container {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  max-width: 900px;
  margin: 0 auto;
}

.poly-form .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.poly-form .form-group {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
}

.poly-form label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.poly-form .form-control {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color var(--transition-speed);
}

.poly-form .form-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.poly-form .form-control-file {
  padding: 8px 0;
}



/* Timeline Styles for History Section */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 30px;
  border-left: 3px solid var(--accent-gold);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  border: 3px solid var(--accent-gold);
}

.timeline-year {
  font-weight: 800;
  color: var(--primary-blue);
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.timeline-content {
  background: var(--white);
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.timeline-content h4 {
  color: var(--primary-blue);
  margin-bottom: 8px;
  font-size: 1.1rem;
}


/* ==========================================
   GALLERY & RESEARCH HUB STYLES
   ========================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 240px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 30, 63, 0.95));
  color: var(--white);
  padding: 20px 15px 12px 15px;
  transform: translateY(100%);
  transition: transform var(--transition-speed) ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--accent-cyan);
}

.gallery-overlay p {
  font-size: 0.8rem;
  color: #ddd;
  margin: 0;
}


/* ==========================================
   FIX DESKTOP NAVIGATION OVERFLOW
   ========================================== */

.main-header .container.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap; /* Prevent elements from dropping to a new line */
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand-logo {
  flex-shrink: 0; /* Keep the logo fixed and prevent it from shrinking */
}

.nav-menu {
  display: flex;
  align-items: right;
  gap: 1px; /* Control exact spacing between menu items */
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-item .nav-link {
  font-size: 0.88rem; /* Slightly compact font size to fit all 9 links */
  padding: 6px 8px;   /* Reduce horizontal padding */
  white-space: nowrap; /* Prevent text inside links from wrapping */
}

/* ==========================================
   BUTTON HOVER & INTERACTIVE STYLES
   ========================================== */

.btn-accent {
  background-color: var(--accent-cyan);
  color: var(--primary-blue);
  transition: all var(--transition-speed) ease;
}

.btn-accent:hover {
  background-color: var(--accent-cyan-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 180, 216, 0.4);
}

.btn-outline-light:hover {
  background-color: var(--white);
  color: var(--primary-blue) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.25);
}




/* ==========================================
   PORTFOLIO CARD & MODAL STYLES
   ========================================== */
.portfolio-trigger-card {
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}
.portfolio-trigger-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(10, 30, 63, 0.15) !important;
}

.portfolio-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 15, 34, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    padding: 20px;
}
.portfolio-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.portfolio-modal-content {
    background: var(--white);
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 5px solid var(--accent-cyan);
    transform: scale(0.9);
    transition: transform var(--transition-speed) ease;
}
.portfolio-modal-backdrop.active .portfolio-modal-content {
    transform: scale(1);
}




/* ==========================================
   RESEARCH HUB & FOCUS AREAS SECTION STYLING
   ========================================== */

.research-hub-section {
  position: relative;
  background-color: var(--light-gray);
}

/* Section Header & Subheading polish */
.research-hub-section .sub-heading {
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.research-hub-section h2 {
  color: var(--primary-blue);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 8px;
  margin-bottom: 15px;
}

/* Card layout & smooth hover lift */
.research-hub-section .card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.research-hub-section .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(10, 30, 63, 0.1) !important;
}

/* Accent top border styling support */
.card.border-top-accent {
  border-top: 4px solid var(--accent-cyan) !important;
}

/* Icon & typography sizing inside cards */
.research-hub-section .card .card-icon,
.research-hub-section .card .text-primary {
  color: var(--primary-blue) !important;
}

.research-hub-section .card h3, 
.research-hub-section .card h4,
.research-hub-section .card h5 {
  color: var(--primary-blue);
  font-weight: 700;
}

.research-hub-section .card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Additional Theme Cards Border Highlight */
.research-hub-section .card.border-start {
  border-left-color: var(--accent-cyan) !important;
}



/* ==========================================
   HERO SLIDER TEXT VISIBILITY FIX
   ========================================== */

.hero-slider-section {
  color: #ffffff !important;
}

.hero-slider-section h1,
.hero-slider-section h2,
.hero-slider-section h3,
.hero-slider-section p,
.hero-slider-section span {
  color: #ffffff !important;
}

.hero-slider-section .sub-heading {
  color: var(--accent-cyan, #00B4D8) !important;
}

.hero-slider-section .btn-outline-light {
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.hero-slider-section .btn-outline-light:hover {
  background-color: #ffffff !important;
  color: #0A1E3F !important;
}