/* ====================== COURSES SECTION STYLES ====================== */
.courses {
    padding: 130px 0 100px;
    background: white;
    position: relative;
    overflow: hidden;
}

.courses::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 45, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.12) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.courses .container { 
    position: relative; 
    z-index: 2; 
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: blue;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    /* Removed margin-left: 350px; for proper centering */
}

.section-title::after {
    content: '';
    width: 140px;
    height: 6px;
    background: rgba(255, 45, 32, 0.9);
    border-radius: 3px;
    display: block;
    margin: 20px auto 0;
    box-shadow: 0 0 30px rgba(255, 45, 32, 0.7);
}

.course-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.5s ease;
    height: 100%;
    position: relative;
}

.course-card:hover {
    transform: translateY(-18px);
    box-shadow: 0 40px 90px rgba(255, 45, 32, 0.35);
    border: 1px solid rgba(255, 45, 32, 0.4);
}

.course-image-wrapper {
    position: relative;
    height: 260px;
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.course-card:hover .course-img {
    transform: scale(1.12);
}

.course-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 20px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    z-index: 2;
}

.overlay-title {
    font-size:15px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.overlay-duration {
    background: rgba(255, 45, 32, 0.9);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    margin-left: 3px;
}

.course-content {
    padding: 28px 29px 32px;
    color: black;
}

.course-content p {
    color: var(--primary-color); /* Blue color for paragraphs */
    margin-bottom: 0.5rem; /* Add some space between paragraphs */
    font-size: 1rem; /* Consistent font size */
}

.course-content p .course-label {
    color: var(--accent-color); /* Red color for labels */
    font-weight: 600; /* Make labels slightly bolder */
}

.course-desc {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #333;
    margin: 0 0 28px 0;
    min-height: 75px;
}

.course-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.2rem;
    background: #e02618;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 50px;
    border: 2px solid #e02618;
    box-shadow: 0 8px 25px rgba(224, 38, 24, 0.5);
    text-decoration: none !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
}

.course-btn:hover {
    background: #e02618;
    color: #000 !important;
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(224,38,24,0.65);
}

.course-btn.pdf-btn {
    font-size: 18px;
}

.course-btn.apply-btn {
    font-size: 16px;
}

/* =============================================
   NEW: NAVBAR-STYLE APPLY BUTTON (USED IN CARDS)
   ============================================= */
.navbar-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 2rem;
    background: #e02618;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 50px;
    border: 2px solid #e02618;
    box-shadow: 0 10px 30px rgba(224, 38, 24, 0.5);
    text-decoration: none !important;
    transition: all 0.4s ease;
    white-space: nowrap;
    flex: 1;
}

.navbar-apply-btn:hover {
    background: #e02618;
    color: #000 !important;
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(224, 38, 24, 0.65);
}

/* Remove old conflicting styles */
.btn-requirements,
.btn-details {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* All Courses Button (below cards) */
#allcourses {
    display: inline-block;
    background: #e02618;
    color: white;
    border: 3px solid #e02618;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem; /* Adjusted to rem */
    margin-top: 20px;
    text-decoration: none;
    padding: 0.8rem 2rem; /* Flexible padding */
    width: auto; /* Auto width */
    max-width: 250px; /* Limit max width */
    height: auto; /* Auto height */
    text-align: center;
    transition: all 0.3s ease;
}

#allcourses:hover {
    background: #e02618;
    color: black;
}

.text-muted.h4 { 
    color: #666 !important; 
}

.course-item { 
    transition: all 0.5s ease; 
}
.course-item[style*="display: none"] { 
    display: none !important; 
}

.dropdown-item.active {
    background: linear-gradient(90deg, #ff2d20, #ff6b35) !important;
    color: white !important;
    font-weight: 700;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .courses { 
        padding: 90px 0 70px; 
    }
    .section-title h2 { 
        font-size: 2.6rem; 
        margin-bottom: 60px; 
        margin-left: 0; 
    }
    .course-buttons { 
        flex-direction: column; 
    }
    .navbar-apply-btn {
        width: 100%;
        padding: 1rem;
    }
    #allcourses { 
        width: 192px; 
        height: 46px; 
        font-size: 14px; 
    }
}

@media (max-width: 991px) {
    .course-btn {
        padding: 0 1rem;
    }
    .course-btn.pdf-btn {
        font-size: 15px;
    }
    .course-btn.apply-btn {
        font-size: 15px;

    }
}

@media (max-width: 480px) {
    .course-btn {
        min-height: 44px;
    }
    .course-btn.pdf-btn {
        font-size: 14px;
    }
    .course-btn.apply-btn {
        font-size: 14px;
        width: 238px;
    }
}