:root {
  --primary-dark-color: #081c2d; /* Deep blue from template */
  --accent-blue-color: #00aeef; /* Bright blue for CTAs and highlights */
  --text-light-color: #ffffff;
  --text-dark-color: #1d2b3a; /* Dark grey for text on light backgrounds */
  --text-hero-title-color: #000000;
  --text-hero-paragraph-color: #4a5568; /* Medium grey for paragraphs */
  --hero-content-bg: #ffffff;
  --border-color: #e2e8f0; /* Light grey for borders */
  --font-family-main:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --header-height: 80px; /* Approximate header height */
}

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

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

body {
  font-family: var(--font-family-main);
  color: var(--text-dark-color);
  background-color: var(--text-light-color); /* Default page background */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

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

.site-header {
  background-color: #ffffff;
  color: #000000;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-header .logo-img {
  height: 70px;
  display: block;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 25px;
}

.main-nav a {
  color: #000000;
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-transform: uppercase;
  padding: 5px 0;
  position: relative;
  transition:
    color 0.3s ease,
    font-weight 0.3s ease;
}

.main-nav a:hover {
  color: var(--accent-blue-color);
}

.main-nav a.active {
  color: #000000;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a.active::after {
  display: none;
}

.mobile-nav-toggle {
  /* Hamburger button */
  display: none; /* Hidden by default, shown in media query */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above other header content but below open nav */
}

.mobile-nav-toggle .hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #000000;
  position: relative;
  transition: background-color 0.3s ease;
}

.mobile-nav-toggle .hamburger-icon::before,
.mobile-nav-toggle .hamburger-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: #000000;
  transition: transform 0.3s ease;
}

.mobile-nav-toggle .hamburger-icon::before {
  top: -7px;
}

.mobile-nav-toggle .hamburger-icon::after {
  bottom: -7px;
}

/* Styles for when mobile nav is open (X icon) */
.mobile-nav-toggle.active .hamburger-icon {
  background-color: transparent; /* Middle bar disappears */
}

.mobile-nav-toggle.active .hamburger-icon::before {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-section {
  height: calc(
    720px - var(--header-height)
  ); /* Combined with header, total max 720px. Header is 80px, so hero is 640px */
  background-image: url("https://sites.webprompter.ai/nereus-analytics/images/hero-background.png"); /* Default, will be overridden by JS for specific pages */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end; /* Align the container to the bottom of the hero section */
  /* padding-top: var(--header-height); REMOVED as header is not fixed */
  position: relative;
  box-sizing: border-box;
}

.hero-section .container {
  /* This is the .hero-container in JS */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Push hero text to the bottom of this container */
  align-items: flex-start; /* Align hero text to the left */
  height: 100%; /* Fill the content area of .hero-section */
  padding-bottom: 50px; /* Space from the very bottom edge of the hero-section content area */
  position: relative;
}

/* Removed .hero-content-wrapper, .hero-content, .decorative-lines, .hero-buttons and their styles */

.hero-bottom-text {
  color: #ffffff; /* White text for contrast on dark hero image */
  font-size: 2rem; /* Adjust as needed, e.g., 32px */
  font-family: var(
    --font-family-main
  ); /* Using main font for hero text, or specify if different */
  line-height: 1.4;
  /* max-width: 650px; /* Optional: constrain line length */
  /* text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Optional: for better readability */
}

.hero-bottom-text p {
  margin: 0; /* Remove default paragraph margin */
}

.hero-bottom-text strong {
  font-weight: 700; /* Use a bold weight, ensure font supports it */
  /* font-family: "Instrument Sans", sans-serif; /* If strong should also use Instrument Sans */
}

.page-content-wrapper {
  padding: 40px 0; /* Vertical padding for content area below hero */
}

.page-content-wrapper h1 {
  margin-bottom: 20px;
  font-size: 2.5rem; /* Example size */
  color: var(--primary-dark-color);
}

.page-content-wrapper p {
  font-size: 1.1rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .page-content-wrapper h1 {
    font-size: 2rem;
  }
  .page-content-wrapper p {
    font-size: 1rem;
  }
}

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.solution-item {
  display: flex;
  gap: 30px;
  align-items: stretch; /* MODIFIED: Was flex-start. Ensures image and content column are same height */
}

.solution-item-image {
  flex: 0 0 40%;
  max-width: 350px;
}

.solution-item-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.solution-item-content-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.solution-item-text-wrapper h3 {
  font-size: 1.8rem;
  color: var(--primary-dark-color);
  margin-bottom: 15px;
}

.solution-item-text-wrapper p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: var(--text-dark-color);
}

