/* ===========================================================
   IBDP Subject Template Styles
   Used for all subject pages (Biology, Physics, Chemistry, etc.)
   Author: You 💙
   =========================================================== */

/* ---------- Base Styles ---------- */
body {
  background-color: #ffeede;
  font-family: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
}

/* ---------- Hero Banner ---------- */
.ibdp-hero {
  background: linear-gradient(90deg, #1d62f0, #4facfe);
  color: #ffffff;
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.ibdp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}

.ibdp-hero-title {
  font-size: 2.8rem;
  margin: 0 0 0.4rem;
  letter-spacing: 1px;
  font-weight: 700;
}

.ibdp-hero-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

/* ---------- Page Wrapper ---------- */
.ibdp-page-wrapper {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.2rem;
}

/* ---------- Summary ---------- */
.ibdp-summary {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
  margin: 1.4rem 0 1.8rem;
  background-color: #fffdfb;
  padding: 1.2rem 1rem;
  border-left: 5px solid #1d62f0;
  border-radius: 0.6rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ---------- Search Bar ---------- */
.ibdp-search-container {
  text-align: center;
  margin: 1rem 0 0.8rem;
}

.ibdp-search-input {
  padding: 0.75rem 1.2rem;
  width: min(90%, 540px);
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  outline: none;
  transition: 0.2s;
}

.ibdp-search-input:focus {
  border-color: #ff7a59;
  box-shadow: 0 0 8px rgba(255, 122, 89, 0.5);
}

/* ---------- Alphabet Filter ---------- */
.ibdp-alphabet-filter {
  text-align: center;
  margin: 0.5rem 0 1.8rem;
  font-size: 0;
}

.ibdp-alphabet-filter button {
  display: inline-block;
  margin: 0.15rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: none;
  font-size: 0.78rem;
  cursor: pointer;
  background: #ffffff;
  color: #444;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background 0.25s, transform 0.15s, color 0.25s;
}

.ibdp-alphabet-filter button:hover {
  background: #e8f1ff;
  transform: translateY(-1px);
}

.ibdp-alphabet-filter button.ibdp-active {
  background: #ff7a59;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 122, 89, 0.4);
}

/* ---------- Section Title ---------- */
.ibdp-section-title {
  font-size: 1.4rem;
  color: #ff7a59;
  margin: 2rem 0 1rem;
  font-weight: 600;
  position: relative;
}

.ibdp-section-title::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #ff7a59, #1d62f0);
  border-radius: 3px;
}

/* ---------- Cards Grid ---------- */
.ibdp-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

/* ---------- Cards ---------- */
.ibdp-card {
  background: #ffffff;
  border-radius: 1.2rem;
  padding: 1.3rem 1rem 1.2rem;
  width: 230px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ibdp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(79, 172, 254, 0.35), transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.ibdp-card-inner {
  position: relative;
  z-index: 1;
}

.ibdp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.ibdp-card-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.ibdp-card h2 {
  font-size: 1rem;
  margin: 0.25rem 0 0.4rem;
  color: #333;
  font-weight: 600;
}

.ibdp-card-subtitle {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 0.8rem;
}

.ibdp-card-link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #4f9bff;
  color: #fff;
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.25s ease;
}

.ibdp-card-link:hover {
  background: #2f7de0;
}

/* ---------- Back to Top Button ---------- */
#backToTopBtn {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #1d62f0;
  color: white;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 16px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.25s ease, transform 0.15s ease;
}

#backToTopBtn:hover {
  background-color: #ff7a59;
  transform: translateY(-2px);
}

/* ---------- Responsive Layouts ---------- */
@media (max-width: 900px) {
  .ibdp-cards-grid {
    justify-content: center;
  }
  .ibdp-card {
    width: 46%;
  }
}

@media (max-width: 600px) {
  .ibdp-hero-title {
    font-size: 2.1rem;
  }
  .ibdp-hero-subtitle {
    font-size: 0.9rem;
  }
  .ibdp-card {
    width: 100%;
  }
  #backToTopBtn {
    bottom: 18px;
    right: 18px;
  }
}
/* ===== ICON STYLING (applies to all curriculum icons) ===== */

.ibdp-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-bottom: 6px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Subtle hover lift */
.ibdp-icon:hover {
  transform: scale(1.1);
}

/* Curriculum-based color glow */
.ibdp-icon[src*="/ibdp/"] {
  filter: drop-shadow(0 0 2px rgba(29,98,240,0.6)); /* Blue glow for IBDP */
}

.ibdp-icon[src*="/igcse/"] {
  filter: drop-shadow(0 0 2px rgba(255,122,89,0.6)); /* Orange glow for IGCSE */
}

