/* Programs Page Styles - Optimized */
:root {
  --red: #e64a2e;
  --yellow: #f7b731;
  --teal: #44c0b6;
  --navy: #2e5c89;
  --light: #f9f9f9;
  --dark: #333333;
}

/* Enhanced Programs Hero Section */
.programs-hero {
  padding: 120px 0 100px;
  background: linear-gradient(
    115deg,
    var(--light) 45%,
    var(--teal) 45.1%,
    var(--navy) 100%
  );
  position: relative;
  overflow: hidden;
}

.programs-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0.15;
  z-index: 1;
}

.programs-hero::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0.1;
  z-index: 1;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(to bottom, var(--red), var(--yellow));
}

.hero-content h1 {
  font-size: 3.8rem;
  margin-bottom: 25px;
  line-height: 1.2;
  color: var(--navy);
  font-weight: 800;
  position: relative;
}

.hero-content h1 span {
  color: var(--red);
  position: relative;
  z-index: 1;
}

.hero-content h1 span::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 12px;
  background: var(--yellow);
  z-index: -1;
  opacity: 0.7;
  transform: skewX(-15deg);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 45px;
  color: #444;
  line-height: 1.8;
  max-width: 100%;
  font-weight: 500;
  padding-right: 20px;
}

.hero-stats {
  display: flex;
  gap: 50px;
  padding: 25px 0;
  border-top: 2px dashed rgba(68, 192, 182, 0.3);
}

.hero-stat {
  text-align: center;
  position: relative;
}

.hero-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -25px;
  transform: translateY(-50%);
  width: 2px;
  height: 40px;
  background: rgba(68, 192, 182, 0.3);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--red);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}

.stat-number::after {
  content: "+";
  position: absolute;
  top: 0;
  right: -15px;
  font-size: 2rem;
  color: var(--teal);
}

.stat-label {
  font-size: 1rem;
  color: var(--navy);
  margin-top: 5px;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: all 0.5s ease;
  border: 5px solid white;
}

.hero-image:hover img {
  transform: perspective(1000px) rotateY(0) rotateX(0);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

/* Floating elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-element {
  position: absolute;
  color: rgba(255, 255, 255, 0.15);
  font-size: 2rem;
  font-weight: bold;
  animation: float 15s infinite ease-in-out;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 5%;
  animation-delay: 0s;
  font-size: 3rem;
}

.floating-element:nth-child(2) {
  top: 65%;
  left: 10%;
  animation-delay: 2s;
  font-size: 2.5rem;
}

.floating-element:nth-child(3) {
  top: 40%;
  right: 8%;
  animation-delay: 4s;
  font-size: 2.2rem;
}

.floating-element:nth-child(4) {
  top: 75%;
  right: 15%;
  animation-delay: 1s;
  font-size: 3.2rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(20px) rotate(-5deg);
  }
}

/* Programs Navigation */
.programs-nav {
  padding: 60px 0;
  background: white;
}

.programs-nav h2 {
  text-align: center;
  color: var(--navy);
  margin-bottom: 30px;
  font-size: 2.2rem;
}

.grade-filters {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.filter-btn {
  padding: 12px 30px;
  background: var(--light);
  border: 2px solid var(--light);
  border-radius: 30px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

/* Grade Programs */
.grade-programs {
  padding: 80px 0;
}

.grade-programs[data-grade="8-9"] {
  background: var(--light);
}

.grade-programs[data-grade="10-12"] {
  background: white;
}

.grade-header {
  text-align: center;
  margin-bottom: 60px;
}

.grade-header h2 {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.grade-header h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--red);
  border-radius: 2px;
}

.grade-header p {
  font-size: 1.1rem;
  color: #666;
  margin-top: 25px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.program-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.program-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.program-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.program-card:hover .program-image img {
  transform: scale(1.1);
}

.program-grade {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--teal);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.program-content {
  padding: 25px;
}

.program-content h3 {
  color: var(--navy);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.program-content p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.program-features {
  list-style: none;
  margin-bottom: 25px;
}

.program-features li {
  margin-bottom: 10px;
  color: #555;
  display: flex;
  align-items: flex-start;
}

.program-features i {
  color: var(--teal);
  margin-right: 10px;
  margin-top: 4px;
}

.program-actions {
  display: flex;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--red);
  color: white;
}

.btn-primary:hover {
  background-color: #c0392b;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(230, 74, 46, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background-color: var(--navy);
  color: white;
  transform: translateY(-3px);
}

/* Program Benefits */
.program-benefits {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--navy) 0%, #3a5070 100%);
  color: white;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.benefit-card {
  text-align: center;
  padding: 40px 25px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-10px);
}

.benefit-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: var(--yellow);
}

.benefit-card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.benefit-card p {
  opacity: 0.9;
  line-height: 1.6;
}

/* Program CTA */
.program-cta {
  padding: 100px 0;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&h=800&q=80")
      no-repeat center center/cover;
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-secondary {
  background-color: var(--teal);
  color: white;
}

.btn-secondary:hover {
  background-color: #36968d;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(68, 192, 182, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero-container {
    gap: 50px;
  }

  .hero-content h1 {
    font-size: 3.2rem;
  }
}

@media (max-width: 992px) {
  .programs-hero {
    background: linear-gradient(
      115deg,
      var(--light) 50%,
      var(--teal) 50.1%,
      var(--navy) 100%
    );
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-content {
    padding: 30px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-stats {
    gap: 30px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

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

@media (max-width: 768px) {
  .programs-hero {
    padding: 80px 0 60px;
    background: var(--light);
  }

  .programs-hero::before,
  .programs-hero::after {
    display: none;
  }

  .hero-content {
    padding: 25px;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 25px;
  }

  .hero-stat:not(:last-child)::after {
    display: none;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .floating-elements {
    display: none;
  }

  .hero-image img {
    transform: none;
  }

  .grade-filters {
    flex-direction: column;
    align-items: center;
  }

  .program-actions {
    flex-direction: column;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

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

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .grade-header h2 {
    font-size: 2rem;
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .programs-grid {
    grid-template-columns: 1fr;
  }
}