/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

/*
.container {
  width: 90%;
  outline: solid red 2px;
  max-width: 1200px;
  margin: 0 auto;
}
*/




:root {
  --dark-gray: #333;
}


/* About Hero Banner */
.courses-hero {
    height: 40vh;
    background-image: url('../assets/images/courses_hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    max-width: 95%;
    margin: 100px auto 1rem;
    border-radius: 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.295);
    overflow: hidden;
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.courses-hero .hero-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 4rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.courses-hero h1 {
    font-size: 3rem;
    font-weight: 700;
}


/*Courses*/
.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Section Styling */
.courses-section {
    padding: 40px 0;
}


.all-courses-btn:hover {
    background-color: #4a7c75; /* Darker teal */
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.course-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Ensures child elements conform to border-radius */
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1), box-shadow 0.3s;
}

.course-card:hover {
    transform: scale(1.09) translateY(-18px);
    box-shadow: 0 8px 32px rgba(52, 101, 139, 0.277);


}

.card-image-container {
    position: relative;
    width: 100%;
    height: 300px; /* Fixed height for image container */
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certificate-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #5d9c94fc; 
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
    flex-grow: 1; /* Allows content to take up remaining space */
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4em;
    color: #004D40; /* Darker teal/green for course titles */
    margin-bottom: 8px;
    font-weight: 600;
}

.card-content p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1; /* Pushes button to the bottom if content is short */
}

.learn-more-btn {
    background-color: #5D9C94; /* Teal color */
    color: white;
    font-size: 0.85em;
    text-decoration: none;
    border-radius: 12px;
    padding: 8px 18px;
    align-self: flex-start; /* Align button to the left */
    transition: all ease-out 1s;
    transition: transform 0.4s cubic-bezier(0.4, 0.2, 0.2, 1), box-shadow 0.3s;
}

.learn-more-btn:hover {
background: #333;
  transform: scale(1.09) translateY(-18px);
  box-shadow: 0 8px 32px rgba(52, 101, 139, 0.277);}

.learn-more-btn.icon-btn {
    padding: 8px 12px; /* Adjust padding for icon button */
    width: 40px; /* Make it more square/circular */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Makes it circular */
}

.learn-more-btn.icon-btn i {
    font-size: 1em;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-titles h2 {
        font-size: 2em;
    }

    .all-courses-btn {
        margin-top: 15px;
        align-self: flex-start;
    }

    .courses-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }
}

@media (max-width: 480px) {
    .section-titles h2 {
        font-size: 1.8em;
    }
     .section-titles p {
        font-size: 0.9em;
    }
    .card-content h3 {
        font-size: 1.2em;
    }
}



/* Responsive Styles */
@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }
  .courses-hero {
    height: 320px;
  }
}
@media (max-width: 600px) {
  .container {
    width: 98%;
    padding: 0 0.5rem;
  }
  .hero {
    height: 220px;
  }
  .hero-overlay {
    padding: 1.2rem 0.5rem;
    font-size: 0.98rem;
  }
  .excellence-img, .cta-img {
    max-width: 100%;
    height: auto;
  }
  .why-img {
    width: 100px;
  }
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* Dropdown Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .nav-link {
    display: flex;
    align-items: center;
}

.dropdown .nav-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    padding: 12px 0;
    margin-top: 0;
    top: 100%;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #1a6d5b;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}