:root {
  --primary-color: #003b73; /* Brilliant Royal Navy */
  --secondary-color: #d4af37; /* Premium Gold */
  --header-bg: #003b73; /* Forces header to stay dark and readable */
  --accent-color: #e63946;    
  --text-primary: #1f2933;
  --text-secondary: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-dark: #06121e;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary-color: #c9a24d;
  --secondary-color: #f3e5ab;
  --header-bg: #020617; /* Deep sleek black for dark mode header */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --bg-dark: #020617;
  --hero-overlay: rgba(2, 6, 23, 0.85);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.7;
  transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4 {
  color: #f1f5f9;
}

/* NEW: Top Announcement Bar */
.top-bar {
  background: var(--secondary-color);
  color: #000;
  text-align: center;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.top-bar a {
  color: #000;
  text-decoration: underline;
  margin-left: 10px;
}

/* Layout for Homepage with News Panel */
.home-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.main-content {
  flex: 3;
}

.news-panel {
  flex: 1;
  background: var(--bg-light);
  padding: 30px;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  max-height: 800px;
  overflow-y: auto;
  position: sticky;
  top: 120px;
}

.news-panel h3 {
  font-size: 22px;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news-item {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .news-item {
  border-bottom-color: rgba(255,255,255,0.1);
}

.news-date {
  font-size: 12px;
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 5px;
}

.news-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Header & Nav */
header {
  background: var(--header-bg);
  padding: 0 60px;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-container img {
  width: 220px;
  height: auto;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 25px;
  color: white;
  letter-spacing: 1px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

nav a:hover, nav a.active {
  color: var(--secondary-color);
}

#theme-toggle {
  background: transparent;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transition: var(--transition);
}

#theme-toggle:hover {
  background: var(--secondary-color);
  color: #000;
}

/* MISSING HERO SECTION RESTORED */
.hero {
  position: relative;
  height: 90vh;
  min-height: 650px;
  background: linear-gradient(rgba(0, 59, 115, 0.7), rgba(0, 59, 115, 0.8)), url('hero.jpg') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  color: white;
}

.hero-logo-container {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  margin-bottom: 35px;
  border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-logo-container img {
  max-width: 400px;
  display: block;
}

.hero h2 {
  font-size: 64px;
  color: white;
  margin-bottom: 20px;
  max-width: 900px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 22px;
  max-width: 700px;
  margin-bottom: 40px;
  opacity: 0.95;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
section {
  padding: 100px 60px;
  max-width: 1400px;
  margin: auto;
}

.section-title {
  font-size: 42px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
}

.bg-light { background-color: var(--bg-light); }

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

.card {
  background: var(--bg-white);
  padding: 50px 40px;
  border-radius: 8px;
  border-top: 5px solid var(--primary-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-10px);
  border-top-color: var(--secondary-color);
}

.card h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.card p {
  color: var(--text-secondary);
}

/* NEW: Project Accordion (Dropdown) */
.project-card {
  cursor: pointer;
  position: relative;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
  color: var(--secondary-color);
}

.project-desc {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  margin-top: 0;
}

.project-card.active .dropdown-icon {
  transform: rotate(180deg);
}

.project-card.active .project-desc {
  max-height: 300px;
  opacity: 1;
  margin-top: 15px;
}

/* Stats */
.stats {
  background: var(--primary-color);
  color: white;
}

.stat-box h3 {
  font-size: 56px;
  background: linear-gradient(45deg, var(--secondary-color), #f3e5ab);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: white;
  padding: 80px 60px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 15px;
  opacity: 0.7;
  max-width: 300px;
}

.footer-links h4 {
  color: white;
  margin-bottom: 25px;
  font-size: 18px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 15px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 18px 36px;
  background: var(--secondary-color);
  color: #000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.button:hover {
  background: #f3e5ab;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
  header { padding: 0 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .home-layout { flex-direction: column; }
  .news-panel { width: 100%; position: static; max-height: none; margin-top: 40px; }
}

@media (max-width: 768px) {
  .hero h2 { font-size: 40px; }
  section { padding: 60px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  nav { display: none; }
}
/* --- NEW SCROLL ANIMATION --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the animations so cards load one after another */
.grid .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.grid .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.grid .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.grid .animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.grid .animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.grid .animate-on-scroll:nth-child(6) { transition-delay: 0.6s; }