/* --- Google Fonts & CSS Reset --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

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

/* --- CSS Custom Properties (Theme) --- */
:root {
  --primary-color: #214264; /* Deep Steel Blue */
  --secondary-color: #6B8EAE; /* Cool Grey-Blue */
  --accent-color: #8DBADE; /* Soft Institutional Blue */
  --bg-color: #F5F5F5; /* Light Neutral Grey */
  --text-color: #333333; /* Dark Graphite Grey */
  --white-color: #FFFFFF;
  --header-height: 80px;
  --font-family: 'Lato', sans-serif;
  --border-radius: 6px;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --transition-speed: 0.3s ease;
}

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

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

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

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
p { margin-bottom: 1rem; }
a { color: var(--secondary-color); text-decoration: none; transition: var(--transition-speed); }
a:hover { color: var(--accent-color); text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; filter: grayscale(1) sepia(0.1) brightness(0.95); }

/* --- Layout & Containers --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: clamp(60px, 10vh, 100px) 0;
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  height: var(--header-height);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

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

.nav-links {
  display: flex;
  gap: 30px;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* --- Hero Section (Editorial Style) --- */
.hero {
  background-color: var(--bg-color);
  min-height: calc(80vh - var(--header-height));
  display: flex;
  align-items: center;
}

.hero-content {
  position: relative;
  width: 100%;
}

.hero-content h1 {
  font-weight: 900;
  max-width: 80%;
  margin-bottom: 2rem;
}

.hero-content .subtitle {
  font-size: 1.25rem;
  color: var(--text-color);
  max-width: 65%;
  font-weight: 300;
  line-height: 1.8;
}

.hero-accent-image {
  position: absolute;
  bottom: -40%;
  right: 0;
  width: 300px;
  height: 450px;
  object-fit: cover;
  border-radius: var(--border-radius);
  clip-path: polygon(0 0, 100% 15%, 100% 100%, 0 85%);
  opacity: 0.8;
}

/* --- Editorial Content Sections --- */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.editorial-grid .image-wrapper {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.pull-quote {
  border-left: 4px solid var(--accent-color);
  padding-left: 2rem;
  margin: 2rem 0;
}

.pull-quote p {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--secondary-color);
  font-style: italic;
  margin: 0;
}

.pull-quote footer {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* --- Masonry Grid for Features --- */
.masonry-grid {
  --gap: 24px;
  display: grid;
  grid-gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 20px;
}

.masonry-item {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.masonry-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.masonry-item img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 4px;
}
.masonry-item h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* --- Long-form Article Styles --- */
.article-page {
  padding-top: 40px;
  padding-bottom: 80px;
}
.article-header {
  text-align: center;
  margin-bottom: 60px;
}
.article-header .subtitle {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-top: 1rem;
}
.article-content {
  max-width: 800px;
  margin: 0 auto;
}
.article-content a {
  font-weight: bold;
}
.article-content h2, .article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.article-content ul, .article-content ol {
  margin-left: 20px;
  margin-bottom: 1.5rem;
}
.article-content ul li {
  list-style-type: disc;
  padding-left: 10px;
  margin-bottom: 0.5rem;
}

.structural-diagram {
    background: var(--white-color);
    border: 1px solid #ddd;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.structural-diagram h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}
.diagram-content {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 {
    margin-bottom: 1.5rem;
}
.contact-info p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1rem;
}
.contact-info-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 5px;
    color: var(--primary-color);
}

.contact-form {
    background: var(--white-color);
    padding: clamp(20px, 5vw, 40px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition-speed);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 66, 100, 0.2);
}
.form-submit-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition-speed);
}
.form-submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}
.form-disclaimer {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    text-align: center;
}

/* --- Legal & Thank You Page --- */
.text-page {
  max-width: 850px;
  margin: 0 auto;
}
.text-page h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.text-page h2:first-of-type {
  margin-top: 0;
}

.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 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-color);
  max-width: 600px;
  margin-bottom: 30px;
}
.home-btn {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 12px 24px;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 700;
}
.home-btn:hover {
  background-color: var(--secondary-color);
  color: var(--white-color);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1rem;
  margin-top: 80px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.disclaimer-section {
    background-color: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
    padding: 20px 30px;
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid var(--secondary-color);
    max-width: 900px;
}
.disclaimer-section strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.copyright {
  font-size: 0.9rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  width: 100%;
}

/* --- Cookie Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(33, 66, 100, 0.95);
  backdrop-filter: blur(5px);
  color: var(--white-color);
  padding: 20px;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}
#cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
}
#cookie-banner a {
  color: var(--accent-color);
  text-decoration: underline;
}
.cookie-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}
.cookie-btn {
  background: none;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition-speed);
}
#accept-cookies {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
}
#accept-cookies:hover {
  background-color: var(--white-color);
}
#decline-cookies {
  border: 1px solid var(--secondary-color);
  color: var(--white-color);
}
#decline-cookies:hover {
  background-color: var(--secondary-color);
}

/* --- Up Button --- */
#up-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-speed);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#up-button.show {
  opacity: 1;
  visibility: visible;
}
#up-button:hover {
  background-color: var(--secondary-color);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .hero-content h1 { max-width: 100%; }
  .hero-content .subtitle { max-width: 100%; }
  .hero-accent-image { display: none; }
  .editorial-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background-color: var(--white-color);
    flex-direction: column;
    padding: 40px;
    gap: 25px;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a {
    font-size: 1.2rem;
  }
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  .menu-toggle.open .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  #cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}