:root {
    --primary: rgb(161, 225, 128);
    --secondary: rgb(35, 175, 196);
    --border: #e6e6e6;
    --text: #222;
    --gray: #666;
    --bg: #fafafa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    margin: 0 5vw;
    padding: 5vh 3vw;
}

.page-title {
    font-size: clamp(24px, 6.5vh, 62px);
    font-weight: 700;
    margin-bottom: 3vh;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 22vw 1fr;
    gap: 2vw;
}

.filters {
    background: white;
    border-radius: 20px;
    padding: 2.5vh;
    position: sticky;
    top: 20px;
    height: fit-content;
    border: 1px solid var(--border);
}

.search-box {
    margin-bottom: 24px;
}

.search-box input {
    width: 100%;
    height: 5vh;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 .8vw;
    font-size: clamp(12px, 1.8vh, 18px);
}

.filter-group {
    margin-bottom: 3vh;
}

.filter-group-title {
    font-size: clamp(12px, 1.8vh, 18px);
    font-weight: 700;
    margin-bottom: 1.5vh;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: .5vw;
    margin-bottom: 1vh;
}

.filter-item input {
    width: 2.3vh;
    height: 2.3vh;
}

.filter-item label {
    cursor: pointer;
    font-size: clamp(10px, 2vh, 24px);
}

.filter-item input[type="checkbox"] {
    accent-color: var(--primary);
}


.filter-item input[type="checkbox"]:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2vh;
}

.result-count {
    font-size: clamp(12px, 1.8vh, 18px);
    color: var(--gray);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2vw;
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.course-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: .25s;
    min-width: 10vw;
}

.course-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 1vh 1vw 2vh 1vw ;
}

.course-btn-wrapper {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.course-image {
    position: relative;
    height: 25vh;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-labels {
    position: absolute;
    top: 1vh;
    left: 1vh;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.label {
    padding: .3vh .7vh;
    border-radius: 999px;
    font-size: clamp(6px, 1.5vh, 14px);
    font-weight: 600;
    border: 2px solid var(--secondary);
}

.course-title {
    font-size: clamp(6px, 2.5vh, 24px);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 10px;
}

.course-subtitle {
    font-size: clamp(6px, 2vh, 24px);
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 2vh;

}

.course-subtitle strong {
    text-decoration: underline var(--primary) 3px;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3vw;
    margin-bottom: 20px;
}

.course-tag {
    background: #f2f2f2;
    padding: .3vh .7vh;
    border-radius: 999px;
    font-size: clamp(6px, 1.5vh, 14px);
}

.price-row {
    display: flex;
    align-items: flex-end;
    gap: 2vh;
    margin-bottom: 2.3vh;
}

.final-price {
    font-size: 28px;
    font-weight: 700;
}

.old-price {
    text-decoration: line-through;
    color: #999;
}

.discount {
    color: #ff5a36;
    font-weight: 700;
}

.course-btn {
    width: 100%;
    height: 5vh;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    cursor: pointer;
    font-size: clamp(10px, 2vh, 20px);
    font-weight: 700;
}

.course-btn:hover {
    opacity: .9;
}

.hidden {
    display: none !important;
}

.no-results {
    display: none;
    padding: 40px;
    text-align: center;
    font-size: 18px;
    background: white;
    border-radius: 20px;
}

@media (max-width:1000px) {

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        position: relative;
        top: auto;
    }

}

#reset_filters {
    width: 100%;
    border-radius: 14px;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: .3s;
    display: none;
}

#reset_filters:hover {
    background-color: #d4d4d4;
}

.cta-btns {
    display: flex;
    flex-direction: row;
    gap: 2%;
}

.cta-btns a {
    width: 48%;
}

.cta-btn {
    width: 100%;
    height: 5vh;
    border: none;
    border-radius: 14px;
    background: var(--secondary);
    color: #fff;
    cursor: pointer;
    font-size: clamp(10px, 2vh, 20px);
    font-weight: 700;
}