/* Reset some default browser styles */
body,
h1,
h2,
p {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f4f4f4;
  /* Light grey background for the whole page */
  color: #333;
  /* Dark grey for body text */
  line-height: 1.6;
  overflow-x: hidden;
  /* Prevent horizontal scrollbar */
}

/* Top Utility Bar Styling (small div above main header) */
.top-utility-bar {
  background-color: #0a3d62;
  /* Dark blue background */
  color: white;
  padding: 0.7rem 1rem;
  /* Small vertical padding */
  display: flex;
  /* Use flexbox for left and right alignment */
  justify-content: space-between;
  /* Pushes content to ends */
  align-items: center;
  /* Vertically centers items */
  font-size: 0.9rem;
  flex-wrap: wrap;
  /* Allow content to wrap on smaller screens */
}

/* Group for phone and social icons on the left */
.top-utility-bar .left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Space between phone and social icons */
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
}

.top-utility-bar .phone-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Space between icon and text */
  white-space: nowrap;
  /* Prevent phone number from breaking */
}

.top-utility-bar .top-social-icons {
  display: flex;
  /* Ensure social icons are in a row */
  gap: 1rem;
  /* Space between social icons */
}

.top-utility-bar .top-social-icons a {
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-utility-bar .top-social-icons a:hover {
  color: #f0f0f0;
  /* Slightly lighter on hover */
}

/* Build Info (top right) */
.top-utility-bar .build-info {
  color: white;
  font-size: 1.1rem;
  /* Bigger */
  font-weight: bold;
  /* Bold */
  text-align: right;
  opacity: 0.9;
  white-space: nowrap;
  /* Prevent build info from breaking */
}

/* Main Header Styling */
header {
  background-color: #0a3d62;
  /* Dark blue header background */
  color: white;
  /* White text for header */
  padding: 1.5rem 0;
  /* Reduced vertical padding here */
  text-align: center;
  /* Center the h1 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Subtle shadow */
}

header h1 {
  font-size: 2.8rem;
  /* Larger font size for main title */
  font-weight: bold;
  /* Ensure bold */
  margin: 0;
  /* Remove any default margins */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .top-utility-bar {
    flex-direction: column;
    /* Stack left group and build info vertically */
    align-items: flex-start;
    /* Align all items to the start */
    padding: 1rem;
  }

  .top-utility-bar .left-group {
    flex-direction: column;
    /* Stack phone and social icons vertically */
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    /* Space below left group */
  }

  .top-utility-bar .build-info {
    text-align: left;
    /* Align build info to the left on small screens */
    font-size: 1rem;
  }

  header h1 {
    font-size: 2.2rem;
    /* Adjust h1 size for smaller screens */
  }
}

/* Main content and footer styles (kept as before) */
main {
  background-color: white;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 2rem 0;
  margin: 2rem 0;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  border-radius: 0;
  box-sizing: border-box;
}

.about-section,
.blog-section,
.disclosure-section {
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 2rem;
  box-sizing: border-box;
  border-bottom: 1px solid #eee;
}

.about-section:last-of-type,
.disclosure-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.about-section h2,
.blog-section h2,
.disclosure-section h2 {
  color: #0a3d62;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 2rem;
}

.about-section p,
.disclosure-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0.5rem auto 1.5rem auto;
  max-width: 900px;
  text-align: justify;
}

.social-icons {
  margin-top: 1.5rem;
  text-align: center;
}

.social-icons a {
  display: inline-block;
  margin: 0 1rem;
  font-size: 1.8rem;
  color: #0a3d62;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: #3c6382;
  transform: scale(1.1);
}

.blog-section p.blog-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0.5rem auto 1.5rem auto;
  max-width: 900px;
  text-align: center;
}

#blog-posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 2rem;
  padding: 0 1rem;
  box-sizing: border-box;
  max-width: 100%;
}

.blog-post-item {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-post-item h3 {
  color: #0a3d62;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-post-item p.post-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1rem;
}

.blog-post-item p.post-description {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-post-item a.read-more {
  display: inline-block;
  background-color: #0a3d62;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.blog-post-item a.read-more:hover {
  background-color: #3c6382;
}

.blog-error-message {
  color: #d9534f;
  padding: 20px;
  text-align: center;
  border: 1px dashed #d9534f;
  border-radius: 5px;
  max-width: 600px;
  margin: 2rem auto;
  background-color: #fdf7f7;
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  background-color: #0a3d62;
  color: white;
  font-size: 0.85rem;
  margin-top: 2rem;
}

.back-button {
  position: absolute;
  top: 45px;
  /* Distance from top edge */
  left: 18px;
  /* Distance from left edge */
  z-index: 100;
  display: flex;
  align-items: center;
  background: #fff;
  color: black;
  border: none;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 1.2rem 0.5rem 0.8rem;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.back-button i {
  margin-right: 0.6em;
  font-size: 1.2em;
}

.back-button:hover,
.back-button:focus {
  background: #0a3d62;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  text-decoration: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  .back-button {
    top: 10px;
    left: 10px;
    padding: 0.4rem 0.9rem 0.4rem 0.7rem;
    font-size: 1rem;
  }
}