.solution-item-content-column .btn {
  align-self: flex-end;
  margin-top: 15px;
}

@media (max-width: 992px) {
  .solution-item-image {
    max-width: 300px;
  }
  .solution-item-text h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .solution-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .solution-item-image {
    flex-basis: auto;
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .solution-item-content-column {
    width: 100%;
  }

  .solution-item-content-column .btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    max-width: 200px;
  }
}

.home-content-section {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.home-content-section:last-child {
  margin-bottom: 20px;
}

.home-content-section.image-right .home-content-image {
  order: 2;
}

.home-content-section.image-right .home-content-text {
  order: 1;
}

.home-content-image {
  flex: 0 0 45%;
  max-width: 500px;
}

.home-content-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-content-text {
  flex: 1;
}

.home-content-text h3 {
  font-size: 2rem;
  color: var(--primary-dark-color);
  margin-bottom: 20px;
  line-height: 1.3;
}

.home-content-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 15px;
  color: var(--text-dark-color);
}

.home-content-text p strong {
  font-weight: 600;
}

@media (max-width: 992px) {
  .home-content-text h3 {
    font-size: 1.8rem;
  }
  .home-content-text p {
    font-size: 1rem;
  }
  .home-content-image {
    flex-basis: 40%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .home-content-section {
    flex-direction: column;
    text-align: center;
    gap: 25px;
    margin-bottom: 40px;
  }

  .home-content-section.image-right .home-content-image,
  .home-content-section.image-right .home-content-text {
    order: initial;
  }

  .home-content-image {
    flex-basis: auto;
    width: 100%;
    max-width: 450px;
    margin-bottom: 0;
  }

  .home-content-text {
    width: 100%;
  }

  .home-content-text h3 {
    font-size: 1.6rem;
  }
}

.home-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.home-title-icon-container {
  flex-shrink: 0;
}

.home-title-svg-icon {
  width: 50px;
  height: 50px;
  display: block;
}

.home-title-wrapper h3 {
  margin-bottom: 0;
}

.home-content-section.image-right .home-content-image {
  order: 2;
}
.home-content-section.image-right .home-content-text {
  order: 1;
}

@media (max-width: 992px) {
  .home-content-text h3,
  .home-title-wrapper h3 {
    font-size: 1.8rem;
  }
  .home-content-text p {
    font-size: 1rem;
  }
  .home-content-image {
    flex-basis: 40%;
    max-width: 400px;
  }
  .home-title-svg-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .home-content-section {
    flex-direction: column;
    text-align: center;
    gap: 25px;
    margin-bottom: 40px;
  }

  .home-content-section.image-right .home-content-image,
  .home-content-section.image-right .home-content-text {
    order: initial;
  }

  .home-content-image {
    flex-basis: auto;
    width: 100%;
    max-width: 450px;
    margin-bottom: 0;
  }

  .home-content-text {
    width: 100%;
  }
  .home-content-text h3,
  .home-title-wrapper h3 {
    font-size: 1.6rem;
  }
  .home-title-wrapper {
    justify-content: center;
  }
  .home-title-svg-icon {
    width: 35px;
    height: 35px;
  }
}

.home-content-section.bg-light-grey-section {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 12px;
  /* margin-bottom is handled by .home-content-section general styles */
}

.solutions-list .solution-item:nth-of-type(odd) {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  /* Gap is handled by .solutions-list */
}

@media (max-width: 992px) {
  .home-content-section.bg-light-grey-section {
    padding: 30px;
  }
  .solutions-list .solution-item:nth-of-type(odd) {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .home-content-section.bg-light-grey-section {
    padding: 25px;
  }
  .solutions-list .solution-item:nth-of-type(odd) {
    padding: 20px;
  }
}

/* Styles for specific section backgrounds */

.home-content-section.bg-light-grey-section {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 12px;
  /* margin-bottom is handled by .home-content-section general styles */
}

.solutions-list .solution-item:nth-of-type(odd) {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  /* Gap is handled by .solutions-list */
}

@media (max-width: 992px) {
  .home-content-section.bg-light-grey-section {
    padding: 30px;
  }
  .solutions-list .solution-item:nth-of-type(odd) {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .home-content-section.bg-light-grey-section {
    padding: 25px;
  }
  .solutions-list .solution-item:nth-of-type(odd) {
    padding: 20px;
  }
}

.nereus-method-section {
  padding: 60px 0;
  text-align: center;
}

.nereus-method-section-title {
  font-size: 2.2rem;
  color: var(--primary-dark-color);
  margin-bottom: 40px;
  font-weight: 700;
}

.method-cards-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.method-card {
  background-color: #f9f9f9;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  text-align: left;
}

.method-card-main-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
  flex: 1 1 60%;
}

.method-card-icon-container {
  flex-shrink: 0;
}

.method-card-icon {
  width: 50px;
  height: 50px;
  display: block;
}

.method-card-text-container {
  flex: 1;
}

.method-card-text-container h4 {
  font-size: 2rem;
  color: var(--primary-dark-color);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.method-card-text-container .description-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-dark-color);
}

.method-card-text-container .description-content p {
  margin-bottom: 0.5em;
}

.method-card-text-container .description-content p:last-child {
  margin-bottom: 0;
}

.method-card-text-container .description-content strong {
  font-weight: 600;
}

.method-card-image-container {
  margin-top: 0;
  flex: 1 1 35%;
  max-width: 35%;
}

.method-card-visual {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

@media (max-width: 992px) {
  .nereus-method-section-title {
    font-size: 2rem;
  }
  .method-cards-container {
    gap: 25px;
  }
  .method-card {
    padding: 20px;
  }
  .method-card-icon {
    width: 45px;
    height: 45px;
  }
  .method-card-text-container h4 {
    font-size: 1.8rem;
  }
  .method-card-text-container .description-content {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nereus-method-section {
    padding: 40px 0;
  }
  .nereus-method-section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  .method-cards-container {
    gap: 20px;
  }
  .method-card {
    flex-direction: column;
  }
  .method-card-main-content {
    gap: 15px;
    flex-basis: auto;
    width: 100%;
  }
  .method-card-image-container {
    margin-top: 20px;
    max-width: 100%;
    flex-basis: auto;
    width: 100%;
  }
  .method-card-icon {
    width: 40px;
    height: 40px;
  }
  .method-card-text-container h4 {
    font-size: 1.6rem;
  }
  .method-card-text-container .description-content {
    font-size: 1rem;
  }
}

.services-section-title {
  font-size: 2.2rem;
  color: var(--primary-dark-color);
  margin-top: 60px;
  margin-bottom: 40px;
  font-weight: 700;
  text-align: left;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 60px;
}

.service-item {
  display: flex;
  gap: 30px;
  align-items: center;
}

.service-item:nth-of-type(odd) {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
}

.service-item-text {
  flex: 1 1 60%;
}

.service-item-text h3 {
  font-size: 1.8rem;
  color: var(--primary-dark-color);
  margin-bottom: 15px;
}

.service-item-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark-color);
}

.service-item-image {
  flex: 1 1 40%;
  max-width: 40%;
}

.service-item-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .services-section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
  }
  .service-item {
    flex-direction: column;
    text-align: center;
  }
  .service-item-image {
    order: -1; /* Image on top on mobile */
    margin-bottom: 20px;
    max-width: 100%;
  }
  .service-item:nth-of-type(odd) {
    padding: 20px;
  }
}

