@import url("../fonts/vazirmatn.css");

:root {
    --color-app-bg-one: #f5f5f5;

    --app-color-primary: #022cb4;
    --app-color-primary: #001969;
    --app-color-primary-dark: #001147;

    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

* {
    font-family: Vazirmatn;
}

body {
    background-color: var(--color-app-bg-one);
    max-width: 1200px;
    margin: auto;
    color: #555;
    padding: 0 1rem 1rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    margin-bottom: 1rem;
    border-radius: 0 0 0.25rem 0.25rem;
    background-color: #fff;
    box-shadow: #0000003d 0px 3px 8px;
}

header .logo a {
    line-height: 0;
    text-decoration: none;
}

header .logo img {
    width: 45px;
}

header .header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--app-color-primary);
    font-size: 0.75rem;
    font-weight: 900;
    border: none;
    background-color: #fff;
}

header .header-btn i {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
}

.layout-secondary header {
    padding: 1.2rem 2rem;
}

#container {
    display: block;
}

#container nav {
    margin-bottom: 1rem;
    padding: 0 2rem;
    border-radius: 0.25rem;
    background-color: #fff;
    box-shadow: #0000003d 0px 3px 8px;
}

#container .nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}

#container .nav-container a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
    text-align: center;
    padding: 1rem;
    color: #777;
    background-color: #fff;
}

#container .nav-container a i {
    margin-left: 0.5rem;
    margin-top: -0.35rem;
}

#container .nav-container .item.active a {
    color: #fff;
    background-color: var(--app-color-primary);
}

#container #content {
    width: 100%;
    background-color: transparent;
}

@media screen and (max-width: 992px) {
    body {
        padding: 0;
    }

    .layout-primary header {
        padding: 0.5rem 1rem;
        border-radius: 0;
    }

    .layout-secondary header {
        padding: 1.2rem 1rem;
        border-radius: 0;
    }

    #container {
        display: flex;
        justify-content: flex-start;
        align-items: stretch;
    }

    #container nav {
        box-shadow: none;
        min-height: calc(100vh - 90px);
        max-width: 95px;
        padding: 0;
        padding-right: 0.5rem;
        margin-bottom: 0;
        border-radius: 0;
        background-color: transparent;
    }

    #container .nav-container.sticky {
        display: block;
        position: sticky;
        top: 1rem;
    }

    #container .nav-container .item {
        margin-bottom: 0.5rem;
    }

    #container .nav-container a {
        flex-direction: column;
        min-height: 70px;
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0.25rem;
        background-color: #fff;
        box-shadow: #0000003d 0px 3px 8px;
    }

    #container .nav-container a i {
        margin: 0 0 0.5rem;
        font-size: 1.1rem;
    }

    #container #content {
        padding: 0 0.75rem 1rem 0.75rem;
    }
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000aa;
    z-index: 14;
}

#sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: -200%;
    z-index: 19;
    width: 360px;
    height: 100%;
    padding: 0.5rem;
    background-color: #fff;
    box-shadow: #0000003d 0px 3px 8px;
    transition: 0.5s;
}

#sidebar .stick-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: fit-content;
    padding: 0.5rem;
}

@media screen and (max-width: 576px) {
    #sidebar {
        width: 100%;
    }
}

#sidebar.visible {
    left: 0;
}

.bottom-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000099;
    opacity: 0.2s;
}

.bottom-panel .content {
    display: block;
    position: absolute;
    bottom: -200%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 576px;
    height: 45vh;
    background-color: #fff;
    padding: 0 1rem;
    overflow-y: auto;
    border-radius: 1.5rem 1.5rem 0 0;
    transition: 0.5s;
}

.bottom-panel.active {
    opacity: 1;
}

.bottom-panel.active .content {
    bottom: 0;
}

#install-prompt {
    display: block;
    position: fixed;
    left: 0;
    bottom: -200%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 21;
    transition: 0.5s;
}

#install-prompt.active {
    bottom: 0;
}

#install-prompt .wrapper {
    display: block;
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem;
}

#install-prompt img {
    display: block;
    width: 70px;
    margin: 0 auto 1.5rem;
}

