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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
}

/* --- Root Variables & Theming --- */
:root {
  --primary-color: #0A1128;
  --primary-color-light: #2c3e50;
  --accent-color: #6497B1;
  --background-color: #F5F5F5;
  --section-bg-alt: #FFFFFF;
  --text-color: #333333;
  --text-light: #555555;
  --border-color: #e0e0e0;
  --white: #FFFFFF;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
  --spacing-xxl: 120px;

  --border-radius: 12px;
  --transition-speed: 0.3s;
}

/* --- Global & Helper Classes --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin-inline: auto;
}

.section {
  padding-block: clamp(60px, 10vw, var(--spacing-xxl));
}

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

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
}

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

.d-none { display: none; }

/* --- Header & Navigation --- */
.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
}

.main-header.scrolled {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-weight: 600;
  color: var(--primary-color-light);
  padding: 10px 0;
  position: relative;
  text-decoration: none;
}

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

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

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 120%;
  left: -20px;
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  padding: var(--spacing-sm);
  min-width: 220px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, visibility 0s var(--transition-speed) linear;
}

.nav-links .dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  font-weight: 500;
  white-space: nowrap;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background-color: var(--background-color);
  color: var(--primary-color);
  text-decoration: none;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--primary-color);
}

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 17, 40, 0.8), rgba(100, 151, 177, 0.5));
  z-index: 1;
}

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

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  max-width: 750px;
  margin: 0 auto;
  opacity: 0.9;
}

/* --- Features / Overview Section (Glassmorphism Cards) --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.feature-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

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

/* --- Preview/Services Cards --- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.preview-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

.preview-card:hover {
  transform: translateY(-8px);
}

.preview-card-content {
  padding: var(--spacing-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.preview-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.preview-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.preview-card a.text-link {
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  margin-top: auto;
}

.preview-card a.text-link:hover {
  text-decoration: underline;
}

/* --- About & Content Sections --- */
.content-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.content-section img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  width: 100%;
  height: 100%;
  max-height: 500px;
}

.content-section .text-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-md);
}

.content-section .text-content p {
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

/* --- Article Content --- */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2, .article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p, .article-content li {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-light);
}

.article-content ul, .article-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: #f9f9f9;
    padding-block: 1rem;
}

.diagram-placeholder {
    border: 2px dashed var(--border-color);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-light);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
    background-color: var(--section-bg-alt);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.contact-info-item {
  display: flex;
  align-items: start;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

.contact-info-item i {
  color: var(--accent-color);
  font-size: 1.5rem;
  margin-top: 4px;
}

.contact-info-item a {
  color: var(--text-color);
}
.contact-info-item a:hover {
  color: var(--accent-color);
}

.contact-form .form-group {
  margin-bottom: var(--spacing-md);
}

.contact-form label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color var(--transition-speed);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(100, 151, 177, 0.2);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-notice {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.btn-submit {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--white);
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-submit:hover {
  background-color: #538196;
  transform: translateY(-2px);
  text-decoration: none;
}

.map-container {
  width: 100%;
  height: 450px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Legal Page --- */
.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.legal-content h2:first-of-type {
    margin-top: 0;
}
.legal-content p, .legal-content li {
    margin-bottom: 1rem;
    color: var(--text-light);
}
.legal-content ul {
    margin-left: 1.5rem;
}

/* --- Thank You & 404 Page --- */
.utility-page-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.utility-page-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.utility-page-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.utility-page-section h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
}

.utility-page-section p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin-bottom: 30px;
}
.btn-home {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}
.btn-home:hover {
  background-color: var(--primary-color-light);
  transform: translateY(-2px);
  text-decoration: none;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--primary-color);
  color: #a7b4c2;
  padding-block: var(--spacing-xl);
  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-light));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.footer-column h4 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
}

.footer-column p, .footer-column a {
  color: #a7b4c2;
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.7;
}

.footer-column a {
  display: block;
}

.footer-column a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--primary-color-light);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.9rem;
}

/* --- Cookie Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(10, 17, 40, 0.95);
  color: var(--white);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  z-index: 9999;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
  display: none; /* Hidden by default */
}

#cookie-banner p {
  flex-grow: 1;
  min-width: 250px;
  margin-right: 1rem;
}

#cookie-banner p a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.cookie-btn.accept {
  background-color: var(--accent-color);
  color: var(--white);
}

.cookie-btn.accept:hover {
  background-color: #538196;
}

.cookie-btn.decline {
  background-color: transparent;
  color: #a7b4c2;
  border: 1px solid #a7b4c2;
}

.cookie-btn.decline:hover {
  background-color: var(--primary-color-light);
  color: white;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s, transform 0.3s;
}

.scroll-to-top:hover {
  background-color: #538196;
  transform: scale(1.1);
}

/* --- Media Queries for Responsive Design --- */
@media (max-width: 1024px) {
  .nav-links {
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    left: -100%;
    top: 80px;
    gap: 0;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
    padding-bottom: var(--spacing-lg);
  }

  .nav-links li {
    padding: 15px 0;
  }
  
  .nav-links .dropdown:hover .dropdown-menu {
    display: none;
  }
  
  .nav-links .dropdown-toggle::after {
    content: ' ▼';
    display: inline-block;
    font-size: 0.7em;
  }
  
  .nav-links .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f9f9f9;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
  }
  
  .nav-links .dropdown-menu.open {
    display: block;
    max-height: 500px;
  }

  .nav-links.active {
    left: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .content-section {
    grid-template-columns: 1fr;
  }

  .content-section img {
    order: -1;
    max-height: 350px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-container {
      height: 350px;
  }

  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}