.about-intro-section .home-content-image img {
  box-shadow: none;
  max-width: 250px;
  max-height: 250px;
}

.team-section {
  background-color: #f9f9f9;
  padding: 60px 0;
  margin-top: 60px;
}

.team-section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--primary-dark-color);
  margin-bottom: 50px;
  font-weight: 700;
}

.team-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
}

.team-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.team-card-image-wrapper {
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  height: 250px;
}

.team-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#team-member-etero .team-card-image-wrapper img {
  object-fit: contain;
  padding: 10px;
}

.team-card-info {
  padding: 25px;
  text-align: right;
}

.team-card-info h4 {
  font-size: 1.2rem;
  color: var(--primary-dark-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.team-card-info .team-member-title {
  font-size: 0.9rem;
  color: var(--text-dark-color);
  margin-bottom: 10px;
}

.team-card-info .team-member-contact {
  margin-bottom: 0;
}

.team-card-info .team-member-contact a {
  font-size: 0.9rem;
  color: var(--text-dark-color);
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.3s ease;
  word-break: break-all;
}

.team-card-info .team-member-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .team-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .team-section {
    padding: 40px 0;
  }
  .team-section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
}

.contact-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

@media (max-width: 992px) {
  .contact-content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.contact-info-col > h1 {
  /* Uses global .page-content-wrapper h1 styles */
  margin-bottom: 15px;
}

.contact-info-col > p {
  /* Uses global .page-content-wrapper p styles */
  margin-bottom: 40px;
  max-width: 450px;
}

.contact-details-block {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-logo-wrapper {
  flex: 0 0 120px;
  padding: 15px;
  border: none;
  border-radius: 8px;
}

.contact-logo-wrapper img {
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .contact-details-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.contact-text-details h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark-color);
  margin-bottom: 10px;
}

.contact-text-details p {
  margin-bottom: 5px;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-form-wrapper {
  background-color: #f9f9f9;
  padding: 35px;
  border-radius: 12px;
}

.contact-form-wrapper .form-group {
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .contact-form-wrapper {
    padding: 25px;
  }
}

.contact-form-wrapper label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: var(--text-dark-color);
}

.contact-form-wrapper input,
.contact-form-wrapper textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background-color: #fff;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

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

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent-blue-color);
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}

