:root {
  --primary-color: #003366;
  --accent-color: #6A7D8E;
  --background-color: #F5F5F5;
  --text-color: #333333;
  --text-light: #F5F5F5;
  --text-muted: #555;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --footer-bg: #222222;
  --font-family: 'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(45deg, #eef3f7, #dbe9f3, #eef3f7);
  background-size: 400% 400%;
  animation: gradientBG 25s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
p { margin-bottom: 1rem; }
a { color: var(--accent-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-color); }

/* Header */
.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(245, 245, 245, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 51, 102, 0.1);
  transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}
.logo:hover { color: var(--accent-color); }

.nav-links ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--background-color);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
  flex-direction: column;
  padding: 0.5rem 0;
  min-width: 250px;
  gap: 0;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-menu li { width: 100%; }

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  width: 100%;
}
.dropdown-menu a::after { content: none; }
.dropdown-menu a:hover { background-color: rgba(0, 51, 102, 0.05); }

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('https://images.pexels.com/photos/8376285/pexels-photo-8376285.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940') no-repeat center center/cover;
}
.hero.short-hero { min-height: 40vh; }

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 51, 102, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-light);
}

.hero-title {
  color: var(--text-light);
  max-width: 900px;
  margin: 0 auto;
}

.institutional-filter {
  filter: grayscale(1) sepia(0.2) brightness(0.9);
}

/* Wave Dividers */
.wave-divider, .wave-divider-flip {
  position: relative;
  background-color: var(--background-color);
}

.wave-divider svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100px;
}

.wave-divider .shape-fill {
  fill: var(--primary-color);
  opacity: 0.1;
}

