/* ==========================================================
   GLOBAL RESET
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* ==========================================================
   CSS VARIABLES
   ========================================================== */
:root {
  --primary-dark: #0f172a;
  --accent-blue: #2563eb;
  --bg-light: #f1f5f9;
  --text-main: #1e293b;
  --border: #e2e8f0;
  --danger: #ef4444;
}

/* ==========================================================
   FADE-IN ANIMATION
   ========================================================== */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   HERO SECTION (.hero1)
   ========================================================== */
.hero1 {
  min-height: 400px;
  background:
    linear-gradient(295deg, rgb(255, 255, 255) 60%, rgba(255, 255, 255, 0.2) 80%),
    url('../aboutus/mission/IMG-20250331-WA0166.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 60px 8%;
  gap: 40px;
  animation: fadeInDown 1.5s ease forwards;
}

.hero1-con {
  flex: 1.2;
}

.hero1 h1 {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  color: #1a1a1a;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero1 p {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.1rem;
  text-align: justify;
  line-height: 1.7;
  color: #444;
}

.hero1-img {
  flex: 0.8;
  display: flex;
  justify-content: center;
}

.hero1-img img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

/* ==========================================================
   PROGRESS BADGE SECTION (.Progress)
   ========================================================== */
.Progress {
  padding-top: 50px;
  text-align: center;
}

.Progress h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #333;
}

.Progress p {
  padding: 2rem;
  line-height: 1.7;
  color: #0a1f3d;
  margin: 0;
}

/* ==========================================================
   CARDS SECTION & GRID LAYOUT
   ========================================================== */
.vanish-in.visible {
  opacity: 1;
  transform: none;
}

.cards-section {
  padding: 30px;
  padding-top: 0;
  padding-bottom: 0;
  background: rgb(255, 255, 255);
  max-width: 100%;
  margin: 0;
}

/* --- Cards Container: Column Grid (like reference image) --- */
#progress-cards-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 20px 2%;
  justify-items: center;
}

/* --- Individual Card Styles --- */
#progress-cards-container .card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 260px;
}

#progress-cards-container .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

#progress-cards-container .card:hover::before {
  left: 100%;
}

#progress-cards-container .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Card Icon */
#progress-cards-container .card-icon {
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#progress-cards-container .card-icon img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

/* Card Title */
#progress-cards-container .card h3 {
  color: #1a237e;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Card Description */
#progress-cards-container .card p {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ==========================================================
   MODAL STYLES (Titles & Content)
   ========================================================== */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.close:hover {
  color: #000;
}

.titles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.title-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.title-item:hover {
  background: #e3f2fd;
  border-color: #1a237e;
  transform: translateY(-2px);
}

.content-container {
  padding: 1rem 0;
}

.content-container h3 {
  color: #1a237e;
  margin-bottom: 1rem;
}

.content-container img,
.content-container video {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

.images-section img {
  max-width: 520px;
  width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.images-section img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.description-block {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================================
   PROFICIENCY BADGE SECTION (.Proficiency)
   ========================================================== */
.Proficiency {
  padding: 3rem;
  padding-bottom: 1rem;
  background: white;
  text-align: center;
}

.Proficiency h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #333;
}

.Proficiency p {
  line-height: 1.7;
  color: #0a1f3d;
  margin: 0;
}

/* ==========================================================
   PROFICIENCY BADGE SEARCH (.pro-badge)
   ========================================================== */
.pro-badge {
  font-family: 'Inter', 'Iskoola Pota', sans-serif;
  background-color: white;
  display: flex;
  justify-content: center;
  padding: 20px;
  margin: 0;
  color: var(--text-main);
}

#mainWrapper {
  width: 100%;
  max-width: 1000px;
  transition: filter 0.3s;
}

.search-container {
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  background: white;
  padding: 5px;
  border-radius: 50px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

input[type="text"] {
  flex: 1;
  border: none;
  padding: 10px 20px;
  outline: none;
  font-size: 1rem;
  border-radius: 50px;
  min-width: 0;
}

button.search-btn {
  background: var(--primary-dark);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
}

#errorMessage {
  display: none;
  text-align: center;
  color: var(--danger);
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  margin: 10px auto;
  max-width: 400px;
  font-weight: 600;
  border: 1px solid #ffffff;
}

/* Badge Result Panel */
#badgePanel {
  display: none;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.panel-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 40px;
  gap: 25px 40px;
}

