:root
{
    --purple: #7068BD;
    --light-purple: #A4A0CD;
    --dark-purple: #544D94;

    --green: #85CA00;
    --dark-green: #499601;

    --red: #FF6666;
    --pale-red: #DC6B6D;
    --blue: #4DC3FF;
    --daveColor: #FFD791;

    --easeOut: cubic-bezier(0, 0.55, 0.45, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;*/
    font-family: "Varela Round", sans-serif; 
}

body {
    background-color: #f5f6fa;
    color: #333;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 20%;
    min-width: 200px;
    height: 100vh;
    background-color: var(--purple);
    color: white;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding: 30px 20px;
    transition: left 0.3s ease;
    z-index: 1000;
}

/* Profile section */
.profile {
    text-align: center;
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: flex-start;

    gap: 20px;
}

.avatar-container
{
    position: relative;
    min-width: 120px;
    aspect-ratio: 1;

    border-radius: 50%;
    overflow: hidden;
    background-color: white;

}

.avatar-img
{
    width: 100%;
    height: 100%; 
    object-fit: cover;
}

.avatar-overlay
{
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background-color: rgba(0,0,0,.6);
    opacity: 0;
    transition: all .3s;

    display:  flex;
    align-items: center;
    justify-content: center;
}

.avatar-overlay:hover
{
    opacity: 1;
    transition: all .3s;
    cursor: pointer;
}

.avatar-svg-container
{
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.svg-container
{
    position: relative;
    inset: 0;
    width: 100%;
    height: 100%;
}

.svg-avatar-element
{
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.profile h2 {
    margin-bottom: 15px;
    font-weight: 500;
    width: 100%;
}

.username {
    width: 100%;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Buttons */
.basic-btn
{
    color: white;
    font-size: 18px;
    font-weight: 500;

    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: inset 0px -4px 0px rgba(0,0,0,0.2);
    border: 1px solid black;
    transition: all 0.3s ease;

    cursor: pointer;
}

.basic-btn:hover
{    
    transform: scale(1.05);
}

.flex { display: flex; }
.flex-c {flex-direction: column;}
.flex-aic {align-items: center;}
.flex-jcc {justify-content: center;}
.flex-jcs {justify-content: flex-start;}
.w90 {width: 90%;}
.flex-gap10 {gap: 10px;}
.mb10 {margin-bottom: 10px;}

.basic-txt-container
{
    background-color: var(--purple);

    flex-grow: 0;

    color: white;
    font-size: 18px;
    font-weight: 500;

    padding: 10px 20px;
    border-radius: 10px;

    margin-bottom: 20px;
}

.basic-txt-white
{
    color: white;
    font-size: 18px;
    font-weight: 500;

    padding: 10px 10px;
}

.stick-bottom
{
    margin-top: auto;
}

.logout-btn,
.change-password-btn {

    cursor: pointer;
    transition: all 0.3s ease;
    /*width: 100%;*/
}

.logout-btn {
    background-color: var(--pale-red);
    margin-bottom: auto;
}

.logout-btn:hover {
    background-color: rgb(202, 37, 37);
}

.change-password-btn {
    background-color: #00aaff;
}
.change-password-btn:hover {
    background-color: #0090e0;
}

.back-link {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-top: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.back-link:hover {
    opacity: 1;
}

/* Main content */
.main-content 
{
    flex: 1;
    padding: 40px;
    overflow-y: auto;

    background-image: url("../images/bg.png");
    background-repeat:repeat;
    background-size: contain;
}


.main-content h1 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* Course grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;

    margin-bottom: 20px;
}

.course-card {
    position:  relative;

    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;

    border: 2px solid black;
    aspect-ratio: 16/9;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.course-card img
{
    display: block;
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-card .course-card-info
{
    opacity: 0;
    position: absolute;
    inset: 0;

    background-color: var(--card-color);
    padding: 5px;
    pointer-events: none;
    transition: all .3s;
}

.course-card-info-container
{
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items:flex-start;
    justify-content: space-around;
}

.course-card-info .title
{
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-size: 1.4rem;
        color: rgba(0,0,0,0.6);

    font-weight: 800;
    font-style: normal;
}

.course-card-info .short-description,
.course-card-info .duration
{
    font-family: "Montserrat", sans-serif;
    font-size: .6rem;
    font-weight: 800;
    color: rgba(0,0,0,0.6);
}

.course-card:hover .course-card-info
{
    opacity: 1;
    transition: all .3s;
}

.course-card h3 {
    padding: 15px;
    font-size: 1.1rem;
    color: #333;
}

.card-progress-overlay
{
    position: absolute;
    background-color: var(--purple);
    width: 100%;
    height: 20%;

    margin-top: 45%;

    display: grid;
    grid-template-columns: 1fr 0.3fr;
}

.card-progress-slider-container
{
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-background
{
    background-color: #333;

    width: 90%;
    height: 50%;

    border-radius: 20px;

    overflow: hidden;
}

.slider-fill
{
    width: 100%;
    height: 100%;

    border-radius: 20px;

    background-color: var(--green);

    transform: translateX(var(--percent));

}

@keyframes translate {
    0%{transform: translateX(-100%);}
    50%{transform: translateX(0%);}
    100%{transform: translateX(-100%);}
}

.card-progress-txt-container
{
    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    font-size: 1.5rem;
    color: white
}


/* Burger button */
.burger {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 28px;
    background: none;
    border: none;
    color: #2e3b55;
    cursor: pointer;
    z-index: 1001;
}

/* Overlay (for mobile when sidebar opens) */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.overlay.active {
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100%;
        /*background-color: #2e3b55;*/
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 80px 20px;
    }

    .burger {
        display: block;
    }
}