.contact-form-wrapper .form-submit-wrapper {
  text-align: right;
  margin-top: 10px;
}

.contact-form-wrapper button[type="submit"] {
  padding: 12px 35px;
  border: 1px solid var(--text-dark-color);
  border-radius: 50px;
  background: transparent;
  color: var(--text-dark-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form-wrapper button[type="submit"]:hover {
  background-color: var(--text-dark-color);
  color: #fff;
}

.btn {
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary:hover {
  background-color: #0095c7; /* Darker accent blue */
  box-shadow: 0 4px 10px rgba(0, 174, 239, 0.3);
}

.btn-secondary {
  background-color: var(--text-light-color);
  color: var(--text-dark-color);
  border: 2px solid var(--text-dark-color);
}

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

.btn-dark {
  background-color: var(--primary-dark-color);
  color: var(--text-light-color);
  /* border: 2px solid var(--primary-dark-color); */ /* Optional: if a border is desired */
}

.btn-dark:hover {
  background-color: #0a2840; /* A slightly lighter/modified dark blue */
  color: var(--text-light-color);
  /* border-color: #0a2840; */
}

footer {
  background-color: var(--primary-dark-color);
  color: var(--text-light-color);
  padding: 40px 20px 20px; /* Increased top padding */
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
  text-align: left;
}

.footer-column h4 {
  font-family: "Instrument Sans", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--accent-blue-color);
  text-transform: uppercase;
}

.footer-column p,
.footer-column ul li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-column a {
  color: var(--text-light-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.social-links {
  list-style: none;
  padding: 0;
}

.social-links li a {
  display: inline-flex; /* For better hover area if icons were used */
  align-items: center;
  gap: 8px; /* Space between icon and text */
}

.social-links li a i {
  font-size: 1.2em; /* Adjust icon size as needed */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin-bottom: 10px;
}

.footer-bottom a#cms-login-link {
  color: var(--accent-blue-color);
  text-decoration: underline;
}
.footer-bottom a#cms-login-link:hover {
  color: var(--text-light-color);
}

@media (max-width: 992px) {
  .hero-bottom-text {
    font-size: 1.8rem;
  }

  /* Mobile Navigation Activation */
  .mobile-nav-toggle {
    display: block; /* Show hamburger */
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 100%;
    height: 100vh;
    background-color: rgba(
      255,
      255,
      255,
      0.98
    ); /* Slightly transparent white */
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    padding-top: var(--header-height); /* Space for header if it were sticky */
    margin-left: 0; /* Override desktop margin */
  }

  .main-nav.nav-open {
    left: 0; /* Slide in */
  }

  .main-nav ul {
    flex-direction: column;
    gap: 25px; /* Increased gap for touch targets */
    text-align: center;
  }

  .main-nav a {
    font-size: 1.5rem; /* Larger font for mobile menu */
    font-weight: 600; /* Bolder for visibility */
    padding: 10px 20px;
    display: block;
  }
  .main-nav a.active {
    color: var(
      --accent-blue-color
    ); /* Highlight active link more prominently */
  }
}

@media (max-width: 768px) {
  :root {
    /* --header-height: auto; /* Allow header to grow if needed, but for non-sticky this might not be necessary */
  }
  .site-header {
    /* height: auto; /* Adjust height to content - already handled by flex items */
    /* padding-top: 10px; */ /* Kept from previous, but might be adjusted by fixed height */
    /* padding-bottom: 10px; */
  }
  /* .site-header .container {
    flex-direction: column; /* This was for stacked logo/nav, not needed with hamburger
    align-items: flex-start;
  } */
  /* .site-header .logo-img {
    margin-bottom: 15px; /* Not needed with hamburger
  } */

  /* .main-nav {
    width: 100%; /* Handled by fixed positioning
    margin-bottom: 0;
    margin-left: 0;
  } */
  /* .main-nav ul {
    flex-direction: column; /* Handled by fullscreen nav styles
    gap: 12px;
    align-items: flex-start;
    width: 100%;
  } */
  /* .main-nav a {
    font-size: 15px; /* Overridden by 992px styles
  } */
  .main-nav a.active::after {
    display: none;
  }
  .main-nav a.active {
    /* color: #000000 !important; */ /* Color handled by 992px styles */
    /* font-weight: 700; */
  }

  .hero-section {
    height: auto;
    min-height: 450px;
  }

  .hero-section .container {
    padding-bottom: 30px;
    height: auto;
    min-height: auto;
  }

  .hero-bottom-text {
    font-size: 1.5rem;
    padding-left: 0;
    padding-right: 0;
  }

  #edit-mode-floating-button-container {
    bottom: 10px;
    left: 10px;
  }
  #toggle-edit-mode-button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  #edit-panel {
    width: 90%;
    max-width: 300px;
    padding: 15px;
    bottom: 60px;
    left: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
    text-align: center;
  }
  .footer-column {
    margin-bottom: 20px;
  }
  .footer-column:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .site-header .logo-img {
    height: 60px;
  }
  /* .main-nav a {
    font-size: 14px; /* Overridden by 992px styles
  } */

  .hero-section {
    min-height: 400px;
  }

  .hero-bottom-text {
    font-size: 1.3rem;
    line-height: 1.5;
  }
}

