/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f5f7fa;
  color: #333;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ===== NAVBAR ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 80px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hero-logo img {
  height: 40px;
  width: auto;
  max-width: 100%;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav ul li a {
  text-decoration: none;
  font-weight: 500;
  color: #000;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: #808000;
}

/* ===== HAMBURGER MENU ===== */
.menu-toggle {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: #333;
  z-index: 200;
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications {
  padding: 60px 100px;
  text-align: center;
}

.certifications h3 {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #808000;
}

.certifications h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
}

.certifications p {
  font-size: 16px;
  margin-bottom: 40px;
  line-height: 1.6;
  color: #666;
}

/* ===== Certificates Grid ===== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  justify-items: center;
  align-items: start;
}

/* Uniform Certificate Card */
.certificate {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 420px;
  height: 240px; /* 🔥 Fixed uniform height */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  margin: 0;
}

.certificate a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.certificate img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures proportional scaling inside box */
  border-radius: 0;
  vertical-align: middle;
  background: #fff;
}

/* Hover effect */
.certificate:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.certificate.hidden {
  display: none;
}

.certificate.hidden.show {
  display: flex;
  animation: fadeIn 0.6s ease-in-out;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Certificate Popup Modal ===== */
.cert-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.cert-popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: scaleUp 0.25s ease;
}

.cert-popup-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.cert-popup .close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cert-popup .close-btn:hover {
  color: #0078ff;
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== View More Button ===== */
.view-more-container {
  margin-top: 35px;
  text-align: center;
}

#viewMoreBtn {
  background: #4f6364;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#viewMoreBtn:hover {
  background: #808000;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.footer {
  background: #2b3035;
  color: #dcdcdc;
  padding: 40px 20px;
  width: 100%;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left .social-logos,
.footer-right .social-logos {
  display: flex;
  gap: 12px;
}

.footer-left .social-logos a,
.footer-right .social-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: #444;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  text-decoration: none !important;
  transition: transform 0.3s ease, background 0.3s ease;
}

.footer-left .social-logos a:hover,
.footer-right .social-logos a:hover {
  transform: scale(1.1);
  background: #808000;
}

.footer-right .social-logos a img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.footer-center {
  text-align: center;
  flex: 1;
}

.footer-center p {
  margin: 3px 0;
  font-size: 14px;
}

.footer-bottom {
  margin-top: 20px;
  border-top: 1px solid #444;
  padding-top: 10px;
  font-size: 13px;
  color: #aaa;
  text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  header {
    padding: 15px 40px;
  }

  .certifications {
    padding: 60px 30px;
  }

  .certificates-grid {
    gap: 20px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    justify-content: center;
  }

  .certificate {
    height: 220px; /* slightly smaller on tablets */
  }
}

@media (max-width: 850px) {
  .certificates-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .certificate {
    height: auto; /* adjust naturally on narrow screens */
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 15px;
  }

  .certifications {
    padding: 40px 20px;
  }

  .certifications h2 {
    font-size: 22px;
  }

  .certifications p {
    font-size: 14px;
  }

  .certificate {
    height: auto;
  }

  .footer-left .social-logos a,
  .footer-right .social-logos a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .footer-center p {
    font-size: 13px;
  }

  .footer-bottom {
    font-size: 12px;
  }

  nav {
    width: 100%;
    right: -100vw;
  }

  nav.active {
    right: 0;
  }
}

/* ===== ACCESSIBILITY ===== */
nav ul li a:focus,
.footer-left .social-logos a:focus,
.footer-right .social-logos a:focus {
  outline: 2px solid #808000;
  outline-offset: 2px;
}
