/* General Styles */
body {
  margin: 0;
  font-family: sans-serif;
  background-color: #000; /* Black background */
  color: #fff; /* White text */
  line-height: 1.6;
}

a {
  color: #FFD700; /* Duck yellow accents */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-image: url('/public/images/banner-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 1rem;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.logo {
  max-height: 60px;
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  border-radius: 50%;
  overflow: hidden;
  border: none;
  background-color: transparent;
  display: block;
  object-fit: contain;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for better text contrast */
  z-index: 0;
}

header > * {
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0 0 0.5rem 0;
  color: #FFD700; /* Duck yellow */
}

header input[type="text"] {
  padding: 0.5rem;
  margin-bottom: 1rem;
  width: 80%;
  border: 1px solid #FFD700;
  background-color: rgba(17, 17, 17, 0.8); /* Darker input background with transparency */
  color: #fff;
  backdrop-filter: blur(4px);
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

header nav a {
  color: #FFD700;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Main Content */
main {
  padding: 1rem;
}

/* Featured Section */
.featured {
  margin-bottom: 2rem;
  border: 1px solid #FFD700;
  padding: 1rem;
}

.featured img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/* New Homepage Sections */
.hero {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background-color: #111;
  border-radius: 8px;
}

.hero h2 {
  color: #FFD700;
  margin-top: 0;
}

.hero p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.featured-categories {
  margin-bottom: 3rem;
}

.featured-categories h3 {
  text-align: center;
  color: #FFD700;
  margin-bottom: 1.5rem;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card {
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.category-card:hover {
  border-color: #FFD700;
  transform: translateY(-4px);
}

.category-card h4 {
  margin-top: 0;
  color: #FFD700;
}

.category-card h4 a {
  color: inherit;
}

.category-card ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.duck-spotlight {
  background-color: #0a1a2a;
  padding: 2rem 1rem;
  border-radius: 8px;
  margin-bottom: 3rem;
  border: 1px solid #1a5fb4;
}

.duck-spotlight h3 {
  color: #4dc0ff;
  margin-top: 0;
  text-align: center;
}

.duck-locations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .duck-locations {
    grid-template-columns: repeat(3, 1fr);
  }
}

.duck-location {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 6px;
}

.duck-location h4 {
  color: #4dc0ff;
  margin-top: 0;
}

.latest-articles {
  margin-bottom: 3rem;
}

.latest-articles h3 {
  color: #FFD700;
}

.latest-articles ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.contribute {
  text-align: center;
  padding: 2rem;
  background-color: #111;
  border-radius: 8px;
  border: 1px solid #FFD700;
  margin-bottom: 3rem;
}

.contribute h3 {
  color: #FFD700;
  margin-top: 0;
}

/* Nearby Locations */
.nearby-locations {
  margin-bottom: 2rem;
}

/* Latest Resources */
.latest-resources ul {
  list-style: disc;
  padding-left: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #FFD700;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem;
  background-color: #111;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-family: sans-serif;
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: #FFD700;
  outline: none;
}

button[type="submit"] {
  background-color: #FFD700;
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button[type="submit"]:hover {
  background-color: #ffed4e;
}

/* AdSense Slot */
.adsense-slot {
  margin: 2rem 0;
  padding: 1rem;
  background-color: #111; /* Dark background for ad slot */
  text-align: center;
  border: 1px dashed #FFD700; /* Dashed yellow border */
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  border-top: 1px solid #333; /* Subtle separator */
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  header nav ul {
    justify-content: flex-end; /* Align nav to the right on larger screens */
  }

  header input[type="text"] {
    width: 50%; /* Wider search bar on larger screens */
    margin-right: 1rem;
  }

  /* Example: Align header items differently on larger screens */
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    min-height: 250px;
  }

  .logo {
    max-height: 70px;
    width: 70px;
    height: 70px;
    margin-bottom: 0;
    order: -1;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    background-color: transparent;
    display: block;
    object-fit: contain;
  }

  header h1 {
    margin-bottom: 0;
  }

  header nav {
    order: 3; /* Place nav after search */
  }
}