body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f7f8fa;
  color: #333;
}

header.header {
  background: #afc1d2;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-weight: bold;
}

header nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background-color: #265daf50;
  padding: 10px;
  border-radius: 30px;
}

.intro {
  text-align: center;
  padding: 3rem 3rem;
}

.intro h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.intro p {
  font-size: 1.2rem;
  color: #555;
  width: 60%;
  margin: 0 auto;
  padding-top: 10px;

}

.controls {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

#searchInput {
  padding: 0.5rem;
  width: 80%;
  max-width: 400px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.category-btn {
  background: #f5f5f5;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

.category-btn.active,
.category-btn:hover {
  background: #ff6f3d;
  color: white;
}

/* ARTICLES GRID */
.articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2rem;
  max-width: 70vw;
  margin: 2rem auto;
  background: #eaf0f6;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.article-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.article-card img {
  width: 100%;
  object-fit: cover;
}

.article-card .content {
  padding: 1rem;
}

.category-label {
  display: inline-block;
  font-size: 0.8rem;
  color: #ff6f3d;
  margin-bottom: 0.5rem;
}

.tags {
  margin: 0.5rem 0;
  transition: opacity 0.3s;

}

.tag {
  display: inline-block;
  background: #f5f5f5;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  padding: 5px;
  margin-top: 6px;
  gap: 3px;
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn {
  background: none;
  color: #ff6f3d;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: underline;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn.download {
  background: #6c757d;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-weight: normal;
}

.actions-hidden {
  display: none !important;
}

/* LARGE CARDS */
.large {
  flex-direction: row;
}

.large img {
  width: 50%;
  height: auto;
}

.large .content {
  flex: 1;
}

/* GRID LAYOUT FOR SMALL CARDS */
@media (min-width: 768px) {
  .articles {
    grid-template-columns: 1fr 1fr;
  }

  .small {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .large {
    flex-direction: column;
  }

  .large img {
    width: 100%;
  }
  .articles {
    max-width: 98vw;
    padding: 1rem;
  }
}