:root {
  /* Color Scheme: Monochromatic with a functional accent */
  --color-background-dark: #121212; /* Very dark grey, almost black */
  --color-surface-dark: #1e1e1e; /* Dark surface for cards on dark bg */
  --color-background-light: #f0f0f0; /* Light grey for contrasting sections */
  --color-surface-light: #ffffff; /* White surface for cards on light bg */

  --color-text-on-dark: #e0e0e0; /* Light grey text for dark backgrounds */
  --color-text-on-dark-muted: #9e9e9e; /* Muted light grey text */
  --color-text-on-light: #222222; /* Dark grey text for light backgrounds */
  --color-text-on-light-muted: #555555; /* Muted dark grey text */

  --color-primary-accent: #007bff; /* Bulma's default primary blue - acts as the single accent */
  --color-primary-accent-hover: #0056b3;
  --color-primary-accent-text: #ffffff;

  --color-border-dark: #333333; /* Border color on dark surfaces */
  --color-border-light: #cccccc; /* Border color on light surfaces */
  --color-neo-border: #000000; /* Stark border for neo-brutalism */

  /* Fonts */
  --font-heading: "Inter", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem; /* Adjusted from 2rem to be less excessive */
  --spacing-xl: 2.5rem; /* Adjusted from 3rem */

  /* Borders & Shadows */
  --border-radius-sharp: 0px;
  --border-radius-slight: 3px;
  --box-shadow-neo: 4px 4px 0px var(--color-neo-border);
  --box-shadow-subtle-dark: 0 4px 8px rgba(0, 0, 0, 0.2);
  --box-shadow-subtle-light: 0 4px 8px rgba(0, 0, 0, 0.1);

  /* Header */
  --header-height: 52px; /* Bulma's default navbar height */
  --header-bg: var(--color-surface-dark);
  --header-text: var(--color-text-on-dark);
  --header-border: var(--color-border-dark);
}

/* GLOBAL STYLES */
html {
  scroll-behavior: smooth;
  background-color: var(--color-background-dark);
  color: var(--color-text-on-dark);
  font-size: 16px; /* Base font size */
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Prevent horizontal scroll */
  margin: 0;
  padding: 0;
}

.page-wrapper {
  overflow: hidden; /* Contains parallax elements */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.title,
.subtitle {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: inherit; /* Inherit color from parent, can be overridden */
}

.title {
  margin-bottom: var(--spacing-md);
}
.subtitle {
  margin-bottom: var(--spacing-lg);
}

.title.is-1 {
  font-size: 3rem;
  font-weight: 800;
}
.title.is-2 {
  font-size: 2.5rem;
}
.title.is-3 {
  font-size: 2rem;
}
.title.is-4 {
  font-size: 1.5rem;
}
.title.is-5 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
  color: inherit;
}

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

/* Section Styling */
.section {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  position: relative; /* For parallax layers or absolute positioned elements */
}

.section-title {
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-on-dark); /* Default for dark bg */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sections with light background */
section[style*="background-color: #e0e0e0;"], /* From HTML */
section.has-light-background {
  /* Add this class for consistency if needed */
  background-color: var(--color-background-light) !important;
  color: var(--color-text-on-light);
}
section[style*="background-color: #e0e0e0;"] .section-title,
section.has-light-background .section-title {
  color: var(--color-text-on-light);
  text-shadow: none;
}
section[style*="background-color: #e0e0e0;"] p,
section.has-light-background p {
  color: var(--color-text-on-light-muted);
}
section[style*="background-color: #e0e0e0;"] .label,
section.has-light-background .label {
  color: var(--color-text-on-light);
}

/* Buttons - Global Styles (Enhancing Bulma) */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  font-family: var(--font-heading);
  font-weight: 500;
  border-radius: var(--border-radius-slight);
  padding: var(--spacing-sm) var(--spacing-lg);
  transition: all 0.3s ease;
  border-width: 2px;
  border-style: solid;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.button.is-primary {
  background-color: var(--color-primary-accent);
  border-color: var(--color-primary-accent);
  color: var(--color-primary-accent-text);
  box-shadow: var(--box-shadow-neo); /* Neo-brutalism */
}
.button.is-primary:hover {
  background-color: var(--color-primary-accent-hover);
  border-color: var(--color-primary-accent-hover);
  box-shadow: 2px 2px 0px var(--color-neo-border); /* Shift shadow slightly */
  transform: translate(1px, 1px);
}
.button.is-primary.is-outlined {
  background-color: transparent;
  border-color: var(--color-primary-accent);
  color: var(--color-primary-accent);
  box-shadow: none;
}
.button.is-primary.is-outlined:hover {
  background-color: var(--color-primary-accent);
  color: var(--color-primary-accent-text);
  box-shadow: var(--box-shadow-neo);
  transform: none;
}

