.course-detail {
    max-width: 1000px;
    margin: auto;
    padding: 1rem;
}

/* HERO */
.course-hero{
    text-align: center;
    margin-bottom: 30px;
}

/* course image */
.course-hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;

    display: block;
    margin: 0 auto 20px;

    border-radius: 16px;
    border: 3px solid #0f2a44;
    padding: 5px;
    background: #fff;
}
/* course title */
.course-title{
    font-size: 28px;
    margin-bottom: 10px;
}

/* provider */
.course-provider{
    font-size: 16px;
    color: #555;
}

.course-provider a{
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}

.course-provider a:hover{
    text-decoration: underline;
}

.course-price-box {
    margin-top: 1rem;
    display: blocks;
    align-items: center;
    gap: 1rem;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #007bff;
}

.installment-badge {
    background: #e7f3ff;
    color: #007bff;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.enroll-btn {
    display: inline-block;
    margin-top: 1rem;
    background: #28a745;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.enroll-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* SECTIONS */
.course-section {
    background: #ffffff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.course-section h3 {
    margin-bottom: 0.7rem;
}

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

.details-list li {
    margin-bottom: 0.5rem;
}

.subject-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.subject-tag {
    background: #eef2ff;
    color: #3730a3;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 95%;
    max-width: 450px;
    position: relative;
    animation: fadeIn 0.2s ease;
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.submit-btn {
    flex: 1;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.cancel-btn {
    flex: 1;
    background: #ddd;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* Make form look structured */
.modal-box form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 15px;
}

/* Label styling */
.modal-box label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: #333;
}

/* Input + textarea base styling */
.modal-box input,
.modal-box textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: 0.2s ease;
    font-family: inherit;
}

/* Focus effect */
.modal-box input:focus,
.modal-box textarea:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Textarea sizing */
.modal-box textarea {
    resize: vertical;
    min-height: 90px;
}

/* Placeholder styling */
.modal-box input::placeholder,
.modal-box textarea::placeholder {
    color: #999;
    font-size: 13px;
}

/* Error styling */
.modal-box .errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
    color: #d32f2f;
    font-size: 13px;
}

.modal-box input.error,
.modal-box textarea.error {
    border-color: #d32f2f;
}

.submit-btn {
    flex: 1;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 11px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.submit-btn:hover {
    background: #256628;
}

@keyframes fadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* MOBILE */
@media (max-width: 768px) {
    .course-hero {
        flex-direction: column;
    }

    .course-hero-image {
        width: 100%;
    }

        .enroll-btn {
        display: block;
        width: 100%;
        text-align: center;
    }
}