@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    height: 100%;
    background: #eeeeee;
}

.viewport {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 275px;
  background: #fff;
  padding: 30px 20px;
  font-family: Verdana, sans-serif;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  background: #ffffff;
  border-radius: 5px;
  border: dotted 1px #33333338;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-toggle {
  background: none;
  border: none;
  padding: 12px 17px;
  text-align: left;
  width: 100%;
  color: #111;
  font-weight: normal;
  font-size: 1.25rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-toggle .accordion-label {
  display: flex;
  align-items: center;
  gap: 12px; /* space between icon and text */
}

.sub__icon {
  height: 25px;
  width: auto;
  object-fit: contain;
}

.accordion-toggle::after {
  content: "+";
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.accordion-toggle.active::after {
  transform: rotate(135deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 20px;
}

.accordion-content.show {
  max-height: 500px; /* large enough to fit contents */
  opacity: 1;
  padding: 0 20px 15px;
}

.accordion-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.accordion-content li {
  padding: 10px 0;
  font-size: 1.15rem;
  color: #333;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  color: #009b7d;
  padding-left: 7px;
}

.accordion-content li:hover {
  color: #ffbf5e;
  font-weight: 500;
  border-left: 3px solid #ffbf5e;
  padding-left: 7px;
  scale: 1.15;
  background-color: #009b7c1b;
}

.footer__logo {
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer__logo img {
    height: 35px;
    padding-bottom: 25px;
}

/* Main Container */
.container {
    flex: 1;
    height: 100vh; /* force it to match sidebar height */
    overflow-y: auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  ),
  url('../img/image__background.png') no-repeat center center / cover; */
}

.container::before {
  transition: background 0.4s ease-in-out;
}


.container.bg-caie::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.4),  /* Dark overlay */
      rgba(0, 0, 0, 0.4)
    ),
    url('../img/cambridge__image.jpg') no-repeat center center / cover;
  z-index: 0;
}

.container.bg-caie {
  position: relative;
  z-index: 1;
  /* Optional light gradient on top */
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  );
}

.container.bg-edexcel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.4),  /* Dark overlay */
      rgba(0, 0, 0, 0.4)
    ),
    url('../img/pearson__image.jpg') no-repeat center center / cover;
  z-index: 0;
}

.container.bg-edexcel {
  position: relative;
  z-index: 1;
  /* Optional light gradient on top */
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  );
}

.container.bg-aqa::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.4),  /* Dark overlay */
      rgba(0, 0, 0, 0.4)
    ),
    url('../img/aqa__image.jpg') no-repeat center center / cover;
  z-index: 0;
}

.container.bg-aqa {
  position: relative;
  z-index: 1;
  /* Optional light gradient on top */
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  );
}

.container.bg-pearson::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.4),  /* Dark overlay */
      rgba(0, 0, 0, 0.4)
    ),
    url('../img/pearson__image.jpg') no-repeat center center / cover;
  z-index: 0;
}

.container.bg-pearson {
  position: relative;
  z-index: 1;
  /* Optional light gradient on top */
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  );
}

.row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
}

/* 3D Subject Card */
.box {
    position: relative;
    width: 200px;          /* reduced from 300px */
    height: 266px;         /* reduced from 400px */
    background-color: hsl(40, 5%, 94%);
    border-radius: 20px;
    margin: 5px;
    transform-style: preserve-3d;
    border: .4px solid hsl(230, 15%, 75%);
}

.box::before {
  content: attr(data-board);    /* was 'EDGEIT' */
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 2em;            /* a bit subtler */
  font-weight: 800;
  color: #000;
  font-style: italic;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: 0.5s;
  pointer-events: none;
}

.box::after {
  content: attr(data-standard); /* was 'NEXUS' */
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 2.5em;
  font-weight: 800;
  color: #000;
  font-style: italic;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: 0.5s;
  pointer-events: none;
}

.box:hover::before,
.box:hover::after {
  opacity: 0.25; /* same faint watermark effect */
}


.name {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    transform: translate3d(0, 0, 75px);
    transition: 0.5s;
    opacity: 0;
    z-index: 10;
    pointer-events: none; /* so hover doesn't get blocked */
}

.box:hover .name {
    top: 30px;
    opacity: 1;
}

.name .blend-text {
    color: black;
    mix-blend-mode: difference;
    font-size: 1.1rem;
    font-weight: 600;
}


