@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --font-main: 'Manrope', sans-serif;

    --color-black:     rgba(0, 0, 0, 1);
    --color-white:     #fff;
    --color-surface:   #f8f8f8;
    --color-secondary: rgba(0, 0, 0, 0.7);
    --color-tertiary:  rgba(0, 0, 0, 0.5);
    --color-border:    #e8e8e8;
    --color-hover:     #f3f3f3;
    --color-subtle:    rgb(0 0 0 / 3%);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --height-control: 44px;
    --lh-base: 24px;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-main) !important;
    background-color: var(--color-white);
    margin: 0;
}

.br-6 {
    border-radius: var(--radius-lg);
}

.my-g-3 {
    gap: 12px;
}

.controls {
    padding-bottom: 24px;
    border-bottom: solid 1px var(--color-border);
}

.grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

p {
    margin: 0 !important;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--color-white);
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
}

.truncated-text {
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 12;
    -webkit-line-clamp: 12;
    -webkit-box-orient: vertical;
}

.read-more-link {
    color: var(--color-black);
    cursor: pointer;
    font-weight: 500;
}

.course {
    padding: 2px 8px;
    background-color: var(--color-white);
    border-radius: var(--radius-xs);
}

.main-container {
    margin: 0 auto;
    max-width: 100%;
    padding: 24px 120px;
}

.my-btn {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    line-height: var(--lh-base);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    height: var(--height-control);
    justify-content: center;
    text-decoration: none;
    gap: 8px;
}

.btn-1 {
    color: var(--color-black);
    padding: 0 16px 0 8px;
    background-color: transparent;

    &:hover {
        background-color: var(--color-hover);
    }
}

.btn-2 {
    color: var(--color-white) !important;
    padding: 0 20px;
    background-color: var(--color-black);
    opacity: 1;

    &:hover {
        opacity: 0.8;
    }
}

.sort-select {
    display: inline-flex;
    height: var(--height-control);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: var(--lh-base);
    border: none;
    color: var(--color-black);
    padding: 0 16px;
    border-radius: var(--radius-md);
    background-color: var(--color-subtle);
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px top 50%, 0 0;
    appearance: none;
    cursor: pointer;
    width: 240px;

    &:hover {
        background-color: var(--color-hover);
        background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
        background-repeat: no-repeat;
        background-position: right 8px top 50%, 0 0;
        appearance: none;
    }

    &:focus {
        outline: none;
    }
}

.my-card {
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap:20px;
    font-size: 15px !important;
    line-height: 1.45;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
}

.txt-subtitle {
    font-size: 16px;
    line-height: var(--lh-base);
    font-weight: 500 !important;
}

.txt {
    font-size: 16px;
    line-height: var(--lh-base);
    font-weight: 400;
}

.txt-primary {
    color: var(--color-black);
}

.txt-secondary {
    color: var(--color-secondary);
}

.txt-tertiary {
    color: var(--color-secondary);
    font-size: 14px;
    line-height: 20px;
}

.txt-small {
    font-size: 14px !important;
    line-height: 20px !important;
    letter-spacing: 0.25px !important;
}

.content-wrapper {
    flex-direction: row;
    gap: 40px;
}

.widgets {
    max-width: 400px;
}

.widget-review {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    border: solid 1px var(--color-border);
    clip-path: border-box;
}

.widget-header {
    font-size: 20px;
    line-height: var(--lh-base);
    font-weight: 500;
    padding: 0 24px;
    color: var(--color-black);
}

.review-heading {
    display: flex;
    gap: 16px;
    font-family: var(--font-main);
    font-size: 14px;
    padding: 16px 24px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0.2px;
    justify-content: space-between;
}

.review-card {
    align-items: center;
    font-family: var(--font-main);
    font-size: 20px;
    line-height: var(--lh-base);
    font-weight: 600;
    color: var(--color-black);
    justify-content: space-between;
}

.review-link {
    text-decoration: none;

    &:hover {
        background-color: var(--color-subtle);
    }
}

.my-hr {
    display: block;
    height: 0.5px;
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 0 0 16px 0;
    padding: 0;
    opacity: 1;
}

a {
    text-decoration: none;
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding:16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.modal-visible {
    opacity: 1;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap:20px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.modal-visible .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    color: var(--color-black);

    &:hover {
        background: var(--color-hover);
    }
}

.modal-text {
    line-height: 1.6 !important;
    white-space: pre-line;
    font-size: 15px !important;
    opacity: 0.7;
}

.modal-course {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--color-subtle);
    border-radius: var(--radius-xs);
    font-size: 14px;
    line-height: 16px;
    font-family: var(--font-main);
    color: var(--color-black);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    color: var(--color-secondary);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.15s;
}

.page-btn:hover:not([disabled]) {
    background-color: var(--color-hover);
}

.page-btn--active {
    background-color: var(--color-black);
    color: var(--color-white);
}

.page-btn[disabled] {
    opacity: 0.3;
    cursor: default;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--color-secondary);
}

@media screen and (max-width: 1199px) {
    
    .main-container {
        padding: 24px 40px;
    }
    .sort-select {
        width: 100%;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 959px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 20px;
    }

    .widgets {
        max-width: 360px;
        width: 100%;
    }

    .reg {
        display: none;
    }
}

@media screen and (max-width: 639px) {
    .content-wrapper {
        flex-direction: column-reverse;
        gap: 24px;
    }

    .main-container {
        padding: 0 16px;
    }

    .widgets {
        max-width: none;
        width: 100%;
    }

    .reg {
        display: none;
    }
}

@media screen and (max-width: 479px) {
    .txt {
        font-size: 15px;
        line-height: 22px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }

    .my-btn {
        font-size: 15px;
    }
}
