main {
  max-width: 1000px;     /* Limit the content width */
  margin: 0 auto;       /* Center the content horizontally */
  padding: 20px;        /* Space around the content */
  line-height: 1.6;     /* Improve readability */
  color: #000000;          /* General text color */
}

/* Headings */
main h1 {
  width: 100%;                             /* Span full page width */
  background: linear-gradient(45deg, #0a00c8fd, #04004d); /* Attractive gradient background */
  color: #ffffff;                             /* White text color */
  text-align: center;                      /* Center the header text */
  border-radius: 5px;
  padding: 10px;                   /* Vertical padding */
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);     /* Subtle shadow for depth */
}

/* Paragraphs */
main p {
  font-size: 1.0rem;
  margin-bottom: 15px;
  text-align:justify; text-justify:inter-word; line-height:1.6; text-align-last:left;
}

  .main-list{
    margin-bottom: 20px;
  }

  .main-link{
  color: #0300a7;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  }

  .main-link:hover {
    color: #1c5980;
    text-decoration: underline;
  }


/* Styling the heading */
.main-list h3 {
  width: 100%;                             /* Span full page width */
  background: linear-gradient(45deg, #0a00c8fd, #04004d); /* Attractive gradient background */
  color: #ffffff;                             /* White text color */
  text-align: center;                      /* Center the header text */
  border-radius: 5px;
  padding: 10px;                   /* Vertical padding */
  margin-top: 50px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);     /* Subtle shadow for depth */
}

/* Set up the <ul> as a grid with a single column */
/* ONLY target regular lists inside .main-list, NOT meta ones */
.main-list > ul:not(.school-meta-list) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  list-style: none;
  padding: 0;
  margin: 0;
}



/* === LINK & CARD BASE === */
.school-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.school-card {
  display: flex;
  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;
  width: 100%;
  max-width: 1200px;
  min-height: 300px;
  margin: 20px auto;
}
.school-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* === MEDIA (25–35%) === */
.school-card__media {
  flex: 0 0 40%;
  overflow: hidden;
  position: relative;
}
.school-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.school-card:hover .school-card__media img {
  transform: scale(1.1);
}

/* === CONTENT === */
.school-card__content {
  flex: 1;
  padding: 10px;
  text-align: left;
}
.school-card__content h4 {
  margin: 0 0 8px;
  font-weight: 700;
  color: #8a1800;
}
.school-location {
  margin: 0 0 12px;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Proper horizontal layout */
.school-meta-list {
  display: flex;
  flex-wrap: wrap;         /* Allows wrapping if screen is small */
  gap: 12px 16px;           /* Spacing between pills */
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

/* Style each <li> like a pill */
.school-meta-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgb(239, 239, 239);
  border-radius: 20px;
  font-size: 0.95rem;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: background 0.3s ease;
}

/* Icon color */
.school-meta-list i {
  color: #000072; /* Match your brand red */
  font-size: 1rem;
}


.school-meta-list li:hover {
  background: #f1f1f1;
}

/* === DESCRIPTION & READ MORE === */
.school-description {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
  position: relative;
}
.school-readmore {
  background: none;
  border: none;
  color: #8a1800;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  margin-left: 5px;
  transition: color 0.3s;
}
.school-readmore:hover {
  color: #cb2200;
}





















/* Responsive adjustments */
@media (max-width: 600px) {
  main {
    padding: 5px;
  }
  .main-list h2 {
    font-size: 1.5rem;
  }
  .main-list li .info h3 {
    font-size: 1.2rem;
  }
  .main-list li .info p {
    font-size: 0.9rem;
  }
    main p {
  font-size: 0.90rem;}

    .school-card__content h3 {
    font-size: 1.3rem;
  }

  .school-location {
    font-size: 0.9rem;
  }

  .school-meta-list {
    justify-content: flex-start;
    gap: 8px;
  }

  .school-meta-list li {
    font-size: 0.85rem;
    padding: 2px 10px !important;
  }

  .school-description {
  font-size: 0.65rem !important;
  }

  .school-readmore {
    font-size: 0.9rem;
  }
}


















/* Tablets (≤ 900px) */
@media (max-width: 900px) {
  .school-card {
    flex-direction: column; /* Stack image on top of content */
    min-height: auto;
  }

  .school-card__media {
    width: 100%;
    flex: none;
    height: 200px; /* Adjust height for mobile stack */
  }

  .school-card__media img {
    height: 100%;
  }

  .school-card__content {
    padding: 16px;
  }

  .school-meta-list {
    gap: 10px 12px;
  }

  .school-meta-list li {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .school-description {
    font-size: 0.95rem;
  }
}
