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

body {
  font-family: Georgia, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #eef4fa;
  color: #333;
  line-height: 1.6;
}

/* HEADER (TOP SIDE) */
header.top-side {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: #001f3f;
  color: white;
  display: flex;
  justify-content: center; /* Desktop: centered */
  align-items: center;
  gap: 100px;
  padding: 5px 30px 5px 15px; /* Desktop padding */
  z-index: 1000;
  transition: top 0.4s ease-in-out;
  will-change: top;
}

header.top-side .logo {
  display: flex;
  align-items: center;
  font-size: 1.8em;
  font-weight: bold;
  letter-spacing: 2px;
  margin-right: 60px; /* Desktop margin */
}

header.top-side .logo img {
  height: 100px;     /* DESKTOP & MOBILE: Logo image height */
  width: 100px;      /* DESKTOP & MOBILE: Logo image width */
  object-fit: cover;
  border-radius: 50%;
  margin-right: 15px; /* DESKTOP & MOBILE: Space from image */
  margin-top: 12.5px; /* DESKTOP & MOBILE: This makes it overflow */
}

header.top-side nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  margin-right: 15px;
}

header.top-side nav li {
  margin-left: 20px;
}

header.top-side nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
}

header.top-side nav a:hover {
  text-decoration: underline;
}

.menu-toggle {
  display: none; /* Shown in media query */
}

.menu-toggle::after {
  content: "☰";
}

.menu-toggle.active::after {
  content: "✕";
}

#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: none;
}

#menu-overlay.active {
  display: block;
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg { /* This style applies to the <img> chosen by <picture> */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Image will cover the area */
  /* object-position will default to 'center center' */
  z-index: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hero.scroll-fade.show .hero-bg {
  opacity: 1;
  transform: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding: 200px 20px; /* This padding determines hero height for both desktop and mobile */
}

.hero-content h1 {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  font-size: 3.5em;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
}

.hero-content p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
  font-size: 1.5em;
}


/* BLOG POSTS, FILTERS, ETC. */
.blog-posts {max-width: 900px; margin: 80px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 60px;}
.post {border-top: 1px solid #ccc; padding-top: 40px;}
.post-meta {text-transform: uppercase; font-size: 0.75em; letter-spacing: 1px; color: #666; margin-bottom: 10px;}
.post h2 {color: #001f3f; font-size: 1.6em; font-family: Georgia, serif; margin-bottom: 5px;}
.post p {font-size: 1em; line-height: 1.7; color: #555; max-width: 95%; margin-bottom: 10px;}
.post a {display: inline-block; font-size: 1em; font-weight: 500; color: #001f3f; text-decoration: none;}
.post a:hover {text-decoration: underline;}
.filter-bar {max-width: 1000px; margin: 40px auto; padding: 0 20px;}
.filter-form {display: flex; flex-direction: column; gap: 20px;}
.search-bar {display: flex; justify-content: space-between; align-items: center; border: 1px solid #aaa; padding: 10px 15px; font-size: 1.4em; font-family: Georgia, serif;}
.search-bar input {border: none; width: 100%; font-size: 1em; outline: none; background: transparent;}
.search-bar button {background: none; border: none; font-size: 1.2em; cursor: pointer;}
.filters {display: flex; flex-wrap: wrap; gap: 15px;}
.filters select, .filters input[type="date"] {padding: 10px 15px; border: 1px solid #aaa; font-size: 1em; width: 180px; font-family: inherit; background: white; color: #333;}

/* SCROLL ANIMATION */
.scroll-fade {opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out;}
.scroll-fade.show {opacity: 1; transform: none;}

/* FOOTER */
footer {background: #001f3f; color: white; text-align: center; padding: 20px 10px; font-size: 0.9em;}
footer a {color: #bbbbbb; text-decoration: none; margin: 0 5px;}
footer a:hover {color: white; text-decoration: underline;}

/* Close toggle global style */
.close-toggle {background: none; border: none; color: white; font-size: 2em; position: absolute; top: 20px; right: 20px; cursor: pointer; z-index: 1101; display: none;}


@media screen and (max-width: 768px) {
  /* Mobile Header Adjustments */
  header.top-side {
    justify-content: space-between;
    padding: 5px 15px;
    gap: 0; /* Reset desktop gap */
    z-index: 1002;
  }

  header.top-side .logo {
    margin-left: 0;
    margin-right: auto; /* This was in the "good" CSS version. If header.top-side is space-between, this should ideally be margin-right: 0; Let's try that. */
    /* margin-right: 0; /* For consistency with space-between on parent */
    font-size: initial;
    font-weight: normal;
    letter-spacing: normal;
  }

  /* NO mobile-specific styles FOR header.top-side .logo img (inherits desktop styles) */


  .menu-toggle { /* This is from your "good" CSS, using absolute positioning */
    display: block;
    font-size: 2em;
    cursor: pointer;
    color: white;
    background: none;
    border: none;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 1100;
  }

  .nav-wrapper {
    display: flex;
    align-items: center;
  }


  header.top-side nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background-color: #001f3f;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 20px 20px 30px;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
  }

  header.top-side nav.active {
    right: 0;
  }

  header.top-side nav ul {
    flex-direction: column;
    width: 100%;
  }

  header.top-side nav li {
    margin: 15px 0;
    text-align: left;
    width: 100%;
  }

  header.top-side nav a {
    font-size: 1.2em;
    width: 100%;
    display: block;
    padding: 10px 0;
  }


  /* === MOBILE HERO BACKGROUND IMAGE === */
  /* REMOVED: .hero-bg { object-position: left center !important; }
     Since a dedicated mobile image is used via <picture>, it should be centered by default
     with object-fit: cover. If 'mobile_blog.png' still needs specific positioning,
     a new rule like '.hero-bg { object-position: ...value...; }' can be added here.
  */
  /* === END OF MOBILE HERO BACKGROUND IMAGE === */


  /* Mobile hero text adjustments */
  .hero-content h1 {
    font-size: 2.5rem;
  }
   .hero-content p {
     font-size: 1.2em;
   }


  /* Mobile styles for filters */
  .filters {
    flex-direction: column;
    width: 100%;
  }

  .filters select,
  .filters input[type="date"] {
    width: 100%;
  }


  /* Close toggle for mobile nav (if used) */
  .close-toggle {
    display: block; /* Show close toggle on mobile if it's part of your mobile nav system */
  }

} /* End of @media screen and (max-width: 768px) block */