.redirect {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate3d(-50%, 0, 75px);
    color: #fff;
    background: #333;
    padding: 8px 20px;     /* reduced padding */
    font-size: 0.9rem;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.5s;
    opacity: 0;
    z-index: 10;
}

.box:hover .redirect {
    bottom: 24px;
    opacity: 1;
}

.box:hover {
  width: 225px;
  height: 300px;
  transition: .4s;
}

.product {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 150px;     /* reduced from 200px */
    transform: translate3d(-50%, -50%, 0px);
    transition: 0.5s;
    z-index: 11;
}

.box:hover .product {
    transform: translate3d(-50%, -50%, 100px);
}

/* Color Variants */
.box:nth-child(1) .circle,
.box:nth-child(1) .redirect {
    background: #379bf7;
}

.box:nth-child(2) .circle,
.box:nth-child(2) .redirect {
    background: #9bdc28;
}

.box:nth-child(3) .circle,
.box:nth-child(3) .redirect {
    background: #fb4b4f;
}

.box:nth-child(4) .circle,
.box:nth-child(4) .redirect {
    background: #ff6500;
}

.box:nth-child(5) .circle,
.box:nth-child(5) .redirect {
    background: #008170;
}

/* Responsive */
@media (max-width: 768px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
  }

  .viewport {
    display: block;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    display: block;
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 14px 12px;
  }

  .accordion {
    display: block;
  }

  .accordion-item {
    margin-bottom: 10px;
  }

  .accordion-toggle {
    font-size: 1rem;
    padding: 12px 14px;
  }

  .accordion-content {
    max-height: 0;
    overflow: hidden;
  }

  .accordion-content.show {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .accordion-content li {
    font-size: 1rem;
    padding: 10px 0 10px 8px;
  }

  .accordion-content li:hover {
    scale: 1;
  }

  .go__back {
    margin-top: 1rem;
  }

  .sidebar__footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
  }

  .container {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 18px 12px 24px;
    display: block;
  }

  #subject-content {
    display: block;
    min-height: auto;
    padding: 0;
  }

  #subject-content .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 100%;
  }

  .box {
    width: 100%;
    max-width: none;
    height: 230px;
    margin: 0;
  }

  .box:hover {
    width: 100%;
    height: 230px;
  }

  .box::before,
  .box::after {
    display: none;
  }

  .name {
    opacity: 1;
    top: 18px;
    transform: translate3d(0, 0, 30px);
  }

  .box:hover .name {
    top: 18px;
    opacity: 1;
  }

  .product {
    max-width: 110px;
    transform: translate3d(-50%, -50%, 20px);
  }

  .box:hover .product {
    transform: translate3d(-50%, -50%, 20px);
  }

  .redirect {
    opacity: 1;
    bottom: 16px;
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .box:hover .redirect {
    bottom: 16px;
  }

.msg__slideout {
  position: fixed;
  top: 20px;
  right: -400px;
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.msg__slideout.show {
  right: 20px;
  animation: sweep-in 0.6s ease-out, slight-shake 1.5s ease-in-out 0.6s infinite;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.msg__slideout.hide {
  animation: sweep-out 0.4s ease-in;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

  .card {
    width: 100%;
    height: auto;
    min-height: 110px;
  }
}

@media (max-width: 480px) {
  #subject-content .row {
    grid-template-columns: 1fr;
  }

  .box {
    height: 220px;
  }

  .box:hover {
    height: 220px;
  }

  .product {
    max-width: 100px;
  }

  .accordion-toggle {
    font-size: 0.95rem;
  }

  .accordion-content li {
    font-size: 0.95rem;
  }
}

.row.fade-in {
  animation: fadeIn 0.6s ease-in-out both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

li.selected {
  background-color: #e0f7f4;
  font-weight: bold;
  color: #009b7d !important;
  border-left: 2px solid #009b7d;
  padding-left: 10px;
}

.container.default::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.3)
    ),
    url('../../../assets/img/image__background.png') no-repeat center center / cover;
  z-index: 0;
}

.container.default {
  position: relative;
  z-index: 1;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 1) 99%
  );
}

.sidebar__footer{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sidebar__footer img{
  width: 75px;
}

.sidebar__footer p{
  font-size: 12px;
  color: #444;
}

.go__back{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem
}

.go__back a{
  text-decoration: none;
  color: #444;
  font-size: 14px;
  transition: .4s;
}

.go__back a:hover{
  color: #de1b1b;
  transition: .4s;
}

.bx-chevrons-left {
  transform: translateY(3px);
}