.wave-divider-flip { background: none; }
.wave-divider-flip svg { transform: rotate(180deg); }
.wave-divider-flip .shape-fill { fill: #f5f5f5 }

/* Content Sections */
.content-section {
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}
.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.intro-text, .text-links-section {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}
.text-links-section ul {
    list-style-position: inside;
    padding-left: 1rem;
    margin: 2rem 0;
}
.text-links-section li { margin-bottom: 1rem; }

/* Glassmorphism Grid */
.overview-section {
  padding: 80px 20px;
  background: var(--primary-color);
  color: var(--text-light);
}
.overview-section .section-title, .overview-section .section-subtitle { color: var(--text-light); }
.overview-section a { color: #b3cde0; }
.overview-section a:hover { color: #ffffff; }

.glass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* About Page */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}
.about-content img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    background: none;
    color: var(--text-color);
}
.values-grid .glass-card {
    background: white;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    border: 1px solid #eee;
    backdrop-filter: none;
}
.values-grid .glass-card h3 { color: var(--primary-color); }

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}
.article-content .lead {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 1.5rem;
}
.article-subtitle {
     margin-top: 3rem;
     margin-bottom: 1.5rem;
     border-bottom: 1px solid #ddd;
     padding-bottom: 0.5rem;
}
.article-content img {
    width: 100%;
    border-radius: 12px;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.callout-box {
    background-color: rgba(0, 51, 102, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 0 8px 8px 0;
}
.callout-box p { margin-bottom: 0; }

/* Structural Diagram */
.structural-diagram {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}
.diagram-level { margin-bottom: 2rem; }
.diagram-level:last-child { margin-bottom: 0; }
.diagram-level h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.diagram-box {
    display: inline-block;
    background: var(--background-color);
    border: 1px solid #ccc;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
}
.diagram-box.small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.diagram-box.tiny { padding: 0.3rem 0.8rem; font-size: 0.8rem; font-weight: 400; }
.diagram-box-group { display: flex; justify-content: center; gap: 1rem; }
.diagram-connectors { position: relative; height: 30px; }
.diagram-connectors .connector {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #ccc;
}
.diagram-connectors .connector-down::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #ccc;
}
.diagram-connectors .connector-down::after {
    content: '';
    position: absolute;
    left: 25%;
    top: 30px;
    width: 50%;
    height: 2px;
    background: #ccc;
}
.diagram-flow {
    position: absolute;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
}
.diagram-flow.top-down { top: 50%; left: 20px; transform: translateY(-50%); }
.diagram-flow.bottom-up { bottom: 30%; right: 20px; transform: translateY(50%);}

/* Contact Page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}
.info-item { margin-bottom: 2rem; }
.info-item h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.contact-form .form-note { color: var(--text-muted); font-style: italic; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: var(--font-family);
  background: white;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
}
.cta-button {
  display: inline-block;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(106, 125, 142, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(106, 125, 142, 0); }
    100% { box-shadow: 0 0 0 0 rgba(106, 125, 142, 0); }
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
  animation: none;
}
.map-container { position: relative; width: 100%; padding-top: 50%; border-radius: 12px; overflow: hidden; margin-top: 4rem; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Legal Content */
.legal-content h3 {
    margin-top: 2.5rem; margin-bottom: 1rem;
}
.legal-content ul {
    list-style-position: inside;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

/* Thank you & 404 Page */
.thank-you-section {
  min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px;
}
.thank-you-icon { width: 80px; height: 80px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.thank-you-icon.error-icon { background: #d32f2f; }
.thank-you-icon svg { width: 40px; height: 40px; color: white; }
.thank-you-section h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 20px; }
.thank-you-section p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin-bottom: 30px; }
.thank-you-section .cta-button { animation: none; }

/* Footer */
.main-footer {
  background-color: var(--footer-bg);
  color: #ccc;
  padding: 80px 0 30px;
  position: relative;
}
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-column h4 { color: white; margin-bottom: 1.5rem; }
.footer-column p, .footer-column li { font-size: 0.9rem; }
.footer-column a { color: #ccc; }
.footer-column a:hover { color: white; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 0.75rem; }
.footer-bottom { border-top: 1px solid #444; padding-top: 30px; text-align: center; font-size: 0.9rem; }
.footer-bottom p { margin: 0; }

.disclaimer-section {
  background-color: rgba(255,255,255,0.05);
  color: #bbb;
  padding: 20px 30px;
  margin: 0 auto 30px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #444;
  max-width: 100%;
}
.disclaimer-section strong {
  display: block;
  margin-bottom: 8px;
  color: #eee;
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  color: var(--text-light);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  font-size: 0.9rem;
}
#cookie-banner p { margin: 0; }
.cookie-buttons { display: flex; gap: 0.5rem; flex-shrink: 0; }
#cookie-banner button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  background: var(--accent-color);
  color: white;
  transition: background-color 0.3s ease;
}
#cookie-banner button.decline { background-color: transparent; border: 1px solid var(--accent-color); color: var(--text-light); }
#cookie-banner button:hover { background-color: var(--primary-color); }
#cookie-banner button.decline:hover { background-color: rgba(255,255,255,0.1); }


/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}

#back-to-top:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

/* Responsive */
@media (max-width: 992px) {
  .about-content { grid-template-columns: 1fr; }
  .about-content img { grid-row: 1; margin-bottom: 2rem; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .diagram-flow { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Initially hidden */
    width: 60%;
    max-width: 300px;
    height: 100vh;
    background: var(--background-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    flex-direction: column;
    justify-content: center;
    transition: right 0.4s ease-in-out;
  }
  .nav-links.open { right: 0; }
  .nav-links ul { flex-direction: column; align-items: center; gap: 1rem; }
  .nav-links a { font-size: 1.2rem; }
  .dropdown ul {
      position: static;
      display: flex;
      background: none;
      box-shadow: none;
      padding: 0;
      margin-top: 1rem;
      text-align: center;
  }
  .dropdown:hover .dropdown-menu { display: flex; }
  .mobile-menu-toggle { display: block; }

  .mobile-menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  
  #cookie-banner {
    flex-direction: column;
    text-align: center;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}