#edit-mode-floating-button-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 2000;
  display: flex; /* To align buttons horizontally */
  gap: 10px; /* Space between buttons */
}

#toggle-edit-mode-button,
#logout-button {
  background-color: var(--accent-blue-color);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  border: none;
  cursor: pointer;
}

#toggle-edit-mode-button:hover,
#logout-button:hover {
  background-color: #0095c7;
}

#logout-button {
  background-color: #6c757d; /* Grey for logout */
}
#logout-button:hover {
  background-color: #5a6268;
}

#edit-panel {
  position: fixed;
  bottom: 70px; /* Above the floating button */
  left: 20px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 15px; /* Adjusted padding */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1999;
  width: auto; /* Auto width based on content */
  min-width: 200px; /* Adjusted minimum width for text buttons */
}

#edit-panel h3 {
  margin-top: 0;
  margin-bottom: 15px; /* Increased margin */
  font-size: 1.1rem; /* Slightly larger title */
  color: var(--primary-dark-color);
  text-align: center;
  padding-bottom: 10px; /* Add some space below title */
  border-bottom: 1px solid var(--border-color); /* Separator line */
  cursor: move; /* Indicate draggable */
  user-select: none; /* Prevent text selection when dragging */
}

.edit-panel-buttons {
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  align-items: stretch; /* Make buttons take full width of container */
  gap: 10px; /* Space between buttons */
}

