/* ActualitesPage.css - For the actualites page */
@import './variables.css';
@import './utilities.css';

/* actualite header wrapper styling */
.actualite-header-wrapper {
  background-image: url('../images/newsbackground.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  color: var(--black);
  margin-bottom: 5rem;
  height: 700px;
  padding: 2rem 1rem;
}

.actualite-header-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 1;
}

/* actualite header styling */
.actualite-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  position: relative;
  z-index: 2;
}

.actualite-header h1 {
  font-family: var(--font-primary, 'Montserrat');
  font-weight: 600;
  font-size: 2.5rem;
  color: var(--black);
  text-align: center;
  position: relative;
  z-index: 2;
}

.actualite-header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--coral);
  margin: 10px auto 0;
  position: relative;
  z-index: 2;
}

/* News page container */
.news-page {
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

/* Search bar styling */
.news-search {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--black);
  border-radius: 5px;
  font-size: 1rem;
}

/* Category filter buttons */
.news-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.news-category {
  padding: 0.5rem 1rem;
  border: 1px solid var(--black);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.news-category.active {
  background-color: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.news-category:hover {
  background-color: var(--coral);
  color: var(--white);
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* News card */
.news-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-content {
  padding: 1.5rem;
  flex: 1;
  text-align: justify;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card-title {
  color: var(--black);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.news-description {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-date {
  color: #888;
  font-size: 0.9rem;
}

.news-category-tag {
  background: var(--coral);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.news-card:hover .news-category-tag {
  background: var(--blue);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .news-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .news-categories {
    margin-left: 0;
  }

  .news-category-tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
}