.logo-section img {
  width: 90%;
  border-radius: 12px;
  cursor: zoom-in;
}

.badge-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0;
}

.syllabus-area {
  grid-column: 1 / 3;
  padding: 30px;
  background: #ffffff;
  border-top: 3px solid rgb(217, 217, 217);
  white-space: pre-wrap;
  line-height: 1.8;
  border-bottom: 2px solid rgb(217, 217, 217);
}

.footer-details {
  font-family: 'Poppins', sans-serif;
  text-align: center;
}

/* Lightbox */
#imageLightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  z-index: 11000;
  justify-content: center;
  align-items: center;
}

#imageLightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.blur-content {
  filter: blur(8px);
}

/* ==========================================================
   DOWNLOADS SECTION
   ========================================================== */
.downloads-section {
  padding: 60px 8%;
  background: #fff;
  max-width: 100%;
}

.downloads-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  color: #333;
}

.category-group {
  margin-bottom: 50px;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a237e;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title i {
  color: #2563eb;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.download-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.download-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
  border-color: #2563eb;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #2563eb;
}

.download-info h3 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 10px;
  font-weight: 600;
}

.download-info p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #1e40af;
}

/* ==========================================================
   RESPONSIVE: TABLET (max-width: 900px)
   ========================================================== */
@media (max-width: 900px) {
  #progress-cards-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #progress-cards-container .card {
    max-width: none;
    padding: 1.5rem 1rem;
  }
}

/* ==========================================================
   RESPONSIVE: SMALL TABLET / LARGE PHONE (max-width: 768px)
   ========================================================== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 1.5rem;
  }

  .titles-grid {
    grid-template-columns: 1fr;
  }

  .downloads-section {
    padding: 40px 20px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   RESPONSIVE: MOBILE (max-width: 480px)
   ========================================================== */
@media (max-width: 480px) {

  /* Hero */
  .hero1 {
    min-height: 300px;
    flex-direction: column-reverse;
    text-align: center;
    padding: 40px 20px;
    background:
      linear-gradient(rgb(255, 255, 255), rgba(255, 255, 255, 0.699)),
      url('../aboutus/mission/IMG-20250331-WA0166.jpg');
  }

  .hero1-con {
    width: 100%;
  }

  .hero1 h1 {
    text-align: center;
    margin-bottom: 15px;
  }

  .hero1 p {
    text-align: center;
    font-size: 16px;
  }

  .hero1-img {
    z-index: 10;
    position: absolute;
    top: 12rem;
    width: 70%;
    margin-bottom: 20px;
  }

  /* Progress Section */
  .Progress {
    padding-top: 10px;
    background: white;
    text-align: center;
  }

  .Progress h2 {
    padding-top: 10rem;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
  }

  .Progress p {
    font-size: 13px;
    padding: 2rem;
    line-height: 1.7;
    color: #666;
  }

  /* Cards Grid: 2 columns on mobile */
  .cards-section {
    padding: 1.5rem 1rem;
  }

  #progress-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px;
  }

  #progress-cards-container .card {
    padding: 1rem;
    border-radius: 16px;
    max-width: none;
  }

  #progress-cards-container .card-icon img {
    width: 70px;
    height: 70px;
  }

  #progress-cards-container .card h3 {
    font-size: 1rem;
  }

  #progress-cards-container .card p {
    font-size: 0.85rem;
  }

  /* Modal */
  .modal-content {
    margin: 14% auto;
    padding: 1rem;
    max-height: 78vh;
  }

  .titles-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .title-item {
    padding: 0.8rem;
  }

  .images-section img {
    max-width: 100%;
    border-radius: 8px;
  }

  .description-block {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  /* Proficiency Section */
  .Proficiency {
    padding-top: 10px;
    background: white;
    text-align: center;
  }

  .Proficiency h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
  }

  .Proficiency p {
    font-size: 13px;
    text-align: center;
    line-height: 1.7;
    color: #666;
  }

  /* Badge Panel */
  .panel-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .syllabus-area {
    grid-column: 1 / 2;
    padding: 10px;
    line-height: 1.5;
  }
}

/* Loading Spinner for E-Lib */
#elib-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10002;
}

.spinner-box {
  text-align: center;
}

.spinner-ring {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(216, 138, 42, 0.2);
  border-radius: 50%;
  border-top-color: #d88a2a;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 10px;
}

.loading-text {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #555;
  font-weight: 500;
  letter-spacing: 1px;
  animation: pulse 1.5s infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}