/* ===== Base Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --main-color: #006699;
  --text-color: #333;
  --bg-color: #fff;
  --accent-fun: #ffefc2;
  --accent-news: #c2e1ff;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 100px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 60px;
  border-bottom: 1px solid #eee;
  background-color: white;
  z-index: 1001;
  font-size: 17px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo {
  font-weight: bold;
  font-size: 24px;
  color: var(--main-color);
  letter-spacing: -0.5px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.navbar a {
  text-decoration: none;
  color: #111;
  font-weight: 600;
  transition: color 0.2s ease;
}

.navbar a:hover {
  color: var(--main-color);
}

.socials a {
  margin-left: 15px;
  text-decoration: none;
  font-size: 18px;
}

/* ===== Hero Section ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 60px 80px;
  max-width: 1300px;
  margin: auto;
  flex-wrap: wrap;
  min-height: 500px;
  overflow: hidden;
}

.hero-img {
  width: 340px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-top: -40px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 500px;
}

.hero-text h1 {
  font-size: 3.6rem;
  line-height: 1.2;
  font-weight: 700;
}

.hero-text span {
  color: var(--main-color);
}

/* ===== Filters ===== */
#filters {
  text-align: center;
  margin: 40px auto 20px;
}

#filters button {
  background-color: var(--main-color);
  color: white;
  border: none;
  padding: 10px 16px;
  margin: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#filters button:hover {
  background-color: #004f66;
}

#filters button.active {
  background: #003c4f;
  color: white;
}

/* ===== Essay Section ===== */
.essays {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 60px;
  gap: 60px;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
}

.essay-text {
  flex: 1;
  min-width: 300px;
}

.essay-text h2 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.essay-text h3 {
  font-size: 1.4rem;
  color: var(--main-color);
  margin-bottom: 20px;
}

.essay-text p {
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 600px;
}

.quote {
  font-style: italic;
  color: #444;
}

.essay-image img {
  width: 280px;
  max-width: 100%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 8px;
  margin-right: 6px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.category-tag.fun {
  background: var(--accent-fun);
  color: #b76b00;
}

.category-tag.news {
  background: var(--accent-news);
  color: #004b8d;
}

/* ===== Duck Game ===== */
#duck-score {
  position: fixed;
  top: 15px;
  right: 20px;
  background: var(--main-color);
  color: white;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  font-size: 16px;
  z-index: 2000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: none;
}

.duck {
  position: fixed;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1000;
  user-select: none;
  animation: float 1s ease-in-out infinite alternate;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.duck:hover {
  transform: scale(1.3);
}

.duck-dead {
  animation: explode 0.5s forwards;
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@keyframes explode {
  to {
    transform: scale(2.5) rotate(720deg);
    opacity: 0;
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 30px;
  }

  .hero-text {
    max-width: 100%;
  }

  .navbar {
    flex-direction: column;
    gap: 20px;
  }

  .navbar ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}
