/* Modern Classroom Page Styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("../../images/bg/classroomclass.webp");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #ffffff;
  overflow-y: auto;
}

/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: -1;
}

main {
  padding: 80px 20px;
}

/* Main Container */
#classroom-container {
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 1s ease;
}

/* Header Section */
.classroom-header {
  text-align: center;
  margin-bottom: 60px;
}

.classroom-header h1 {
  font-size: 3.8rem;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #ff85c5, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
  letter-spacing: 1.5px;
  font-weight: 800;
}

.classroom-tagline {
  font-size: 1.35rem;
  max-width: 850px;
  margin: 0 auto;
  color: #f0f0f0;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Classroom Boxes */
.classroom-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 35px;
  margin-bottom: 70px;
}

.classroom-box {
  border-radius: 25px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: white;
  display: block;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.classroom-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.classroom-box:hover::after {
  opacity: 1;
}

.classroom-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(106, 13, 173, 0.9),
    rgba(142, 45, 226, 0.9)
  );
  z-index: 1;
  opacity: 0.9;
  transition: opacity 0.5s ease;
}

.classroom-box.courses::before {
  background: linear-gradient(
    135deg,
    rgba(106, 13, 173, 0.9),
    rgba(142, 45, 226, 0.9)
  );
}

.classroom-box.library::before {
  background: linear-gradient(
    135deg,
    rgba(0, 150, 136, 0.9),
    rgba(20, 80, 70, 0.9)
  );
}

.classroom-box.playground::before {
  background: linear-gradient(
    135deg,
    rgba(233, 30, 99, 0.9),
    rgba(150, 20, 70, 0.9)
  );
}

.classroom-box:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.classroom-box:hover::before {
  opacity: 1;
}

.box-content {
  position: relative;
  padding: 45px 35px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.icon-container {
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 25px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.classroom-box:hover .icon-container {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

.classroom-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.classroom-box:hover .classroom-icon {
  transform: scale(1.05);
}

.classroom-box h2 {
  font-size: 2.2rem;
  margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.classroom-box p {
  font-size: 1.12rem;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #f5f5f5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}

.feature-list li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: white;
  font-weight: bold;
}

.box-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.classroom-box:hover .box-button {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.box-button svg {
  transition: transform 0.3s ease;
}

.classroom-box:hover .box-button svg {
  transform: translateX(5px);
}

/* Classroom Footer */
.classroom-footer {
  background: rgba(30, 30, 45, 0.85);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.footer-text {
  flex: 1;
  min-width: 300px;
}

.footer-text h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 105, 180, 0.4);
}

.footer-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e0e0e0;
  max-width: 600px;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.primary-action {
  padding: 14px 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6a0dad, #4b0082);
  color: white;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.primary-action:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.secondary-action {
  padding: 12px 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .classroom-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .classroom-tagline {
    font-size: 1rem;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .classroom-boxes {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .classroom-box {
    height: auto;
    padding: 20px;
  }

  .box-content {
    padding: 0;
  }

  .icon-container {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  .classroom-icon {
    width: 35px;
    height: 35px;
  }

  .classroom-box h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .classroom-box p {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .feature-list {
    margin-bottom: 0;
  }

  .feature-list li {
    font-size: 0.9rem;
    padding-left: 15px;
    margin-bottom: 5px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
  }

  /* Improve touchable area for mobile */
  .feature-list li,
  .primary-action,
  .secondary-action {
    min-height: 44px; /* Apple's recommended minimum touch target size */
    display: flex;
    align-items: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .classroom-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .classroom-box:last-child {
    grid-column: span 2;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (min-width: 2560px) {
  #classroom-container {
    max-width: 1800px;
  }

  .classroom-header h1 {
    font-size: 4.5rem;
  }

  .classroom-tagline {
    font-size: 1.6rem;
    max-width: 1000px;
  }

  .classroom-boxes {
    grid-template-columns: repeat(3, 1fr);
  }

  .classroom-box h2 {
    font-size: 2.5rem;
  }

  .classroom-box p {
    font-size: 1.3rem;
  }

  .footer-text h2 {
    font-size: 2.8rem;
  }

  .footer-text p {
    font-size: 1.4rem;
  }
}
