/* CSS Overrides for courses.html */

/* Base override for courses-grid-section to override styles.css */
.courses-grid-section {
  padding: 50px 10px !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

/* Even stronger override to ensure it works */
body .courses-grid-section,
html .courses-grid-section,
.courses-grid-section {
  padding: 50px 10px !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

/* Final override to ensure desktop spacing is correct */
@media (min-width: 769px) {
  body .courses-grid-section,
  html .courses-grid-section,
  .courses-grid-section {
    padding: 35px 10px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
}

/* Desktop-specific spacing optimization */
@media (min-width: 769px) {
  .courses-grid-section {
    padding: 40px 10px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
  
  .courses-intro-wrapper {
    margin: 0 auto 30px auto;
    padding: 25px 30px;
  }
  
  .courses-header {
    margin-bottom: 20px;
  }
  
  .section-description {
    margin-bottom: 30px;
  }
}

/* Mobile and tablet spacing (existing rules) */
@media (max-width: 768px) {
  .courses-grid-section {
    padding: 40px 15px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
}

/* Courses Introduction Wrapper - Base styles */
.courses-intro-wrapper {
  max-width: 1200px;
  margin: 0 auto 40px auto;
  padding: 30px 30px;
  position: relative;
  z-index: 2;
}

/* Courses Header Styling - Base styles */
.courses-header {
  margin-bottom: 25px;
  text-align: center !important;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.courses-header h1 {
  font-size: 3.2rem;
  line-height: 1.2;
  color: #09e1c0;
  font-weight: 700;
  margin: 0 auto;
  text-shadow: 0 0 20px rgba(9, 225, 192, 0.4);
  background: linear-gradient(135deg, #09e1c0 0%, #0fa9d9 50%, #c6aa65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-align: center !important;
  width: 100%;
}

/* Courses Description Styling - Modern Transparent Design */
.courses-description {
  background: transparent;
  padding: 40px 20px;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* Desktop-specific description optimization */
@media (min-width: 769px) {
  .courses-description {
    padding: 25px 20px;
  }
}

/* Override section-description from styles.css */
.section-description {
  margin-bottom: 30px !important;
}

@media (min-width: 769px) {
  .section-description {
    margin-bottom: 25px !important;
  }
}

/* Modern Program Overview Cards */
.program-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Desktop-specific grid optimization */
@media (min-width: 769px) {
  .program-overview-grid {
    margin-bottom: 30px;
    gap: 25px;
  }
}

.program-card {
  background: rgba(13, 13, 13, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #09e1c0, #0fa9d9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.program-card:hover::before {
  opacity: 1;
}

.program-card:hover {
  background: rgba(13, 13, 13, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.program-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #09e1c0, #0fa9d9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.program-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #09e1c0;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.program-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.program-content strong {
  color: #0fa9d9;
  font-weight: 600;
}

/* Animation for courses intro wrapper */
.courses-intro-wrapper {
  opacity: 0;
  transform: translateY(30px);
  animation: coursesSlideInUp 1s ease forwards;
  animation-delay: 0.3s;
}

/* Program Cards Animation */
.program-card {
  opacity: 0;
  transform: translateY(30px);
  animation: coursesSlideInUp 0.6s ease forwards;
}

.program-card:nth-child(1) { animation-delay: 0.5s; }
.program-card:nth-child(2) { animation-delay: 0.7s; }
.program-card:nth-child(3) { animation-delay: 0.9s; }

/* Desktop Optimizations */
@media (min-width: 769px) {
  .courses-intro-wrapper {
    padding: 60px 40px 80px;
  }
  
  .courses-header {
    margin-bottom: 40px;
  }
  
  .courses-header h1 {
    font-size: 3.5rem;
    line-height: 1.2;
  }
  
  .courses-description {
    padding: 60px 40px;
  }
  
  .program-overview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-bottom: 50px;
  }
  
  .program-card {
    padding: 35px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }
  
  .program-icon {
    width: 65px;
    height: 65px;
    font-size: 2rem;
    margin-bottom: 25px;
  }
  
  .program-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .program-content h3 {
    font-size: 1.5rem;
    margin-bottom: 18px;
  }
  
  .program-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    flex-grow: 1;
  }
}

/* Animation for courses description */
.courses-description {
  transform: translateY(20px);
  animation: coursesSlideInUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

/* Hover effect for courses description */
.courses-description:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  border-color: rgba(9, 225, 192, 0.5);
  transition: all 0.3s ease;
}

/* Keyframe animations */
@keyframes coursesSlideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop-only enhanced effects */
@media (min-width: 769px) {
  .courses-header {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .courses-header h1 {
    animation: coursesGlow 2.5s ease-in-out infinite alternate;
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
  
  @keyframes coursesGlow {
    0% {
      text-shadow: 0 0 20px rgba(9, 225, 192, 0.4);
    }
    100% {
      text-shadow: 0 0 30px rgba(9, 225, 192, 0.6), 0 0 40px rgba(15, 169, 217, 0.4);
    }
  }
}

/* Style the overview background which contains the image we want to display */
.overview-background {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -1 !important;
  overflow: hidden !important;
}

.overview-background-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0.4 !important;
}

.overview-background-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(to bottom, 
    rgba(8, 7, 10, 0.8) 0%,
    rgba(8, 7, 9, 0.7) 50%,
    rgba(4, 4, 5, 0.8) 100%) !important;
  z-index: 1 !important;
}

/* We can remove the ::before since we're using the overview-background instead */
.courses-grid-section::before {
  display: none !important;
}

/* Add overlay to ensure text readability */
.courses-grid-section::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-image: none !important;
  background: linear-gradient(135deg, 
    rgba(3, 4, 5, 0.4) 0%, 
    rgba(3, 4, 5, 0.3) 50%, 
    rgba(2, 3, 3, 0.4) 100%) !important;
  z-index: -1 !important;
}

/* Set proper body background */
body {
  background-color: #0d0d0d !important; /* Same as contact-custom.css */
  background-image: none !important; /* Remove any background image from body */
}

/* Comprehensive footer fix */

/* Target the footer with stronger specificity */
body .footer,
html .footer,
.courses-grid-section + .footer {
  position: relative !important;
  z-index: 10 !important; /* Higher z-index to ensure our rules take precedence */
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  border-top: 3px solid rgba(198, 170, 101, 0.8) !important;
  margin-top: 40px !important;
  padding-top: 20px !important;
}

/* Explicitly remove the ::before that might be adding a dark background */
body .footer::before,
html .footer::before,
.courses-grid-section + .footer::before {
  display: none !important;
  content: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Explicitly remove the ::after that might be adding effects */
body .footer::after,
html .footer::after,
.courses-grid-section + .footer::after {
  display: none !important;
  content: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Create custom background that will override everything */
body .footer .footer-custom-background,
html .footer .footer-custom-background {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(2, 9, 23, 0) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0) !important;
  z-index: -1 !important;
  border-radius: 50px !important;
  display: block !important;
}

/* Completely disable all existing footer background elements */
body .footer .footer-background,
body .footer .footer-background-image,
body .footer .footer-background-overlay,
html .footer .footer-background,
html .footer .footer-background-image,
html .footer .footer-background-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Keep container transparent */
body .footer-container,
html .footer-container {
  background-color: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 20 !important;
}

body .footer-bottom,
html .footer-bottom {
  background-color: transparent !important;
  backdrop-filter: none !important;
  border-top: 1px solid rgba(198, 170, 101, 0.3) !important;
  margin-top: 20px !important;
  padding-top: 15px !important;
  position: relative !important;
  z-index: 20 !important;
}

body .footer-section,
html .footer-section {
  background-color: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 15px !important;
  margin: 10px !important;
  position: relative !important;
  z-index: 20 !important;
}

body .footer-section h3,
html .footer-section h3 {
  color: #0fa9d9 !important;
  border-bottom: 1px solid rgba(15, 169, 217, 0.3) !important;
  padding-bottom: 8px !important;
  margin-bottom: 15px !important;
}

/* Ensure text is visible */
body .footer-section a,
body .footer-section p,
body .footer-bottom p,
html .footer-section a,
html .footer-section p,
html .footer-bottom p {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
}

/* Hover effect */
body .footer-section a:hover,
html .footer-section a:hover {
  color: #0fa9d9 !important;
  text-shadow: 0 0 10px rgba(15, 169, 217, 0.3) !important;
}

/* Rest of the original rules */
.courses-grid {
  max-width: 1400px !important;
  padding: 0 10px !important;
}

/* Make course boxes wider and more prominent */
.course-box {
  padding: 25px 30px !important;
  margin-bottom: 15px !important;
  box-shadow: 0 5px 30px #08ecc66c !important;
  max-width: 1400px !important;
  border-radius: 50px !important;
  background-color: #23d89600 !important;
}

/* Increase image container size */
.course-image-container {
  width: 500px !important;
  height: 300px !important;
  min-width: 250px !important;
  box-shadow: 0 5px 30px #09c18142 !important;
  border-radius: 50px !important;
}

/* Adjust content container */
.course-content-container {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Enhance buttons */
.box-buttons {
  margin-top: 30px !important;
}

.learn-more-btn
{
    padding: 12px 25px !important;
  border-radius: 30px !important;
  box-shadow: 0 4px 15px #1499037c !important;
  background-color: #05150fd1 !important;
}
.register-button {
  padding: 12px 25px !important;
  border-radius: 30px !important;
  box-shadow: 0 4px 15px #11930367 !important;
  background-color: #05150fd1 !important;
}

/* Add these mobile overrides at the end of your courses-override.css file */

/* Mobile Responsive Adjustments for Courses Introduction */
@media (max-width: 768px) {
  /* Course section container */
  .courses-grid-section {
    padding: 40px 15px !important;
  }

  /* Courses intro wrapper mobile */
  .courses-intro-wrapper {
    padding: 20px 15px 30px;
    max-width: 100%;
    margin-bottom: 30px;
  }

  /* Mobile courses header styling */
  .courses-header {
    margin-bottom: 8px;
  }

  .courses-header h1 {
    font-size: 2.2rem !important;
    line-height: 1.3;
    padding: 0 10px;
    text-align: center;
    /* Fallback color for mobile browsers that don't support gradient text */
    color: #09e1c0;
    background: #09e1c0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Mobile courses description styling */
  .courses-description {
    padding: 5px 15px 30px;
  }

  .program-overview-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .program-card {
    padding: 25px 20px;
    min-height: auto;
    animation: mobileSlideIn 0.5s ease forwards;
  }

  .program-card:nth-child(1) { animation-delay: 0.1s; }
  .program-card:nth-child(2) { animation-delay: 0.2s; }
  .program-card:nth-child(3) { animation-delay: 0.3s; }

  .program-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin: 0 auto 15px;
  }

  .program-content {
    text-align: center;
  }

  .program-content h3 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 12px;
  }

  .program-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
  }

  /* Override hover effects for mobile */
  .courses-description:hover {
    transform: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

  /* Reduce animations for mobile performance */
  .courses-header h1 {
    animation: none;
  }
  
  /* Course boxes */
  .course-box {
    display: flex !important;
    flex-direction: column !important;
    padding: 15px !important;
    margin-bottom: 25px !important;
    border-radius: 20px !important; /* Reduced from 50px */
    box-shadow: 0 2px 15px rgba(8, 236, 198, 0.4) !important;
    background-color: rgba(10, 15, 20, 0.6) !important; /* Slightly visible background */
    backdrop-filter: blur(5px) !important; /* Blur effect for depth */
  }
  
  /* Course image container */
  .course-image-container {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 0 auto 15px auto !important; /* Center with margin */
    padding: 0 !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    aspect-ratio: 16/9 !important; /* Maintain consistent aspect ratio */
  }
  
  /* Course image */
  .course-image-container .course-icon,
  .course-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Cover the container */
    object-position: center !important;
    border-radius: 15px !important;
    display: block !important; /* Prevent inline spacing issues */
  }
  
  /* Add subtle image enhancement */
  .course-image-container::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(0deg, 
                rgba(0, 0, 0, 0.4) 0%, 
                rgba(0, 0, 0, 0) 40%) !important;
    pointer-events: none !important;
    border-radius: 15px !important;
  }
  
  /* Add subtle glow effect */
  .course-image-container::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    background: linear-gradient(45deg, 
                rgba(9, 225, 192, 0.4) 0%, 
                rgba(0, 0, 0, 0) 70%) !important;
    border-radius: 16px !important;
    z-index: -1 !important;
    opacity: 0.7 !important;
  }
  
  /* Fix course box padding to accommodate image */
  .course-box {
    padding: 15px 15px 18px 15px !important;
  }
  
  /* Make sure all course titles start at same height */
  .course-content-container h2 {
    min-height: 2.8rem !important; /* Approximately 2 lines of title text */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Content container */
  .course-content-container {
    width: 100% !important;
    padding: 0 10px !important;
  }
  
  /* Course title */
  .course-content-container h2 {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
    text-align: center !important;
    color: #09e1c0 !important; /* Make title stand out */
  }
  
  /* Course description */
  .course-content-container p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important; /* Reduced bottom margin */
    max-height: 125px !important; /* Increased from 85px to show more text */
    overflow-y: auto !important;
    padding-right: 8px !important; /* Space for scrollbar */
    padding-bottom: 5px !important;
  }
  
  /* Custom scrollbar styling for better visibility */
  .course-content-container p::-webkit-scrollbar {
    width: 4px !important;
  }
  
  .course-content-container p::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
  }
  
  .course-content-container p::-webkit-scrollbar-thumb {
    background: rgba(9, 225, 192, 0.6) !important;
    border-radius: 10px !important;
  }
  
  /* Button container */
  .box-buttons {
    display: flex !important;
    flex-direction: column !important; /* Stack buttons */
    gap: 8px !important; /* Reduced from 10px */
    margin-top: 12px !important; /* Reduced from 15px */
    width: 100% !important;
  }
  
  /* Individual buttons */
  .learn-more-btn,
  .register-button {
    width: 100% !important; /* Full width buttons */
    padding: 12px 15px !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    border-radius: 15px !important;
  }
  
  /* Add some subtle animation for interactivity */
  .course-box:active {
    transform: scale(0.98) !important;
    transition: transform 0.2s ease !important;
  }
  
  /* Course title - tighten spacing */
  .course-content-container h2 {
    margin-bottom: 8px !important; /* Reduced from 10px */
  }
  
  /* Make course boxes slightly taller to accommodate more text */
  .course-box {
    padding-bottom: 18px !important;
  }
  
  /* More moderate top padding for the courses section */
  .courses-grid-section {
    padding-top: 40px !important; /* Reduced for mobile */
  }
  
  /* Subtle margin for the courses header */
  .courses-header {
    margin-top: 10px !important; /* Reduced from 20px */
    padding-top: 8px !important; /* Reduced from 15px */
  }
  
  /* Ensure the h1 has proper spacing */
  .courses-header h1 {
    margin-top: 5px !important; /* Reduced from 10px */
    padding-top: 0 !important; /* Removed padding */
  }
  
  /* Fix spacing with description */
  .section-description {
    margin-top: 12px !important; /* Slightly reduced */
  }
}

/* Mobile animation keyframe */
@keyframes mobileSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .courses-description {
    padding: 0px 10px 25px;
  }

  .program-card {
    padding: 20px 15px;
  }

  .program-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .program-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .program-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  /* Extra small mobile intro wrapper */
  .courses-intro-wrapper {
    padding: 15px 10px 25px;
    margin-bottom: 25px;
  }
  
  .courses-header {
    margin-bottom: 5px;
  }

  /* Extra small mobile header */
  .courses-header h1 {
    font-size: 1.8rem !important;
    line-height: 1.3;
    padding: 0 5px !important;
    text-align: center !important;
  }

  /* Extra small mobile description */
  .courses-description {
    padding: 20px 15px;
    margin: 0 2px;
    border-radius: 15px;
  }

  .courses-description p {
    font-size: 0.95rem !important;
    line-height: 1.5;
    margin-bottom: 12px;
  }
  
  .section-description {
    font-size: 0.9rem !important;
    padding: 0 15px !important;
    text-align: center !important;
    margin-bottom: 25px !important;
  }
  
  .course-content-container h2 {
    font-size: 1.3rem !important;
  }
  
  /* Make scrollable description more obvious */
  .course-content-container p {
    padding-right: 6px !important;
    max-height: 110px !important; /* Adjusted for smaller screens but still taller than before */
    position: relative !important;
  }
  
  /* Add subtle scroll indicator */
  .course-content-container p:after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 20px !important; /* Slightly taller fade effect */
    background: linear-gradient(to bottom, rgba(10, 15, 20, 0), rgba(10, 15, 20, 0.8)) !important;
    pointer-events: none !important;
    border-radius: 0 0 8px 8px !important;
    opacity: 0.8 !important;
  }
  
  /* Make buttons slightly more compact */
  .learn-more-btn,
  .register-button {
    padding: 10px 15px !important;
  }
  
  /* Slight adjustment to spacing */
  .box-buttons {
    margin-top: 10px !important;
    gap: 7px !important;
  }
  
  /* Smaller aspect ratio for very small screens */
  .course-image-container {
    aspect-ratio: 16/10 !important; /* Slightly taller */
    max-height: 160px !important; /* Maximum height cap */
  }
  
  /* Ensure image fills container */
  .course-image-container .course-icon,
  .course-image-container img {
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Adjust course box padding */
  .course-box {
    padding: 12px 12px 15px 12px !important;
  }
  
  /* Slightly reduce title height for smaller screens */
  .course-content-container h2 {
    min-height: 2.6rem !important;
    font-size: 1.2rem !important;
  }
  
  /* Slightly reduced padding for very small screens */
  .courses-grid-section {
    padding-top: 30px !important; /* Reduced for very small screens */
  }
  
  .courses-header {
    margin-top: 8px !important; /* Slightly reduced */
  }
}


