body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.main {
  max-width: 90% !important;
  margin: 0 auto;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.post-entry {
  padding: 1.5rem;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.post-entry:hover {
  transform: translateY(-5px);
}

.post-entry h2 {
  text-align: center;
}

.header {
  background: #111; /* Assuming a dark background for the header */
  color: #fff; /* Assuming white text for the header */
  position: relative; /* For z-index to work correctly */
  z-index: 100; /* Higher than other content, but lower than mobile menu */
}

.header .logo img {
  filter: invert(1);
  margin-top: 10%;
}

.nav {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 2rem; /* Add some padding to the nav */
  box-sizing: border-box; /* Include padding in width */
  min-height: 60px; /* Ensure a minimum height for the header */
}

/* Logo and Title grouping */
.logo-title {
  display: flex;
  align-items: center;
  /* No flex-grow here, let content dictate size */
}

/* Site Title Text (for desktop centering) */
.site-title-text {
  margin: 0; /* Reset margin */
  text-align: center; /* Ensure text is centered within its own box */
  position: absolute; /* Position absolutely to center it */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap; /* Keep title on one line */
  /* Ensure it doesn't overlap with logo or menu on desktop */
  /* Max-width might be needed if title is very long */
  max-width: calc(100% - 200px); /* Example: 200px for logo+menu space */
  overflow: hidden; /* Hide overflow if title is too long */
  text-overflow: ellipsis; /* Add ellipsis if title is too long */
}

/* Main Menu (desktop) */
#menu {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
}

#menu li {
  margin-left: 1.5rem;
}

.mobile-social-icons {
    display: none; /* Hidden on desktop */
}

#menu a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* Hamburger menu hidden on desktop */
.hamburger-menu {
  display: none;
}

/* Social Icons (Desktop) */
.social-header-icons {
    display: flex;
    align-items: center;
    margin-left: auto; /* Push icons to the right */
}

.social-header-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Smaller size for icons on desktop */
    height: 20px;
    margin-left: 8px; /* Spacing between icons */
    color: #fff; /* Icon color */
}

.social-header-icons svg {
    width: 100%;
    height: 100%;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-between; /* Keep logo-title and hamburger on ends */
    padding: 1rem 0.5rem; /* Adjust padding for mobile, reduced horizontal padding */
    max-width: 100%; /* Ensure it takes full width on mobile */
  }

  .logo-title {
    /* No absolute positioning on mobile */
    position: static;
    flex-grow: 1; /* Allow logo-title to take space */
    justify-content: flex-start; /* Align logo and title to start */
  }

  .site-title-text {
    position: static; /* Reset absolute positioning */
    transform: none; /* Reset transform */
    margin: 0 0.5rem; /* Adjust margin for mobile */
    flex-grow: 1; /* Allow it to take available space */
    text-align: left; /* Align left on mobile */
    max-width: none; /* Reset max-width */
    white-space: wrap; /* Allow wrapping on mobile if needed */
  }

  #menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    width: 100%;
    background: #111;
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    padding: 1rem 0;
    text-align: center;
    z-index: 1000; /* Bring to front */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for visual separation */
  }

  #menu.active {
    display: flex;
    opacity: 0.9;
    flex-direction: column; /* Ensure menu items stack vertically */
    align-items: center; /* Center menu items */
    padding-bottom: 1rem; /* Add padding at the bottom for social icons */
  }

  .hamburger-menu {
    display: block;
    margin-left: auto; /* Push hamburger to the right */
    color: #fff; /* Ensure hamburger icon is visible */
  }

  :root {
    --nav-width: 100%; /* Override nav-width for mobile */
  }

  /* Hide desktop social icons on mobile */
  .social-header-icons {
      display: none;
  }

  /* Mobile social icons inside expanded menu */
  .mobile-social-icons {
    display: flex; /* Show the social icons container */
    justify-content: center; /* Center the social icons */
    width: 100%; /* Take full width */
    margin-top: 1rem; /* Space from nav items */
  }

  .mobile-social-icons .social-header-icons {
    display: flex; /* Ensure the social icons themselves are flex */
    margin-left: 0; /* Reset margin */
  }

  .mobile-social-icons .social-header-icons a {
    margin: 0 0.5rem; /* Adjust spacing for horizontal layout */
  }
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.post-card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.post-card-summary {
  font-size: 1rem;
  color: #ccc;
}

.post-card-link {
  display: inline-block;
  margin-top: 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

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

.footer {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #888;
}

.hero-section {
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  box-sizing: border-box;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.hero-image {
  flex: 1;
  max-width: 400px;
}

.hero-image img {
  width: 100%;
  border-radius: 10px;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.button {
  background: #fff;
  color: #111;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-right: 1rem;
  transition: background-color 0.3s ease;
}

.button:hover {
  background: #ccc;
}

@media (max-width: 992px) {
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .hero-image {
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 1rem;
  }
  .hero-text h1 {
    font-size: 1.5rem;
  }
  .hero-text p {
    font-size: 0.8rem;
  }
  .button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

h2 {
  font-weight: 500;
}

.latest-posts-section {
  margin-top: 3rem; /* Add space above the section */
  margin-bottom: 3rem; /* Add space below the section */
  text-align: center; /* Center the section title */
}

.latest-posts-section .section-title {
  text-align: center; /* Ensure the title itself is centered */
}