.edit-panel-buttons button {
  background-color: var(--accent-blue-color);
  color: var(--text-light-color);
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 0.9rem; /* Font size for button text */
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex; /* For aligning icon and text */
  align-items: center;
  justify-content: flex-start; /* Align icon+text to the left */
  gap: 8px; /* Space between icon and text */
  transition: background-color 0.2s ease-in-out;
}

.edit-panel-buttons button i {
  font-size: 1.1em; /* Icon size relative to button text */
  width: 1.2em; /* Give icon a fixed width for alignment */
  text-align: center;
}

.edit-panel-buttons button:hover {
  background-color: #0095c7; /* Darker blue on hover */
}

/* Specific hover colors for different actions (optional, can be simplified) */
#edit-panel-preview:hover {
  /* background-color: #5a6268; Keep consistent or specialize */
}

#edit-panel-save {
  background-color: #28a745; /* Green for save */
}
#edit-panel-save:hover {
  background-color: #218838; /* Darker green */
}

#edit-panel-cancel {
  background-color: #dc3545; /* Red for cancel */
}
#edit-panel-cancel:hover {
  background-color: #c82333; /* Darker red */
}

#edit-panel-status {
  margin-top: 15px; /* Increased margin */
  font-size: 0.85em;
  color: #555;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* Styles for editable elements */
.edit-mode-active [contenteditable="true"] {
  outline: 2px dashed var(--accent-blue-color);
  padding: 2px;
  cursor: text;
}

.edit-mode-active .editable-image,
.edit-mode-active .editable-link {
  cursor: pointer;
  position: relative; /* For icon positioning */
}

.edit-mode-active .editable-image::after {
  content: "\f03e"; /* Font Awesome fa-image icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900; /* For solid icons */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem; /* Adjusted icon size */
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.4em 0.5em; /* Adjusted padding */
  border-radius: 50%;
  pointer-events: none; /* So click goes to the image */
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 1; /* Ensure it's above the image but below other UI */
}

.edit-mode-active .editable-link {
  outline: 2px dashed var(--accent-blue-color);
}

.edit-mode-active .editable-image:hover::after {
  opacity: 1;
}

/* Preview mode - hide outlines and icons */
.preview-mode [contenteditable="true"] {
  outline: none;
}
.preview-mode .editable-image::after {
  display: none;
}
.preview-mode .editable-link {
  /* Remove outline in preview mode for editable-links too */
  outline: none;
}

