/* 
* Optimized Courses Page Styles
* Professional & Futuristic Green Theme for Learning Hub
*/

:root {
    /* Optimized color palette */
    --dark-green: #0a3622;
    --medium-green: #115740;
    --light-green: #1e8a60;
    --accent-green: #20c997;
    --tech-green: #00ff9d;
    --bg-light: #f7fcfa;
    --bg-dark: #0a2518;
    --text-dark: #102622;
    --text-light: #ffffff;
    --content-bg-light: #f0f8f4;
    --accent-glow: 0 0 20px rgba(32, 201, 151, 0.4);
  }
  
  /* Base styles for faster loading */
  body {
    background-color: var(--bg-light);
    color: var(--text-dark);
  }
  
  /* Optimized animations */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .fadeIn { animation: fadeIn 0.5s ease forwards; }
  
  /*--------------------------------------------------------------
  # Courses Header - Optimized
  --------------------------------------------------------------*/
  .courses-header {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(rgba(10, 54, 34, 0.92), rgba(10, 54, 34, 0.86)), url('../Banner/courses-header.jpg') center/cover;
    text-align: center;
    color: var(--text-light);
    box-shadow: inset 0 -20px 30px rgba(0, 0, 0, 0.15);
  }
  
  .courses-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg-light), transparent);
    z-index: 1;
  }
  
  .courses-header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
  }
  
  .courses-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease forwards;
  }
  
  .courses-header p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeIn 0.8s ease forwards 0.2s;
    opacity: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
  }
  
  .courses-header-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeIn 0.8s ease forwards 0.5s;
    opacity: 0;
  }
  
  .header-btn {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
  }
  
  .header-btn.primary {
    background-color: var(--accent-green);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(30, 138, 96, 0.4);
    position: relative;
    overflow: hidden;
  }
  
  .header-btn.primary:hover {
    background-color: var(--light-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(30, 138, 96, 0.5);
  }
  
  .header-btn.secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .header-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-green);
  }
  
  /*--------------------------------------------------------------
  # Course Categories - Optimized
  --------------------------------------------------------------*/
  .course-categories {
    padding: 80px 0 90px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--content-bg-light) 100%);
    position: relative;
  }
  
  .course-categories h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark-green);
    position: relative;
    font-weight: 700;
  }
  
  .course-categories h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-green);
    border-radius: 3px;
  }
  
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* Category Cards - Enhanced */
  .category-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    border: none;
    z-index: 1;
  }
  
  .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--accent-green), var(--light-green));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    border-radius: 20px;
  }
  
  .category-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(10, 54, 34, 0.15);
    color: white;
  }
  
  .category-card:hover::before {
    opacity: 1;
  }
  
  .category-icon {
    width: 80px;
    height: 80px;
    background-color: #f4fbf8;
    color: var(--light-green);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(30, 138, 96, 0.1);
    position: relative;
  }
  
  .category-icon i {
    font-size: 36px;
    transition: all 0.4s ease;
  }
  
  .category-card:hover .category-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
  }
  
  .category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    transition: all 0.4s ease;
    color: var(--medium-green);
  }
  
  .category-card:hover h3 {
    color: white;
  }
  
  /*--------------------------------------------------------------
  # Courses Section - Optimized
  --------------------------------------------------------------*/
  .courses {
    padding: 90px 0 100px;
    background: linear-gradient(135deg, #e8f5ee 0%, #f7fcfa 50%, #ffffff 100%);
    position: relative;
  }
  
  .courses h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: var(--dark-green);
    position: relative;
    font-weight: 700;
  }
  
  .courses h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-green);
    border-radius: 3px;
  }
  
  .course-section {
    position: relative;
    margin-bottom: 50px;
    background: linear-gradient(120deg, #ffffff 0%, #f4fbf8 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    border-left: 5px solid var(--accent-green);
  }
  
  .course-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .course-section.hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 54, 34, 0.12);
  }
  
  .course-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, transparent 50%, rgba(32, 201, 151, 0.08) 50%);
    border-radius: 0 0 0 100%;
    z-index: 0;
  }
  
  .course-section.hover::before {
    transform: scaleX(1);
  }
  
  .course-icon-bg {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 120px;
    color: rgba(17, 87, 64, 0.035);
    z-index: 0;
    transition: all 0.4s ease;
  }
  
  .course-section.hover .course-icon-bg {
    transform: rotate(15deg) scale(1.1);
    color: rgba(17, 87, 64, 0.05);
  }
  
  .course-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.9), rgba(244, 252, 248, 0.9));
    border-radius: 15px;
    backdrop-filter: blur(5px);
  }
  
  .course-section h2 {
    display: flex;
    align-items: center;
    font-size: 26px;
    color: var(--dark-green);
    margin-bottom: 20px;
    position: relative;
    font-weight: 700;
  }
  
  .course-section h2 i {
    margin-right: 15px;
    color: white;
    font-size: 26px;
    background-color: var(--light-green);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(30, 138, 96, 0.2);
    transition: all 0.4s ease;
  }
  
  .course-section.hover h2 i {
    transform: scale(1.1) rotate(10deg);
    background-color: var(--accent-green);
    box-shadow: 0 8px 20px rgba(32, 201, 151, 0.3);
  }
  
  .course-section p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
  }
  
  .course-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
  }
  
  .course-section ul li {
    padding: 10px 0 10px 35px;
    position: relative;
    font-size: 16px;
    color: #555;
    transition: all 0.3s ease;
  }
  
  .course-section ul li::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    position: absolute;
    left: 0;
    top: 9px;
    background-color: var(--light-green);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
  }
  
  .course-section.hover ul li:hover {
    transform: translateX(5px);
    color: var(--medium-green);
  }
  
  .course-section.hover ul li:hover::before {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(32, 201, 151, 0.4);
  }
  
  .course-cta {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--medium-green), var(--accent-green));
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(30, 138, 96, 0.25);
    border: none;
    position: relative;
    overflow: hidden;
  }
  
  .course-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
  }
  
  .course-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(30, 138, 96, 0.4);
  }
  
  .course-cta:hover::after {
    left: 100%;
  }
  
  /*--------------------------------------------------------------
  # CTA Section - Optimized
  --------------------------------------------------------------*/
  .courses-cta {
    padding: 100px 0;
    background: linear-gradient(rgba(10, 37, 24, 0.92), rgba(10, 37, 24, 0.92)), url('../Banner/cta-bg.jpg') center/cover;
    background-attachment: fixed;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .courses-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(17, 87, 64, 0.7) 0%, rgba(10, 37, 24, 0.7) 100%);
  }
  
  /* Simplified grid background */
  .courses-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
      linear-gradient(90deg, rgba(32, 201, 151, 0.03) 1px, transparent 1px),
      linear-gradient(0deg, rgba(32, 201, 151, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
  }
  
  .cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .courses-cta h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .courses-cta p {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
  }
  
  .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  .cta-btn {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
  }
  
  .cta-btn.primary {
    background-color: var(--accent-green);
    color: white;
    box-shadow: 0 5px 15px rgba(32, 201, 151, 0.4);
  }
  
  .cta-btn.primary:hover {
    background-color: var(--light-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(32, 201, 151, 0.5);
  }
  
  .cta-btn.secondary {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
  
  .cta-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    border-color: var(--accent-green);
  }
  
  /* Optimized Animation delay for course sections */
  .course-section:nth-child(1) { transition-delay: 0.1s; }
  .course-section:nth-child(2) { transition-delay: 0.15s; }
  .course-section:nth-child(3) { transition-delay: 0.2s; }
  .course-section:nth-child(4) { transition-delay: 0.25s; }
  .course-section:nth-child(5) { transition-delay: 0.3s; }
  .course-section:nth-child(6) { transition-delay: 0.35s; }
  .course-section:nth-child(7) { transition-delay: 0.4s; }
  .course-section:nth-child(8) { transition-delay: 0.45s; }
  .course-section:nth-child(9) { transition-delay: 0.5s; }
  .course-section:nth-child(10) { transition-delay: 0.55s; }
  .course-section:nth-child(11) { transition-delay: 0.6s; }
  .course-section:nth-child(12) { transition-delay: 0.65s; }
  .course-section:nth-child(13) { transition-delay: 0.7s; }
  
  /* Responsive Styling */
  @media (max-width: 992px) {
    .courses-header {
      padding: 80px 0;
    }
    
    .courses-header h1 {
      font-size: 36px;
    }
    
    .courses-header p {
      font-size: 18px;
    }
    
    .course-section h2 {
      font-size: 24px;
    }
    
    .course-icon-bg {
      font-size: 100px;
    }
  }
  
  @media (max-width: 768px) {
    .courses-header {
      padding: 60px 0;
    }
    
    .courses-header h1 {
      font-size: 30px;
    }
    
    .courses-header p {
      font-size: 16px;
    }
    
    .courses-header-buttons,
    .cta-buttons {
      flex-direction: column;
      max-width: 280px;
      margin: 0 auto;
    }
    
    .header-btn,
    .cta-btn {
      width: 100%;
      text-align: center;
    }
    
    .course-categories h2,
    .courses h1 {
      font-size: 28px;
      margin-bottom: 40px;
    }
    
    .category-card {
      padding: 25px 15px;
    }
    
    .category-icon {
      width: 60px;
      height: 60px;
      margin-bottom: 15px;
    }
    
    .category-icon i {
      font-size: 28px;
    }
    
    .course-content {
      padding: 30px 20px;
    }
    
    .course-section h2 i {
      font-size: 22px;
      width: 40px;
      height: 40px;
    }
    
    .courses-cta h2 {
      font-size: 28px;
    }
    
    .courses-cta p {
      font-size: 16px;
    }
  }
  
  @media (max-width: 576px) {
    .courses-header h1 {
      font-size: 26px;
    }
    
    .category-icon {
      width: 50px;
      height: 50px;
    }
    
    .category-icon i {
      font-size: 24px;
    }
    
    .category-card h3 {
      font-size: 18px;
    }
    
    .course-section h2 {
      font-size: 22px;
    }
  }