/* Global Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  font-size: 1rem;
}

/* Navigation */
nav {
  background-color: #000;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav h1 {
  font-size: 1.5rem;
  margin: 0;
}

/* Hide burger button by default (desktop) */
#navToggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

nav ul li a:focus {
  outline: 2px dashed #0077cc;
  outline-offset: 2px;
}

/* Feature & Closing Images */
.feature-image img,
.closing-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  max-height: none;
}

/* Article Teasers */
.teaser {
  padding: 2rem;
  background-color: #fff;
  margin: 1rem auto;
  max-width: 800px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.teaser h2 {
  margin-top: 0;
}

.teaser a {
  display: inline-block;
  margin-top: 1rem;
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.teaser a:hover {
  text-decoration: underline;
  color: #005fa3;
}

.teaser + .article-ad {
  margin-top: 1.5rem;
}

/* Banner & Ad Slots */
.banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 2rem 0;
}

.ad-slot {
  width: 300px;
  height: 300px;
  margin: 2rem auto;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ad-wrapper {
  position: relative;
}

.ad-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #666;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #ccc;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Layout Wrapper */
.content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem;
}

main {
  flex: 3;
}

aside.more-articles {
  flex: 1;
  max-width: 300px;
}

/* Footer */
footer {
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* Sidebar Styling */
.more-articles {
  background: linear-gradient(to bottom right, #fffdf5, #f9f9f9);
  border-left: 4px solid #e0c36e;
  padding: 1.5rem;
  margin-top: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.more-articles h3 {
  font-size: 1.3rem;
  color: #222;
  margin-bottom: 1rem;
}

.more-articles ul {
  list-style: none;
  padding-left: 0;
}

.more-articles li {
  margin-bottom: 0.5rem;
}

.more-articles a {
  font-size: 1rem;
  color: #0077cc;
  font-weight: 600;
  text-decoration: none;
}

.more-articles a:hover {
  text-decoration: underline;
}

/* Article Ad */
.article-ad {
  margin: 1rem auto 2rem;
  max-width: 800px;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.article-ad .ad-wrapper {
  display: flex;
  justify-content: center;
}

.article-ad img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Homepage Banner */
.homepage-banner {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.homepage-banner .banner-wrapper {
  max-width: 900px;
  width: 100%;
  text-align: center;
  position: relative; /* ensure ad-label anchors correctly */
}

/* Reference Links */
.reference-links {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-top: 1px solid #ddd;
}

.reference-links h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #333;
}

.reference-links ul {
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.reference-links li {
  margin-bottom: 0.5rem;
}

.reference-links a {
  color: #0077cc;
  text-decoration: underline;
  font-weight: bold;
}

.reference-links a:hover {
  color: #005fa3;
}

/* Newsletter Signup */
.newsletter-signup {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border: 2px solid #e0c36e;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(224, 195, 110, 0.2);
}

.newsletter-signup h3 {
  font-size: 1.2rem;
  margin-top: 0;
  color: #b8860b;
  text-align: center;
}

.newsletter-signup input[type="text"],
.newsletter-signup input[type="email"] {
  width: 100%;
  padding: 0.6em;
  margin-bottom: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.newsletter-signup button {
  width: 100%;
  padding: 0.6em;
  background: #b8860b;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-signup button:hover {
  background: #a97400;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  aside.more-articles {
    max-width: 100%;
    margin-top: 1rem;
    border-left: none;
    border-top: 2px solid #ccc;
    padding-left: 0;
    padding-top: 1rem;
  }

  .teaser,
  .article-ad {
    padding: 1rem;
    margin: 1rem;
  }

  /* Optional Enhancement: Show full image on mobile */
  .feature-image img,
  .closing-image img {
    object-fit: contain;
  }

  /* Responsive text sizing */
  h1, h2, h3 {
    font-size: 1.2em;
  }

  .teaser h2 {
    font-size: 1.3em;
  }

  .more-articles h3 {
    font-size: 1.2em;
  }

  .reference-links h3 {
    font-size: 1.1em;
  }

  .ad-label {
    font-size: 0.65rem;
    padding: 0.15em 0.35em;
  }

  /* Mobile navigation toggle and menu */
  #navToggle {
    display: block; /* show burger button only on mobile */
    position: absolute;
    top: 1rem;
    right: 2rem;
  }

  #navMenu {
    display: none;
    flex-direction: column;
    background: #000;
    border-top: 1px solid #444;
    padding: 1rem;
    position: absolute;
    top: 3.5rem;
    right: 0;
    width: 200px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10;
  }

  #navMenu.show {
    display: flex;
  }

  #navMenu li a {
    color: #fff;
    padding: 0.5rem 0;
    font-size: 1rem;
    display: block;
  }
}