/* --- Global Styles & Resets --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Merriweather:wght@400;700&display=swap');

:root {
  --primary-color: #212121;
  --secondary-color: #1A237E;
  --accent-color: #4FC3F7;
  --background-light: #FAFAFA;
  --background-white: #FFFFFF;
  --text-dark: #212121;
  --text-light: #FFFFFF;
  --text-muted: #6c757d;
  --border-color: #e0e0e0;
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Merriweather', serif;

  --spacing-xs: 4px;
  --spacing-s: 8px;
  --spacing-m: 16px;
  --spacing-l: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 64px;
  --spacing-xxxl: 80px;

  --border-radius: 8px;
  --shadow-light: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-medium: 0 8px 24px rgba(0,0,0,0.1);
  --transition-speed: 0.3s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--background-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin-bottom: var(--spacing-m); }
a { color: var(--secondary-color); text-decoration: none; transition: var(--transition-speed); }
a:hover { color: var(--accent-color); text-decoration: underline; }
ul, ol { list-style-position: inside; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: var(--spacing-xxxl) 0;
}

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

.section-dark {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.section-dark h1, .section-dark h2, .section-dark h3 {
    color: var(--text-light);
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  padding: var(--spacing-m) var(--spacing-xl);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition-speed);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--accent-color);
  color: var(--text-dark);
  text-decoration: none;
}

.text-center { text-align: center; }
.section-title { margin-bottom: var(--spacing-xxl); }

/* --- Header & Navigation --- */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--background-white);
  z-index: 1000;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed);
}

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

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

.logo:hover {
  text-decoration: none;
  color: var(--secondary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-links li {
  margin-left: var(--spacing-l);
  position: relative;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
}

.nav-links a.active, .nav-links a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--background-white);
  min-width: 240px;
  box-shadow: var(--shadow-medium);
  border-radius: var(--border-radius);
  padding: var(--spacing-s) 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed), visibility var(--transition-speed), top var(--transition-speed);
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  visibility: visible;
  top: 100%;
}

.dropdown-content a {
  display: block;
  padding: var(--spacing-m);
  width: 100%;
  color: var(--text-dark);
}

.dropdown-content a:hover {
  background-color: var(--background-light);
}

.mobile-menu-toggle { display: none; }

/* Breadcrumbs */
.breadcrumbs {
    padding: var(--spacing-l) 0;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.breadcrumbs li + li::before {
    content: '/';
    margin: 0 var(--spacing-s);
    color: var(--text-muted);
}
.breadcrumbs a {
    color: var(--secondary-color);
}
.breadcrumbs a:hover {
    color: var(--accent-color);
}
.breadcrumbs li[aria-current="page"] {
    color: var(--text-muted);
}


/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: center;
  padding: var(--spacing-xxxl) 0;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(33, 33, 33, 0.7);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  color: var(--text-light);
  margin-bottom: var(--spacing-l);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
}

.hero-article {
    min-height: 40vh;
    background: var(--primary-color);
}
.hero-article h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}
.hero-article::before {
    display: none;
}
.article-meta {
    margin-top: var(--spacing-m);
    font-family: var(--font-heading);
    color: var(--text-muted);
}


/* --- Homepage Sections --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.text-block {
    background-color: var(--background-light);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    border-left: 5px solid var(--secondary-color);
    transition: var(--transition-speed);
}

.text-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.text-block h3 { margin-bottom: var(--spacing-m); }
.text-block a { font-weight: bold; }

.publication-list li {
    padding: var(--spacing-l) 0;
    border-bottom: 1px solid var(--border-color);
    list-style: none;
}
.publication-list li:last-child { border-bottom: none; }
.publication-list h3 { 
    margin-bottom: var(--spacing-s); 
    font-size: 1.25rem;
}

/* --- About Page --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}
@media (min-width: 992px) {
    .about-grid { grid-template-columns: 1fr 1fr; }
}
.about-grid img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 500px;
}
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}
.principle-card {
    background: var(--background-white);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
}
.principle-card h3 {
    margin-bottom: var(--spacing-m);
    color: var(--secondary-color);
}
.principle-card .icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-m);
}

/* --- Article Pages --- */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}
.article-content img, .article-content .diagram-placeholder {
    margin: var(--spacing-xl) 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}
.diagram-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--background-light);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    color: var(--text-muted);
}
.related-articles {
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xxl);
}

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xxl);
}
@media (min-width: 992px) {
    .contact-grid { grid-template-columns: 1fr 1.2fr; }
}

.contact-info ul { list-style: none; padding: 0; }
.contact-info li { display: flex; align-items: flex-start; margin-bottom: var(--spacing-l); }
.contact-info .icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: var(--spacing-m);
    margin-top: 5px;
    width: 24px;
    text-align: center;
}

.form-group { margin-bottom: var(--spacing-l); }
.form-group label {
    display: block;
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-s);
    font-weight: 600;
}
.form-control {
    width: 100%;
    padding: var(--spacing-m);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-speed);
}
.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.2);
}
textarea.form-control { min-height: 150px; resize: vertical; }

.form-disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: var(--spacing-m);
}

.map-container {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  margin-top: var(--spacing-xxl);
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* --- Legal & Thank You Page --- */
.legal-content, .thank-you-section {
    max-width: 800px;
    margin: 0 auto;
}
.legal-content h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-m);
}

.thank-you-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.thank-you-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}
.thank-you-icon svg { width: 40px; height: 40px; color: white; }
.thank-you-section p { font-size: 1.2rem; max-width: 600px; margin-bottom: var(--spacing-xl); }

/* --- Footer --- */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: var(--spacing-xxl) 0 var(--spacing-xl) 0;
}

.footer a {
  color: var(--text-light);
  opacity: 0.8;
}

.footer a:hover {
  opacity: 1;
  text-decoration: none;
  color: var(--accent-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xxl);
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--text-light);
  margin-bottom: var(--spacing-l);
  font-weight: 600;
}

.footer-col p {
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer-nav {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: var(--spacing-s);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* --- Cookie Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(33, 33, 33, 0.95);
  color: var(--text-light);
  padding: var(--spacing-l);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-l);
  backdrop-filter: blur(5px);
  font-size: 0.95rem;
}

#cookie-banner p {
  margin: 0;
}

#cookie-banner-actions {
  display: flex;
  gap: var(--spacing-m);
  flex-shrink: 0;
}

#cookie-banner-actions button {
  padding: var(--spacing-s) var(--spacing-l);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
}

#cookie-banner-actions .accept {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

#cookie-banner-actions .decline {
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--background-white);
    flex-direction: column;
    padding: var(--spacing-l) 0;
    box-shadow: var(--shadow-medium);
  }
  
  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: var(--spacing-m) 0;
    width: 100%;
    text-align: center;
  }
  
  .dropdown:hover .dropdown-content {
      display: none;
  }
  .dropdown.open .dropdown-content {
      display: block;
      position: static;
      transform: none;
      box-shadow: none;
      background: var(--background-light);
      min-width: unset;
      width: 100%;
  }

  .mobile-menu-toggle {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
  }

  .hero { min-height: 60vh; }
  .section { padding: var(--spacing-xxl) 0; }
  #cookie-banner { flex-direction: column; text-align: center; }
}

/* Scroll up button */
.scroll-up {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--secondary-color);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-speed);
}
.scroll-up.show {
    opacity: 1;
    visibility: visible;
}