@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

:root {
  --primary-color: #0a1c2e; 
  --secondary-color: #06121f;
  --text-color: #333;
  --text-c-highlight: #3399ff; 
  --accent-c-2: #f1f1f1;
  --bg-color: #fff6ec;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  margin-top: 50px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: "Inter", sans-serif;
  padding: 0 20px;
}

.section {
  padding: 2rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  font-family: "Inter", sans-serif;
}

/* Media queries for responsive design */
/* Small screens (mobile phones) */
@media screen and (max-width: 576px) {
  .section-title {
    font-size: 1.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 15px;
  }
}

/* Medium screens (tablets) */
@media screen and (min-width: 577px) and (max-width: 992px) {
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 18px;
  }
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--secondary-color),
    var(--text-c-highlight)
  ); /* Using hex values instead of variables */
  margin: 10px auto;
  border-radius: 2px;
}

/* School Awards and Laurels */
.awards-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.award-item {
  width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.award-item:hover {
  transform: scale(1.05);
}

.award-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Academic Results */
.academic-results {
  max-width: 800px;
  margin: 0 auto;
}

.year-block {
  background-color: var(--accent-c-2);
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.year-block:hover {
  background-color: #e9e9e9;
}

.year-label {
  font-weight: bold;
  font-size: 1.2rem;
}

.result-buttons {
  display: flex;
  gap: 10px;
}

.result-btn {
  padding: 8px 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.result-btn:hover {
  background-color: var(--secondary-color);
}

/* Students' Achievements */
.students-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.student-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.student-card:hover {
  transform: translateY(-10px);
}

.student-image {
  height: 200px;
  width: 200px;
  overflow: hidden;
}

.student-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-info {
  padding: 20px;
}

.student-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.student-class {
  color: var(--text-c-highlight);
  font-weight: bold;
  margin-bottom: 10px;
}

.achievement-desc {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* School Achievements */
.certificate-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.certificate-item {
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.certificate-item:hover {
  transform: scale(1.05);
}

.certificate-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .students-achievements {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .year-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .result-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .award-item,
  .certificate-item {
    width: 100%;
  }
}

/* Animation for page load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeIn 0.8s ease forwards;
}

#school-laurels {
  animation-delay: 0.2s;
}
#academic-results {
  animation-delay: 0.4s;
}
#student-achievements {
  animation-delay: 0.6s;
}
#school-achievements {
  animation-delay: 0.8s;
}

/* Modal for full-size certificate viewing */
.modal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
  object-fit: contain; /* Ensures the image scales properly */
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.certificate-item,
.award-item {
  cursor: pointer;
}
