body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
}

/* Filters + Search */
.top-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

#searchBar {
    padding: 10px;
    width: 220px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.top-controls select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Month header */
.month-header {
    background: #f57c00;
    color: white;
    padding: 12px 20px;
    margin: 30px auto 10px auto;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    font-size: 20px;
    text-align: left;
}

/* Course box */
.session {
    background: white;
    padding: 15px 20px;
    margin: 15px auto;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.2s;
}

.session:hover {
    transform: scale(1.02);
}

.session-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

/* Columns */
.session-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 15px;
    align-items: center;
}

.session-columns .col {
    padding: 5px 10px;
}

.col-date {
    text-align: left;
    font-weight: bold;
}

.session-columns .col:nth-child(2) {
    text-align: center;
}

.col-fees {
    text-align: right;
    font-weight: bold;
}

.session-columns .col:not(:last-child) {
    border-right: 1px solid #ddd;
}

/* Pagination */
#pagination {
    margin-top: 20px;
    text-align: center;
}

.page-btn {
    padding: 8px 12px;
    margin: 3px;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
    background: #fff;
}

.page-btn.active {
    background: #f57c00;
    color: white;
}

/* ========================= */
/* MODAL — FINAL FIX         */
/* ========================= */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 30px 40px;          /* equal spacing */
    border-radius: 12px;
    width: 95%;
    max-width: 650px;            /* wider popup */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;          /* allows button alignment */
}

.close-btn {
    float: right;
    font-size: 28px;
    cursor: pointer;
}

/* Title */
.modal-title a {
    text-decoration: none;
    color: #333;
}
.modal-title a:hover {
    color: #f57c00;
}

/* Course details */
.modal-section p {
    margin: 6px 0;
    font-size: 15px;
}

/* FORM */
.modal-form {
    width: 100%;
    margin-top: 10px;
}

/* LABELS — fix floating */
.modal-form label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
    font-size: 14px;
}

/* INPUTS — equal spacing left/right */
.modal-form input {
    width: 100%;                 /* full width inside padded modal */
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* TERMS — checkbox above text, aligned left */
.terms-box {
    margin-top: 15px;
    display: flex;
    flex-direction: column;      /* stack vertically */
    align-items: flex-start;     /* align left */
    gap: 4px;
}

.terms-box input[type="checkbox"] {
    margin: 0;
}

.terms-box label {
    font-size: 13px;
}

.terms-box a {
    color: #f57c00;
    text-decoration: none;
}
.terms-box a:hover {
    text-decoration: underline;
}

/* REGISTER BUTTON — small + right aligned + NOT spilling */
.register-btn {
    width: 30%;                  /* small button */
    padding: 10px;
    background: #f57c00;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;

    position: absolute;          /* FIXES SPILLING */
    right: 40px;                 /* aligns with modal padding */
    bottom: 30px;                /* stays inside modal */

    opacity: 0.5;
    pointer-events: none;
}

.register-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}
