@import url('https://fonts.googleapis.com/css2?family=Poetsen+One&family=Winky+Rough:ital,wght@0,300..900;1,300..900&display=swap');

body {
  font-family: "Winky Rough", sans-serif;
  margin: 0;
  padding: 0;
  background-image: url(../images/bgimg1.jpeg);
  background-size:contain;
  background-repeat: repeat-y;
  color: #333;
}

header {
  background-image: url(../images/header-img.jpg);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 2rem;
  text-align: center;
  justify-items: center;
  min-height: 450px;
}

header h1{
  background-color: #fc26a67c;
  width:350px;
  border-radius: 5px;
  transform: rotate(-5deg);
  
}

.cover-img {
  position: relative;
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-top: 50px;
}

.cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

section {
  padding: 2rem;
}

#programs nav {
  margin: 1rem 0;
}

#programs nav a {
  margin-right: 1rem;
  text-decoration: none;
  color: #0077cc;
}

.back-to-home-btn {
  background-color: #0077cc;
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  padding: 10px 15px;
  z-index: 10;
  display: inline-block;
  margin-top: 1rem;
  text-align: center;
}
.back-to-home-btn:hover{
 background-color: #1d9df8;
}

.program-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-wrap: wrap;
}

.card {
  display: flex;
  flex-wrap: wrap;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
  
}
.description{
  width: 50%;
  flex: 1 1 50%;
}

.description p{
  font-size: 15px;
}

.img-card{
  width: 50%;
  flex: 1 1 50%;
}

img {
  width: 100%;
  border-radius: 10px;
}

.grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.grid2 {
  display: flex;
  gap: 2rem; 
  flex-wrap: wrap;
  margin-top: 2rem;
}

.grid2 .column {
  flex: 1;
  min-width: 300px; 
  padding: 15px;
}
.article-icon {
  width: 100%;
  
  height: 250px;
  margin: 10px 0;
  border-radius: 8px;
  object-fit: cover;
}


.column .news {
  flex: 1;
  min-width: 300px;
}
.news{
  background-color: #8dc8f3;
  padding: 10px;
  border-radius: 10px;
}

.news-card {
  display: flex;
  border-bottom: 3px dashed #002244;
  overflow: hidden;
  margin-bottom: 10px;
}

.news-card img {
  width: 40%;
  object-fit: cover;
  height: auto;
  margin-bottom: 10px;
}

.news-info {
  padding: 1rem;
  flex: 1;
}

.news-info h4 {
  margin: 0.5rem 0;
}

.news-info p {
  margin-bottom: 0.5rem;
}

.news-info a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}




.blogs {
  background-color: #d5f5e3;
  border-radius: 20px;
}

.events {
  background-color: #f8d7da;
  border-radius: 20px;
}

h2, h3 {
  margin-top: 0;
}

article {
  background: white;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

a {
  color: #0077cc;
}

p {
  font-size: 19px;
}



/* Adjust layout for screens up to 768px wide */
@media (max-width: 768px) {
  .back-to-home-btn {
    position: relative;
    display: block;
    margin: 1rem auto 0 auto;
    text-align: center;
  }

  .cover-img {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
  }

  .cover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .program-cards {
    flex-direction: column;
    padding: 0;
  }


  .card {
    flex-direction: column;
    margin: 0;
  }

  .description,
  .img-card {
    width: 100%;
  }

  .grid2 {
    flex-direction: column;
    gap: 1rem;
    display: flex;
    align-items: center; /* Center columns horizontally */
  }

  .grid2 .column {
    width: 100%;
    max-width: 400px; /* Optional: limit column width for better centering */
  }
  

  .news-card img {
    width: 100%;
    height: auto;
  }

}
