@import url("https://fonts.googleapis.com/css?family=PT+Serif:400,400i,700,700i");
@import url("https://fonts.googleapis.com/css?family=Josefin+Slab:100,100i,300,300i,400,400i,600,600i,700,700i");

:root {
  --title: #00257f;
  --para-text: rgba(0, 0, 0, 0.67);
  --title-font: "Josefin Slab", serif;
  --text-font: "PT Serif", serif;
  --bg: #f4f4f4;
  --accent: #ff6347;
}



h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--title);
  /* text-transform: capitalize; */
  /* font-family: var(--title-font); */
}

.search-bar {
  display: flex;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.search-bar input {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 16px;
}

.search-bar button {
  width: 50px;
  background-color: #007bff;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-bar button:hover {
  background-color: #0056b3;
}

.search-bar button svg {
  fill: white;}


  .news-detail-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1236px;
    width: 100%;
    margin-left: 3rem;
    margin-top: 4rem;
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 50px;
  }

  .news-content {
    display: flex;
    flex-direction: column;
  }

  .news-header {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
  }

  .news-title {
    font-size: 2.7em;
    margin: 0;
    text-align: left;
    color: var(--title);
  }


  .news-date {
    font-size: 1em;
    color: #999;
    margin: 8px 0;
  }

  .news-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  .news-description {
    font-size: 1.2em;
    color: var(--para-text);
    margin: 16px 0;
    line-height: 1.6;
    text-align: justify;
  }

  .related-news {
    margin-top: 20px;
  }

  .related-news h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .related-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .related-news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
  }

  .related-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .related-news-card img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
  }

  .related-news-card-content {
    padding: 20px;
    flex: 1;
  }

  .related-news-card-title {
    font-size: 1.2em;
    margin: 0 0 10px;
    color: var(--title);
  }

  .related-news-card-description {
    font-size: 1em;
    color: var(--para-text);
    margin: 0 0 10px;
  }

  .related-news-card-date {
    font-size: 0.9em;
    color: #999;
    margin-top: auto;
  }

/* Sidebar Styling */
.sidebar {
  padding: 20px;
  background-color: #f9fbfd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-intro p {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}

.related-news h2 {
  font-size: 20px;
  color: #007bff;
  margin-bottom: 20px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.related-news-grid {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.related-news-card {
  display: block;
  text-decoration: none;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.related-news-card-content {
  padding: 15px;
  /* border-bottom: 2px solid #00257f; */
}
.news-hr{
  border-top: 6px solid #00257f;
  width: 3rem;
}
.related-news-card-title {
  font-size: 18px;
  color: #1c1935;
  line-height: 28px;
  margin: 0 0 10px;
}

.related-news-card-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px;
}

.related-news-card-date {
  font-size: 15px;
  color: #999;
}

/* Highlighting for search terms */
.mark {
  background-color: #f6f4f4;
  font-weight: bold;
}

/* General Styling for the Container */
.news-detail-container {
  display: flex;
  gap: 80px;
}

.news-content {
  flex: 3;
}

.sidebar {
  flex: 1.4;
}

/* Base Styles for .news-detail-container */
.news-detail-container {
  display: flex;
  gap: 80px;
  flex-wrap: wrap; /* Allows items to wrap to the next line if needed */
}

/* For tablets (768px and below) */
@media (max-width: 768px) {
  .news-detail-container {
    flex-direction: column;
    margin-left: 0rem;
  }

  .news-content {
    margin-bottom: 20px;
  }

  .sidebar {
    width: 100%;
  }

  .related-news-grid {
    grid-template-columns: 1fr;
  }

  .related-news-card {
    flex-direction: column;
    text-align: center;
  }

  .related-news-card-image {
    width: 100%;
  }

  .related-news-card-content {
    padding: 15px;
  }
}

/* For mobile devices (480px and below) */
@media (max-width: 480px) {
  .news-title {
    font-size: 1.5em;
  }

  .news-description {
    font-size: 16px;
  }

  .related-news-card-title {
    font-size: 1.2em;
    text-align: left;
  }

  .related-news-card-description {
    font-size: 16px;
    text-align: left;
  }

  .related-news-card-date {
    font-size: 0.8em;
    text-align: left;
  }

  .search-bar input {
    padding: 8px;
  }

  .search-bar button {
    padding: 8px;
  }
}

/* Default styles for larger screens */
.search-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px; /* Space below the search bar */
}

.search-bar input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.search-bar button {
  background: #007bff;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Ensure search bar is positioned on top in mobile view */
@media (max-width: 768px) {
  body {
    margin: 0;
    padding: 0;
  }

  .news-detail-container {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 15px;
  }

  .search-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-bottom: 20px;
    z-index: 10;
    background: white; /* Ensure the search bar background is visible */
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Add shadow for visibility */
  }

  .news-content, .sidebar {
    margin-top: 80px; /* Ensure content starts below the fixed search bar */
  }
  .sidebar-intro{
    margin-top: -11rem;
  }
}
