/* Course list page only
   Keep general.css unchanged and load this file after it. */

.course-page {
    padding-top: 54px;
    padding-bottom: 70px;
    background: transparent;
}

.course-page .section-title {
    position: relative;
    display: inline-block;
    font-size: 1.75rem;
    margin-bottom: 28px;
    padding-bottom: 16px;
    font-weight: 700;
}

.course-page .section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 58px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 999px;
}

.course-page-header {
    margin-bottom: 18px;
    background: transparent;
}

.course-controls {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background-color: white;
    padding: 10px 14px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 36px;
}

.course-controls label {
    font-size: 0.82rem;
    color: #333;
}

.course-controls select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    min-width: 190px;

    border: 0;
    border-radius: 9px;
    padding: 8px 42px 8px 12px;
    font-size: 0.82rem;
    color: #333;

    background-color: #f8f8f8;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
}

/* Table */

.course-table-wrapper {
    background-color: white;
    border-radius: var(--radius-form);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.course-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    table-layout: fixed;
    background-color: white;
}

.course-table th {
    background-color: var(--primary-blue);
    color: white;
    font-weight: 500;
    text-align: left;
    padding: 18px 26px;
    font-size: 0.92rem;
}

.course-table th:nth-child(1) {
    width: 39%;
}

.course-table th:nth-child(2) {
    width: 9%;
    text-align: center;
}

.course-table th:nth-child(3) {
    width: 9%;
    text-align: center;
}

.course-table th:nth-child(4) {
    width: 29%;
}

.course-table th:nth-child(5) {
    width: 14%;
    text-align: center;
}

.course-table td {
    padding: 32px 26px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.course-table tbody tr:last-child td {
    border-bottom: 0;
}

.course-table td:nth-child(2),
.course-table td:nth-child(3) {
    text-align: center;
}

/* Price column on desktop:
   align the button slightly more inward, away from the right edge. */

.course-table td:nth-child(5) {
    text-align: left;
    padding-left: 18px;
    padding-right: 46px;
}

/* Course name */

.course-main {
    display: flex;
    align-items: center;
    gap: 22px;
}

.course-flag {
    width: 76px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.course-title-link {
    color: black;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    line-height: 1.35;
    display: inline-block;
}

.course-title-link:hover {
    color: var(--secondary-gold);
}

.course-main p {
    margin-top: 8px;
    color: #333;
}

/* Table text */

.course-main p,
.course-table td p,
.course-table td {
    font-size: 0.84rem;
    line-height: 1.45;
}

.course-table td:nth-child(2),
.course-table td:nth-child(3) {
    font-size: 0.9rem;
}

.course-table td:nth-child(4) p + p {
    margin-top: 2px;
}

/* Price button layout only */

.course-price-button {
    width: 128px;
    min-width: 128px;
    white-space: nowrap;
}

/* Responsive */

@media (max-width: 900px) {
    .course-page {
        width: min(100% - 30px, var(--page-width));
    }

    .course-table,
    .course-table thead,
    .course-table tbody,
    .course-table tr,
    .course-table td {
        display: block;
        width: 100%;
    }

    .course-table thead {
        display: none;
    }

    .course-table-wrapper {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }

    .course-table {
        min-width: 0;
        background: transparent;
    }

    .course-table tr {
        background-color: white;
        border-radius: 14px;
        box-shadow: var(--shadow-card);
        margin-bottom: 22px;
        padding: 24px;
    }

    .course-table td {
        border-bottom: 0;
        padding: 8px 0;
        text-align: left;
        vertical-align: top;
    }

    .course-table td:nth-child(2),
    .course-table td:nth-child(3),
    .course-table td:nth-child(5) {
        text-align: left;
    }

    /* Reset desktop price spacing inside mobile cards. */

    .course-table td:nth-child(5) {
        padding-left: 0;
        padding-right: 0;
    }

    .course-table td:nth-child(2)::before {
        content: "Úroveň: ";
        font-weight: 700;
        color: var(--primary-blue);
    }

    .course-table td:nth-child(3)::before {
        content: "Forma: ";
        font-weight: 700;
        color: var(--primary-blue);
    }

    .course-table td:nth-child(4)::before {
        content: "Délka a rozvrh";
        display: block;
        font-weight: 700;
        color: var(--primary-blue);
        margin-bottom: 6px;
    }

    .course-table td:nth-child(5)::before {
        content: "Cena";
        display: block;
        font-weight: 700;
        color: var(--primary-blue);
        margin-bottom: 8px;
    }

    .course-main {
        align-items: flex-start;
    }

    .course-price-button {
        width: 140px;
        min-width: 140px;
        margin-left: 0;
    }
}

@media (max-width: 550px) {
    .course-page {
        width: min(100% - 24px, var(--page-width));
        padding-top: 38px;
        padding-bottom: 50px;
    }

    .course-controls {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 12px;
        padding: 14px;
        margin-bottom: 28px;
    }

    .course-controls label {
        display: grid;
        grid-template-columns: 90px 1fr;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .course-controls select {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .course-table tr {
        padding: 20px;
    }

    .course-main {
        flex-direction: column;
        gap: 14px;
    }

    .course-flag {
        width: 92px;
        height: 58px;
    }
}

/* Single course content lists
   Unordered lists keep custom blue bullets.
   Ordered lists keep only numbers, without custom bullets. */

.single-course-content ul,
.course-detail-content ul,
.course-description ul,
.single-course-main ul {
    list-style: none;
    padding-left: 0;
}

.single-course-content ul li,
.course-detail-content ul li,
.course-description ul li,
.single-course-main ul li {
    position: relative;
    padding-left: 1.4rem;
}

.single-course-content ul li::before,
.course-detail-content ul li::before,
.course-description ul li::before,
.single-course-main ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background-color: var(--primary-blue);
}

/* Ordered lists must show numbers only */

.single-course-content ol,
.course-detail-content ol,
.course-description ol,
.single-course-main ol {
    list-style: decimal;
    padding-left: 2rem;
}

.single-course-content ol li,
.course-detail-content ol li,
.course-description ol li,
.single-course-main ol li {
    position: relative;
    padding-left: 0.3rem;
}

.single-course-content ol li::before,
.course-detail-content ol li::before,
.course-description ol li::before,
.single-course-main ol li::before {
    content: none !important;
    display: none !important;
}