/* Form Elements */
.input,
.textarea,
.select select {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius-slight);
  padding: var(--spacing-sm);
  font-family: var(--font-body);
}
.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--color-primary-accent);
  box-shadow: 0 0 0 0.125em rgba(0, 123, 255, 0.25); /* Bulma's focus style base */
}
.label {
  color: var(--color-text-on-dark-muted);
  font-family: var(--font-heading);
  font-weight: 500;
}
section[style*="background-color: #e0e0e0;"] .input,
section[style*="background-color: #e0e0e0;"] .textarea {
  background-color: var(--color-surface-light);
  color: var(--color-text-on-light);
  border-color: var(--color-border-light);
}

/* HEADER / NAVBAR */
.header .navbar {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--box-shadow-subtle-dark);
  min-height: var(--header-height);
}
.navbar.is-fixed-top {
  height: var(--header-height);
}
.navbar-item,
.navbar-link {
  color: var(--header-text);
  font-family: var(--font-heading);
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.navbar-item:hover,
.navbar-link:hover,
.navbar-item.is-active {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-primary-accent);
}
.navbar-burger {
  color: var(--header-text);
}
.navbar-burger span {
  background-color: var(--header-text);
}
.logo-text {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-text-on-dark) !important; /* Ensure logo text color */
}
.logo-text:hover {
  color: var(--color-primary-accent) !important;
}

@media screen and (max-width: 1023px) {
  .navbar-menu {
    background-color: var(--header-bg);
    border-top: 1px solid var(--header-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
}

/* HERO SECTION */
#hero.hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #ffffff; /* IMPORTANT: Hero text must be white */
}
#hero .title,
#hero .subtitle,
#hero p {
  color: #ffffff; /* Ensure all text is white */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Enhance readability */
}

/* Parallax Sections (JS will handle actual parallax) */
.parallax-section {
  background-attachment: scroll; /* JS will override for parallax effect */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* CARDS */
.card {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius-sharp); /* Neo-brutalism */
  box-shadow: var(--box-shadow-neo);
  display: flex;
  flex-direction: column;
  height: 100%; /* Make cards in a row same height */
  overflow: hidden; /* Ensures content fits */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0px var(--color-neo-border);
}

section[style*="background-color: #e0e0e0;"] .card {
  background-color: var(--color-surface-light);
  color: var(--color-text-on-light);
  border-color: var(--color-border-light);
  box-shadow: 4px 4px 0px #bbb; /* Lighter neo shadow */
}
section[style*="background-color: #e0e0e0;"] .card:hover {
  box-shadow: 6px 6px 0px #aaa;
}
section[style*="background-color: #e0e0e0;"] .card .title {
  color: var(--color-text-on-light);
}
section[style*="background-color: #e0e0e0;"] .card .content,
section[style*="background-color: #e0e0e0;"] .card p {
  color: var(--color-text-on-light-muted);
}

.card .card-image {
  /* Bulma's .card-image */
  overflow: hidden; /* Ensure image doesn't break card boundaries */
}
.card .card-image .image-container {
  /* Custom class for better control */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Important for object-fit */
}
.card .card-image .image-container img {
  width: 100%;
  height: 100%; /* For fixed height containers */
  object-fit: cover; /* Cover the container, may crop */
  display: block;
}
/* Specific fixed height for card images if needed, e.g., for workshop cards */
.workshop-card .card-image .image.is-4by3 {
  /* Using Bulma's aspect ratio */
  /* Bulma handles aspect ratio, object-fit on img ensures it fills */
}
.gallery .card .card-image .image.is-1by1 {
  /* Bulma handles aspect ratio */
}
.resource-card .card-image .image.is-3by2 {
  /* Bulma handles aspect ratio */
}
.case-study-card .card-image .image.is-16by9 {
  /* Bulma handles aspect ratio */
}

.card .card-content {
  padding: var(--spacing-lg);
  flex-grow: 1; /* Allows content to fill space if card height is fixed by row */
  display: flex;
  flex-direction: column;
  text-align: left; /* Default, can be centered if needed */
}
.card .card-content .title {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-on-dark); /* Default for dark bg cards */
}
.card .card-content .content,
.card .card-content p {
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
  color: var(--color-text-on-dark-muted);
}
.card .button {
  margin-top: auto; /* Pushes button to bottom of card */
}

/* Statistics Section */
.stat-widget {
  text-align: center;
  padding: var(--spacing-lg);
  background-color: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius-sharp);
  box-shadow: var(--box-shadow-neo);
}
.stat-widget .title.is-1 {
  color: var(--color-primary-accent);
  font-size: 3.5rem;
  margin-bottom: var(--spacing-xs);
}
.stat-widget .subtitle.is-4 {
  color: var(--color-text-on-dark);
  margin-bottom: var(--spacing-sm);
}
.stat-widget p:not(.title):not(.subtitle) {
  font-size: 0.9rem;
  color: var(--color-text-on-dark-muted);
}

.custom-slider-container {
  max-width: 600px;
  margin: 0 auto;
}

input::placeholder, textarea::placeholder {
  color: #fff !important;
}