#install-prompt .title {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

#install-prompt hr {
    display: block;
    width: 100px;
    border: none;
    border-top: 5px solid var(--app-color-primary);
    margin: 1rem auto 2.5rem;
    opacity: 1;
}

#install-prompt .step {
    color: #555;
    text-align: justify;
    font-size: 1rem;
}

#install-prompt .step:not(:last-child) {
    margin-bottom: 1.5rem;
}

#install-prompt .step-mark {
    padding: 0 0.5rem;
    border-radius: 0.25rem;
    background-color: var(--app-color-primary);
    color: #fff;
    white-space: nowrap;
}

#install-prompt button {
    display: block;
    width: 100%;
    margin-top: 2.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: none;
    background-color: var(--app-color-primary);
    color: #fff;
}

.print-container {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #fff !important;
    overflow-y: auto !important;
    font-size: 90% !important;
}

.print-container .hide-in-print {
    display: none !important;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    height: 100%;
    border: none;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.video-badge {
    background: var(--accent-color);
    color: white;
}

.text-badge {
    background: var(--primary-color);
    color: white;
}

.course-content {
    padding: 20px;
}

.course-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.meta-item i {
    margin-left: 5px;
    font-size: 1.1rem;
}

.course-price {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.price-unit {
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-more-info {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-more-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

.section-header {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}

.course-detail-header {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.course-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    height: 300px;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-info-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}
#course-info-card {
    display: none;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: var(--text-color);
    font-weight: 600;
}

.section-title {
    position: relative;
    padding-right: 15px;
    margin-bottom: 25px;
    font-weight: 700;
    color: var(--text-color);
}

.section-title::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 25px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 10px;
}

.file-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.file-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-left: 15px;
    flex-shrink: 0;
}

.video-file {
    background: rgba(78, 84, 200, 0.1);
    color: var(--primary-color);
}

.text-file {
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-color);
}

.file-details {
    flex-grow: 1;
}

.file-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.file-meta {
    font-size: 0.85rem;
    color: #666;
}

.locked-file {
    opacity: 0.7;
    position: relative;
}

.locked-file::after {
    content: "\F46A";
    font-family: "bootstrap-icons";
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #ccc;
}

.back-button {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.back-button i {
    margin-right: 8px;
}

/* ticket */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    flex: 1;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab.active {
    border-bottom: 3px solid var(--app-color-primary);
    color: var(--app-color-primary-dark);
    background: white;
}

.tab:hover {
    background: #e8f4f8;
}

.tab i {
    margin-left: 8px;
}

.tickets-container {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.ticket-list {
    display: none;
}

.ticket-list.active {
    display: block;
}

.ticket-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--app-color-primary);
    transition: all 0.3s;
    cursor: pointer;
}

.ticket-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ticket-item.unread {
    border-left: 4px solid #ff6b6b;
    background: #fff5f5;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ticket-title {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
}

.ticket-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-open {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-closed {
    background: #f5f5f5;
    color: #9e9e9e;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.ticket-preview {
    color: #546e7a;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ticket-actions {
    display: flex;
    gap: 10px;
}

.ticket-btn {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-view {
    background: var(--app-color-primary);
    color: white;
}

.btn-view:hover {
    background: var(--app-color-primary-dark);
    color: white;
}

.btn-reply {
    background: var(--primary-color);
    color: white;
}

.btn-reply:hover {
    background: var(--app-color-primary-dark);
    color: white;
}

.new-ticket-form {
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.form-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--app-color-primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--app-color-primary-dark);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--app-color-primary);
    box-shadow: 0 0 0 3px rgba(26, 41, 128, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    background: linear-gradient(
        135deg,
        var(--app-color-primary),
        var(--primary-color)
    );
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.file-label {
    padding: 10px 15px;
    background: #e8f4f8;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.file-label:hover {
    background: #d1e7f0;
}

.file-name {
    color: #7f8c8d;
    font-size: 14px;
}

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 10px;
    }

    .ticket-actions {
        flex-wrap: wrap;
    }
}
