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

/* Navbar background */
.navbar {
  background: url("/assets/header-image-1e91e234.png") center/cover no-repeat;
  padding: 1rem 0;
  font-family: Arial, sans-serif;
  color: white;
  position: relative;
  z-index: 0;
  min-height: 120px; /* Minimum height for very small screens */
}

/* Centered container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid layout:
   -- logo top-left, nav spans right both rows,
   -- address bottom-left */
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "logo nav"
    "address nav";
  align-items: center;
  gap: 0.5rem 0;  /* vertical gap between rows */
}

/* Logo in top-left */
.logo {
  grid-area: logo;
  font-size: clamp(2rem, 5vw, 3rem); /* Scales from 2rem to 3rem based on viewport */
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  transition: font-size 0.3s ease;
}

/* Nav links on the right, spanning both rows */
.nav-links {
  grid-area: nav;
  justify-self: end;
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.5rem); /* Dynamic gap between nav items */
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem); /* Scales from 0.9rem to 1.1rem */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  transition: color 0.2s ease-in-out;
  white-space: nowrap; /* Prevent text wrapping */
}

.nav-links a:hover {
  color: rgb(139, 0, 8);
}

/* Address in bottom-left */
.header-address {
  grid-area: address;
  font-size: clamp(0.7rem, 2vw, 0.9rem); /* Scales from 0.7rem to 0.9rem */
  text-decoration: none;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
  transition: text-decoration 0.2s;
}

/* keep it white before & after visit */
.header-address:link,
.header-address:visited {
  color: white;
}

/* underline on hover */
.header-address:hover {
  text-decoration: underline;
}

/* Add Post Button */
.add-post-btn {
  color: white;
  padding: 1.5rem 2rem;
  cursor: pointer;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-post-btn:hover {
  /* Currently commented out hover effects */
}

.add-post-btn h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Add/Edit Alert Button - 20% smaller than Add New Post */
.add-alert-btn {
  color: white;
  padding: 1.2rem 1.6rem; /* Reduced from 1.5rem 2rem (20% smaller) */
  cursor: pointer;
  text-align: center;
  min-height: 48px; /* Reduced from 60px (20% smaller) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-alert-btn:hover {
  /* Match the Add New Post hover behavior */
}

.add-alert-btn h1 {
  margin: 0;
  font-size: 1.2rem; /* Reduced from 1.5rem (20% smaller) */
  font-weight: bold;
}

/* Mobile responsive for both buttons */
@media (max-width: 768px) {
  .add-post-btn {
    padding: 1rem 1.5rem;
    min-height: 40px;
  }
  
  .add-alert-btn {
    padding: 0.8rem 1.2rem; /* 20% smaller than add-post-btn mobile */
    min-height: 32px; /* 20% smaller than 40px */
  }
  
  .add-post-btn h1 {
    font-size: 1.3rem;
  }
  
  .add-alert-btn h1 {
    font-size: 1.04rem; /* 20% smaller than 1.3rem */
  }
}

/* Very small screens - maintain 20% difference */
@media (max-width: 400px) {
  .add-post-btn {
    padding: 0.8rem 1.2rem;
    min-height: 35px;
  }
  
  .add-alert-btn {
    padding: 0.64rem 0.96rem; /* 20% smaller */
    min-height: 28px; /* 20% smaller than 35px */
  }
  
  .add-post-btn h1 {
    font-size: 1.1rem;
  }
  
  .add-alert-btn h1 {
    font-size: 0.88rem; /* 20% smaller than 1.1rem */
  }
}

/* Tablet breakpoint - adjust grid for better spacing */
@media (max-width: 900px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .nav-links {
    gap: clamp(0.3rem, 1.5vw, 1rem);
  }
}

/* Mobile / narrow screens: stack everything but keep responsive sizing */
@media (max-width: 600px) {
  .navbar {
    padding: 0.75rem 0;
    min-height: 100px;
  }
  
  .header-inner {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .logo {
    font-size: clamp(1.8rem, 6vw, 2.5rem); /* Larger range for mobile */
  }
  
  .nav-links {
    margin: 0.5rem 0;
    justify-content: center;
    gap: clamp(0.5rem, 3vw, 1rem);
  }
  
  .nav-links a {
    font-size: clamp(0.85rem, 3vw, 1rem);
  }
  
  .header-address {
    margin-top: 0.25rem;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  }
}

/* Landscape orientation on mobile devices - maintain 20% difference */
@media (max-width: 900px) and (orientation: landscape) {
  .navbar {
    padding: 0.5rem 0;
    min-height: 80px;
  }
  
  .logo {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .nav-links a {
    font-size: clamp(0.8rem, 2vw, 1rem);
  }
  
  .header-address {
    font-size: clamp(0.6rem, 1.8vw, 0.8rem);
  }
}