img {
  object-fit: cover;
}

/* Custom Slider Placeholder */
.custom-slider-container {
  position: relative;
  /* Basic styling for slider, JS will handle slides */
}
.custom-slider-container .slide {
  /* display: none; /* Initially hide slides, JS will show active */
  /* For now, just style the card inside */
}
.custom-slider-container .slide:first-child {
  /* display: block; */
}
.custom-slider-container .slider-prev,
.custom-slider-container .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  z-index: 10;
  border-radius: var(--border-radius-slight);
}
.custom-slider-container .slider-prev {
  left: var(--spacing-md);
}
.custom-slider-container .slider-next {
  right: var(--spacing-md);
}

/* External Resources Section (resource-card) */
.resource-card .title a {
  color: var(--color-primary-accent);
}
.resource-card .title a:hover {
  color: var(--color-primary-accent-hover);
}

/* Animated Elements (for JS scroll reveal) */
.animated-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animated-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* FOOTER */
.footer {
  background-color: var(--color-background-dark);
  color: var(--color-text-on-dark-muted);
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-top: 2px solid var(--color-border-dark);
}
.footer .title.is-5 {
  color: var(--color-text-on-dark);
  margin-bottom: var(--spacing-md);
}
.footer a {
  color: var(--color-text-on-dark-muted);
}
.footer a:hover {
  color: var(--color-primary-accent);
}
.footer ul {
  list-style: none;
  padding-left: 0;
}
.footer ul li {
  margin-bottom: var(--spacing-sm);
}
.footer hr {
  background-color: var(--color-border-dark);
  height: 1px;
  margin: var(--spacing-lg) 0;
}
.footer .has-text-centered {
  font-size: 0.9rem;
}

/* Specific Page Styles */
/* success.html */
.success-page-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: var(--spacing-lg);
  background-color: var(--color-background-dark);
  color: var(--color-text-on-dark);
}
.success-page-container .title {
  color: var(--color-primary-accent);
}

/* privacy.html, terms.html */
.legal-page-content,
.about-page-content,
.contacts-page-content {
  /* General class for content pages */
  padding-top: calc(var(--header-height) + var(--spacing-lg));
  padding-bottom: var(--spacing-xl);
  background-color: var(
    --color-background-light
  ); /* Light background for these pages */
  color: var(--color-text-on-light);
  min-height: calc(
    100vh - var(--header-height)
  ); /* Full viewport height minus header */
}
.legal-page-content .container,
.about-page-content .container,
.contacts-page-content .container {
  max-width: 800px; /* Readable width for text-heavy pages */
}
.legal-page-content h1,
.legal-page-content h2,
.legal-page-content h3,
.about-page-content h1,
.about-page-content h2,
.about-page-content h3,
.contacts-page-content h1,
.contacts-page-content h2,
.contacts-page-content h3 {
  color: var(--color-text-on-light);
}
.legal-page-content p,
.about-page-content p,
.contacts-page-content p {
  color: var(--color-text-on-light-muted);
}
.contacts-page-content form {
  background-color: var(--color-surface-light);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-slight);
  box-shadow: var(--box-shadow-subtle-light);
}
.contacts-page-content .label {
  color: var(--color-text-on-light);
}
.contacts-page-content .input,
.contacts-page-content .textarea {
  background-color: #fff; /* White inputs on light page */
  border-color: var(--color-border-light);
  color: var(--color-text-on-light);
}

/* Read More Link Style */
.read-more-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-primary-accent);
  text-decoration: none;
  padding: var(--spacing-xs) 0;
  position: relative;
  transition: color 0.3s ease;
}
.read-more-link::after {
  content: "→";
  margin-left: var(--spacing-xs);
  transition: transform 0.3s ease;
  display: inline-block;
}
.read-more-link:hover {
  color: var(--color-primary-accent-hover);
}
.read-more-link:hover::after {
  transform: translateX(4px);
}

/* RESPONSIVENESS */
@media screen and (max-width: 768px) {
  .title.is-1 {
    font-size: 2.5rem;
  }
  .title.is-2 {
    font-size: 2rem;
  }
  .hero.is-fullheight .hero-body {
    padding: var(--spacing-lg); /* Less padding on mobile hero */
  }
  .columns.is-multiline .column {
    margin-bottom: var(--spacing-lg); /* Space between stacked columns */
  }
  .section {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
  }
}

/* Cookie Popup (From HTML, basic styling) */
#cookie-popup p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: var(
    --spacing-md
  ) !important; /* Override general p margin if needed */
  color: #f5f5f5;
}
#cookie-popup button {
  background-color: var(
    --color-primary-accent
  ) !important; /* !important to override inline */
  color: var(--color-primary-accent-text) !important;
  border-radius: var(--border-radius-slight) !important;
  padding: var(--spacing-sm) var(--spacing-lg) !important;
  font-family: var(--font-heading) !important;
}
#cookie-popup button:hover {
  background-color: var(--color-primary-accent-hover) !important;
}