/* General Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 3000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity for backdrop */
  /* padding-top: 60px; Removed to allow true centering */
  display: flex; /* Ensure flex is explicitly set for centering */
  align-items: center; /* Vertical centering for flex child */
  justify-content: center; /* Horizontal centering for flex child */
}

.modal-content {
  background-color: #fefefe;
  margin: auto; /* Works with flex centering, or can be 0 if flex handles all */
  padding: 25px 35px;
  border: 1px solid #888;
  width: 90%; /* Could be more or less, depending on screen size */
  max-width: 450px; /* Maximum width */
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: left;
}

.close-modal-button {
  color: #aaa;
  /* float: right; /* Redundant with absolute positioning */
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  line-height: 1; /* Ensure consistent positioning */
  padding: 0; /* Ensure no extra space affects positioning */
}

.close-modal-button:hover,
.close-modal-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Login Modal Specific Content Styles */
.login-modal-content h2 {
  color: var(--primary-dark-color);
  margin-bottom: 25px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 2rem;
  text-align: center;
}

.login-modal-content .form-group {
  margin-bottom: 20px;
}

.login-modal-content label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark-color);
}

.login-modal-content input[type="text"],
.login-modal-content input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.login-modal-content input[type="text"]:focus,
.login-modal-content input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-blue-color);
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}

.login-modal-content button[type="submit"] {
  background-color: var(--accent-blue-color);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.login-modal-content button[type="submit"]:hover {
  background-color: #0095c7;
}

.login-error-message {
  color: #dc3545; /* Red for errors */
  font-size: 0.9rem;
  margin-top: 15px;
  text-align: center;
}

/* Edit Modals (Link/Image) */
/* .edit-modal itself will use the .modal styles for positioning */
.edit-modal .modal-content h3 {
  color: var(--primary-dark-color);
  margin-bottom: 20px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 1.5rem;
  text-align: center;
}
.edit-modal .form-group {
  margin-bottom: 15px;
}
.edit-modal label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-dark-color);
}
.edit-modal .modal-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
}
.edit-modal .modal-input:focus {
  outline: none;
  border-color: var(--accent-blue-color);
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}
.edit-modal .modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.edit-modal .modal-buttons button {
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.edit-modal .modal-buttons button[id^="save-"] {
  /* Starts with save- */
  background-color: var(--accent-blue-color);
  color: white;
}
.edit-modal .modal-buttons button[id^="save-"]:hover {
  background-color: #0095c7;
}
.edit-modal .modal-buttons button.cancel-modal-button {
  background-color: #6c757d;
  color: white;
}
.edit-modal .modal-buttons button.cancel-modal-button:hover {
  background-color: #5a6268;
}

.edit-modal .image-upload-group {
  margin-top: 15px;
  margin-bottom: 15px;
}

.edit-modal .upload-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-modal .modal-upload-button {
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background-color: #6c757d;
  color: white;
  transition: background-color 0.2s ease;
}

.edit-modal .modal-upload-button:hover {
  background-color: #5a6268;
}

.edit-modal .modal-upload-button:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  color: #6c757d;
}

#image-upload-status {
  font-size: 0.85em;
  color: #555;
}

.edit-modal .image-preview-group {
  margin-top: 15px;
}

#image-preview-container {
  margin-top: 5px;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
}

#image-preview-container img {
  max-width: 100%;
  max-height: 200px;
  display: block;
  border-radius: 2px;
}

#post-upload-actions {
  margin-top: 15px;
  text-align: center;
}

#use-uploaded-image-button {
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background-color: var(--accent-blue-color);
  color: white;
  transition: background-color 0.2s ease;
}

#use-uploaded-image-button:hover {
  background-color: #0095c7;
}

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.toast {
  background-color: #333;
  color: #fff;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  max-width: 350px;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background-color: #28a745; /* Green for success */
}

.toast.error {
  background-color: #dc3545; /* Red for error */
}

.toast a {
  color: #fff;
  text-decoration: underline;
}

.toast a:hover {
  text-decoration: none;
}