/* Course Details Specific Styles */
.course-details-section {
    padding: 20px 0;
}

.course-details-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
}

.course-details-content:hover {
    box-shadow: 0 4px 12px rgba(0,115,177,0.15);
    border-color: var(--ep-primary-color-1);
}

.course-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
}

.course-section:hover {
    box-shadow: 0 4px 12px rgba(0,115,177,0.15);
    border-color: var(--ep-primary-color-1);
}

.course-header {
    padding-bottom: 0px;
    margin-bottom: 30px !important;
}

.category-tag {
    background: linear-gradient(135deg, var(--ep-primary-color-1) 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.course-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.meta-item i {
    color: var(--ep-primary-color-1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #f0f4f8;
    border-radius: 2px;
}

.course-description p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.eligibility-list {
    list-style: none;
    padding: 0;
}

.eligibility-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.eligibility-list i {
    color: #28a745;
    margin-top: 2px;
    flex-shrink: 0;
}

.duration-card {
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.duration-icon {
    font-size: 24px;
    opacity: 0.9;
}

.duration-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.duration-info p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.duration-breakdown h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.structure-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.structure-item:last-child {
    border-bottom: none;
}

.structure-phase {
    color: #333;
}

.structure-duration {
    color: var(--ep-primary-color-1);
    font-weight: 600;
}

.section-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.colleges-count {
    color: var(--ep-primary-color-1);
    font-weight: 600;
    font-size: 14px;
}

.colleges-loading {
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ep-primary-color-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-colleges {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.no-results-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Sidebar Styles */
.course-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 15px rgba(0,115,177,0.15);
    border-color: var(--ep-primary-color-1);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
    background: none;
    border-radius: 0;
}

.advertisement-content {
    padding: 0;
}

.ad-image {
    margin-bottom: 15px;
}

.ad-image img {
    border-radius: 8px;
}

.ad-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.ad-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.ad-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ad-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
}

.ad-features i {
    color: #28a745;
}

.ad-btn {
    background: transparent;
    color: var(--ep-primary-color-1);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: 1px solid var(--ep-primary-color-1);
}

.ad-btn:hover {
    background: var(--ep-primary-color-1);
    color: white;
    border-color: var(--ep-primary-color-1);
}

.quick-info-list {
    padding: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f3f3;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 600;
}

.related-courses-list {
    padding: 0;
}

.related-course-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f3f3;
    transition: all 0.3s ease;
}

.related-course-item:last-child {
    border-bottom: none;
}

.related-course-item:hover {
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 6px;
}

.course-icon {
    width: 40px;
    height: 40px;
    background: rgba(0,115,177,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-primary-color-1);
    flex-shrink: 0;
    font-size: 18px;
}

.course-info h6 {
    margin: 0 0 5px 0;
}

.course-info h6 a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.course-info h6 a:hover {
    color: var(--ep-primary-color-1);
}

.course-info span {
    color: #666;
    font-size: 14px;
}

/* Reuse college card styles from index page */
.colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.college-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.college-card:hover {
    box-shadow: 0 4px 12px rgba(0,115,177,0.15);
    border-color: var(--ep-primary-color-1);
}

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

.college-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.college-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.college-card:hover .college-card-overlay {
    opacity: 1;
}

.view-details-btn {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: var(--ep-primary-color-1);
    color: #fff;
}

.college-card-content {
    padding: 25px;
}

.college-card-title {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.college-card-title a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
}

.college-card-title a:hover {
    color: var(--ep-primary-color-1);
}

.college-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.college-location,
.college-type {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.college-location i,
.college-type i {
    color: var(--ep-primary-color-1);
}

.college-programs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.program-tag {
    background: #f8f9ff;
    color: var(--ep-primary-color-1);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e6ebff;
}

.college-card-actions {
    display: flex;
    gap: 10px;
}

.college-card-btn {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.college-card-btn.primary {
    background: linear-gradient(135deg, var(--ep-primary-color-1) 0%, #764ba2 100%);
    color: white;
}

.college-card-btn.primary:hover {
    color: white;
}

.college-card-btn.secondary {
    background: transparent;
    color: var(--ep-primary-color-1);
    border: 1px solid var(--ep-primary-color-1) !important;
}

.college-card-btn.secondary:hover {
    background: linear-gradient(135deg, var(--ep-primary-color-1) 0%, var(--ep-primary-color-9) 100%);
    color: white;
}

/* No Colleges Message */
.no-colleges-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-colleges-icon {
    margin-bottom: 20px;
}

.no-colleges-icon i {
    font-size: 4rem;
    color: #6c757d;
}

.no-colleges-message h4 {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.no-colleges-message p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--ep-primary-color-1) 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.contact-btn:hover {
    background: linear-gradient(135deg, var(--ep-primary-color-2) 0%, var(--ep-primary-color-3) 100%) !important;
    color: white;
}

#collegeCount {
    cursor: pointer;
    color: var(--ep-primary-color-1);
    text-decoration: none;
    font-weight: 600;
}

#collegeCount:hover {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-meta {
        flex-direction: column;
        gap: 10px;
    }

    .course-sidebar {
        position: static;
        margin-top: 40px;
    }

    .duration-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .colleges-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .college-card-actions {
        flex-direction: column;
    }
    
    .no-colleges-message {
        padding: 40px 15px;
    }
    
    .no-colleges-icon i {
        font-size: 3rem;
    }
    
    .no-colleges-message h4 {
        font-size: 1.3rem;
    }
}

/* Apply Modal Styles - Higher z-index values */
#applyModal {
    z-index: 9999 !important;
}

#applyModal.modal.show {
    z-index: 9999 !important;
    display: block !important;
}

#applyModal .modal-dialog {
    z-index: 10000 !important;
    position: relative;
}

#applyModal .modal-content {
    z-index: 10001 !important;
    position: relative;
    background-color: #f8f9fa;
    border: none;
    border-radius: 12px;
}

.apply-form-container {
    position: relative;
    z-index: 10002 !important;
}

.apply-form-container iframe {
    position: relative;
    z-index: 10003 !important;
    pointer-events: auto !important;
    width: 100%;
    height: 890px;
    border: none;
}

.modal-backdrop.show {
    z-index: 9998 !important;
    background-color: rgba(0, 0, 0, 0.99) !important;
}

#applyModal .modal-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
}

#applyModal .btn-close {
    background-color: transparent;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
}

#applyModal .btn-close:hover {
    opacity: 1;
    background-color: #f8f9fa;
    border-radius: 50%;
}

/* Ensure form elements are clickable */
.modal-body iframe,
.modal-body iframe * {
    pointer-events: auto !important;
}

/* Override any conflicting styles */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Force modal to be visible and interactive */
body.modal-open {
    overflow: hidden;
}

body.modal-open #applyModal {
    display: block !important;
    z-index: 9999 !important;
}
