/* --- Basic Reset & Defaults --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  padding-top: 170px;
  font-family: "Montserrat", sans-serif; /* Modern font */
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa; /* Light background */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: #007bff; /* Primary link color */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0056b3; /* Darker shade on hover */
}

h1,
h2 {
  margin-bottom: 0.75em;
  color: #2c3e50; /* Darker heading color */
}

h1 {
  font-size: 2.8rem;
}

h2 {
  font-size: 1.8rem;
  font-weight: 400;
  color: #34495e; /* Slightly lighter heading color */
}

p {
  margin-bottom: 1em;
}

/* --- Header --- */
.site-header {
  background-color: #ffffff; /* White header background */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed; /* or sticky, see note below */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* Ensure it's above other content */
  transition: transform 0.3s ease-in-out; /* Smooth transition for hiding/showing */
}

.site-header--hidden {
  transform: translateY(-100%); /* Moves the header up by its own height */
}

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

.logo-placeholder a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}

/* --- Navigation --- */
.main-nav ul {
  list-style: none;
  display: flex;
}

.main-nav li {
  margin-left: 25px;
}

.main-nav a {
  color: #34495e;
  font-weight: bold;
  padding: 5px 0;
  position: relative; /* For the underline effect */
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Cool underline hover effect */
.main-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #1abc9c; /* Accent color - maybe a teal/green? */
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 100%;
}

.main-nav a:hover,
.main-nav a:focus {
  color: #1abc9c; /* Match accent color on hover */
}

.menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #34495e;
}

/* --- Hero Section --- */
.hero {
  /* Consider adding a background image here */
  /* background: url('path/to/bridge-or-duluth.jpg') no-repeat center center/cover; */
  background-color: #e0e7ef; /* Placeholder light blue/grey */
  color: #2c3e50; /* Dark text for contrast */
  padding: 6rem 0; /* More padding */
  text-align: center;
  min-height: 60vh; /* Ensure it takes up significant space */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .container {
  max-width: 800px; /* Limit text width */
}

.hero h1 {
  color: #1a2530; /* Even darker for main heading */
}

.cta-button {
  display: inline-block;
  background-color: #1abc9c; /* Accent color */
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 1.5rem;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.cta-button:hover {
  background-color: #16a085; /* Darker accent */
  color: #ffffff;
  transform: translateY(-2px); /* Slight lift effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Footer --- */
.site-footer-bottom {
  background-color: #34495e; /* Dark footer */
  color: #ecf0f1; /* Light text */
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem; /* Space above footer */
  font-size: 0.9rem;
}

.qrcode {
  width: fit-content;
  margin: 0 auto;    /* This then centers the div horizontally within its parent */
  padding: 10px;     /* Good for inner spacing around the QR code */
  margin-top: 10px;  /* Adds space above the QR code */
  margin-bottom: 20px; /* Adds space below the QR code */
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.5rem;
  }

  .header-container {
    position: relative; /* Needed for absolute positioning of nav */
  }

  .menu-toggle {
    display: block; /* Show hamburger */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* Above nav links */
  }

  .main-nav .nav-links {
    display: none; /* Hide links by default */
    flex-direction: column;
    position: absolute;
    top: 100%; /* Position below header */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    border-top: 1px solid #eee;
  }

  .main-nav .nav-links.active {
    display: flex; /* Show links when active */
  }

  .main-nav li {
    margin: 0;
    text-align: center;
  }

  .main-nav a {
    display: block; /* Make links take full width */
    padding: 1rem;
    border-bottom: 1px solid #eee;
  }

  .main-nav a::after {
    /* Disable underline effect on mobile nav items */
    display: none;
  }

  .main-nav a:hover,
  .main-nav a:focus {
    background-color: #f8f9fa; /* Subtle background on hover */
    color: #1abc9c; /* Keep accent color */
  }

  .main-nav li:last-child a {
    border-bottom: none;
  }

  .hero {
    padding: 4rem 0;
    min-height: 50vh;
  }

    /* Section for latest blog posts on homepage */
    #latest-blog-posts-section {
      padding: 40px 0;
      background-color: #f9f9f9; /* A light background to differentiate */
    }
    
    #latest-blog-posts-section h2 {
      text-align: center;
      margin-bottom: 30px;
      font-size: 2em;
      color: #333;
    }
    
    #intro-section {
        text-align: center;
        margin-bottom: 30px;
        font-size: 2em;
        color: #333;
    }
    
    .posts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
    }
    
    .home-blog-post-summary {
      background-color: #fff;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
      transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    }
    
    .home-blog-post-summary:hover {
      transform: translateY(-5px);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .home-blog-post-summary h3 {
      margin-top: 0;
      font-size: 1.4em;
      color: #4a1f66; /* Your blog's purple */
    }
    
    .home-blog-post-summary h3 a {
      text-decoration: none;
      color: inherit;
    }
    
    .home-blog-post-summary h3 a:hover {
      text-decoration: underline;
    }
    
    .post-meta-summary {
      font-size: 0.85em;
      color: #777;
      margin-bottom: 10px;
    }
    
    .home-blog-post-summary p {
      font-size: 0.95em;
      line-height: 1.6;
      color: #555;
    }
    
    .read-more-summary {
      display: inline-block;
      margin-top: 10px;
      font-weight: bold;
      color: #5cb85c; /* Your blog's green */
      text-decoration: none;
    }
    
    .read-more-summary:hover {
      text-decoration: underline;
    }
    
    .loading-posts {
      text-align: center;
      font-style: italic;
      color: #777;
      grid-column: 1 / -1; /* Span all columns if grid is active */
    }
    
    /* Optional: Style for the "Visit Full Blog" button if needed */
    .cta-button-secondary {
      display: inline-block;
      background-color: #6c757d; /* A secondary color */
      color: white;
      padding: 10px 20px;
      text-decoration: none;
      border-radius: 5px;
      font-weight: bold;
      text-align: center;
      transition: background-color 0.2s ease;
    }
    
    .cta-button-secondary:hover {
      background-color: #5a6268;
    }

}
