@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Thin.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Thin.ttf') format('ttf');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-ExtraLight.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-ExtraLight.ttf') format('ttf');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Light.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Light.ttf') format('ttf');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Regular.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Regular.ttf') format('ttf');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Medium.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Medium.ttf') format('ttf');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-SemiBold.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-SemiBold.ttf') format('ttf');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Bold.ttf') format('ttf');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-ExtraBold.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-ExtraBold.ttf') format('ttf');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Black.woff2') format('woff2'),
        url('../fonts/vazir/Vazir-Black.ttf') format('ttf');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --background: #FFFFFF;
    --secondry-background: #17375e;
    --text: #616161;
    --text-light: #FFFFFF;
    --title: #0A2342;
    --title-light: #FFFFFF;
    --subtitle: #D4AF37;
    --button-background-dark: #0A2342;
    --button-background-dark-hover: #17375e;
    --button-text-dark: #FFFFFF;
    --button-background-light: #D4AF37;
    --button-background-light-hover: #e4c04c;
    --button-text-light: #181C25;
    --input--border: #0A2342;
    --active-nav-items: #17375e;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --info: #29B6F6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: vazir;
    outline: none;
}

html,
body {
    direction: rtl;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 0 !important;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}

p {
    font-size: 18px;
}

.text-primary {
    color: #16a3d7 !important;
}

.text-success {
    color: #1ac888 !important;
}

.text-warning {
    color: #ffb300 !important;
}

.text-danger {
    color: #e63946 !important;
}

.button {
    position: relative;
    border-radius: 12px;
    transition: 0.3s all;
    text-align: center;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: 0.3s all;
    padding: 6px 20px 6px 20px;
    color: var(--button-text-dark);
    background-color: var(--button-background-dark);
}

.button:hover {
    transition: 0.3s all;
    background-color: var(--button-background-dark-hover) !important;
}

.button-has-icon {
    padding: 10px 25px 10px 50px !important;
}

.button i {
    position: relative;
    top: 3px;
    right: 0;
}

section .section-title {
    color: var(--title);
    font-weight: 800;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: #17375e !important;
}

.text-primary {
    color: #1a385d !important;
}

/* Search Box */
.search-box {
    max-width: 900px;
    margin: 0 auto;
}

.search-box input,
.search-box select {
    height: 48px;
}

/* Courses Index */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.course-card img {
    height: auto;
    object-fit: cover;
}

.course-card .badge {
    z-index: 2;
    font-size: 0.75rem;
    backdrop-filter: blur(6px);
    background: #0c2441 !important;
}

@media (max-width: 767.98px) {
    .input-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .input-group-text,
    .form-control,
    .form-select {
        width: 100% !important;
    }

    .form-select {
        margin-top: 8px;
    }
}

/* Single Course */
.course-sidebar ul li i {
    color: var(--bs-primary);
}

.course-sidebar {
    background: #fff;
}

.nav-tabs .nav-link.active {
    background-color: var(--bs-primary);
    color: #fff !important;
}

.nav-tabs .nav-link {
    color: #666;
    font-weight: 500;
}

.course-teacher .hover-shadow {
    transition: all 0.3s ease;
}

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

.course-teacher img {
    width: 120px;
    height: 120px;
    object-fit: scale-down;
}

.course-sidebar .text-decoration-line-through {
    opacity: 0.8;
    font-size: 0.9rem;
}

.course-sidebar .text-success {
    font-size: 1rem;
    font-weight: 700;
}

.course-sidebar .text-danger {
    font-weight: 600;
}

/* Pagination */
.page-item:first-child .page-link {
    border-radius: 0px 5px 5px 0px;
}

.page-item:last-child .page-link {
    border-radius: 5px 0px 0px 5px;
}

/* Navbar */
nav.navbar {
    height: 72px !important;
    transition: 0.3s all;
}

nav.scrolled {
    background: var(--background) !important;
    box-shadow: 0 0 5px #1e42652e;
    transition: 0.3s all;
}

nav.navbar .nav-item {
    margin: 0 10px;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
    color: var(--active-nav-items);
    font-weight: 800;
}

nav.navbar .call-to-actions {
    position: relative;
}

nav.navbar .call-to-actions .button {
    position: relative;
    z-index: 2;
    width: 130px;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.3s all;
    padding: 8px 25px 8px 25px;
    color: var(--button-text-dark);
    background-color: var(--button-background-dark);
}

nav.navbar .call-to-actions .button:hover {
    transition: 0.3s all;
    background-color: var(--button-background-dark-hover);
}

nav.navbar .navbar-brand img {
    width: 125px;
}

@media (min-width: 992px) {
    nav.navbar .navbar-nav {
        flex-direction: unset;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    nav .container {
        padding-right: 0;
        padding-left: 0;
    }

    nav .navbar-toggler {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    nav.navbar .navbar-nav {
        margin-top: 64px;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100%;
        text-align: right;
        background-color: #fff;
        padding: 10px 25px;
        box-shadow: 0 8px 20px #ccc;
    }

    nav.navbar .nav-item {
        margin: 5px 0 !important;
        width: 100%;
    }

    nav.navbar .call-to-actions {
        margin-top: 10px;
        text-align: center;
        position: absolute;
        top: 5px;
        left: 10px;
        width: fit-content;
    }
}

/* Home - Hero */
#home {
    margin-top: 100px;
    height: fit-content;
    align-items: end;
    display: flex;
    padding: 30px;
}

#home::before {
    content: ' ';
    background: url(../images/hero-pattern.png);
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    z-index: -2;
}

#home .hero .hero-content h1 {
    margin-top: 40px;
}

#home .hero .hero-content .bold-text-1,
#home .hero .hero-content .bold-text-2 {
    font-weight: 800;
}

#home .hero .hero-content .bold-text-1 {
    color: var(--title);
}

#home .hero .hero-content .bold-text-2 {
    color: var(--subtitle);
}

#home .hero .hero-content .float-images .hero-banner img {
    width: 100%;
}

/* Home - Categories */
#categories {
    margin-top: 110px;
}

#categories::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 150px;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 15%, rgba(255, 255, 255, 0) 100%);
    bottom: -30px;
    z-index: -1;
}

#categories .nav.nav-pills {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

#categories .nav.nav-pills .nav-item {
    flex: 0 0 auto;
}

#categories .nav.nav-pills .nav-link {
    white-space: nowrap;
}

#categories .nav-pills .nav-link {
    margin-left: 20px;
    color: var(--button-text-light);
    position: relative;
    transition: 0.3s all;
    text-align: center;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.3s all;
    padding: 6px 20px 6px 20px;
}

#categories .nav-pills .nav-link.active {
    color: var(--button-text-dark);
    background-color: var(--button-background-dark);
}

#categories .nav-pills .nav-link.more {
    color: var(--button-text-dark);
}

#categories .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#categories .card-img-top {
    height: 250px;
    background-size: cover !important;
    background-position: center !important;
    border: 1px solid #f5f5f5;
}

#categories .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#categories .card-body p {
    text-align: justify;
    flex-grow: 1;
    margin-bottom: 1rem;
}

#categories .card-body .mt-auto {
    margin-top: auto !important;
}

/* Home - Features */
#features .service-card {
    background: #fff;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#features .service-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#features .icon-box i {
    transition: transform 0.4s ease;
}

#features .service-card:hover .icon-box i {
    transform: scale(1.2) rotate(-5deg);
}

/* Home - Teachers */
#teachers .teacher-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    aspect-ratio: 1/1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#teachers .teacher-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

#teachers .teacher-photo {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

#teachers .teacher-photo img {
    position: absolute;
    top: 4px;
    right: 50%;
    width: 200px;
    height: 200px;
    transform: translate(50%, 0px);
}

@media (max-width: 576px) {
    #teachers .teacher-card {
        aspect-ratio: 1 / 1.4;
        padding: 0px !important;
    }

    #teachers .teacher-photo {
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
    }

    #teachers .teacher-photo img {
        width: 173px;
        height: 150px;
        object-fit: cover;
        transition: transform 0.3s ease;
        position: absolute;
        top: 4px;
        right: 4px;
        transform: none;
    }

    #teachers .teacher-card:hover {
        transform: unset;
        box-shadow: none;
    }

    #teachers .teacher-card small {
        padding: 0 5px;
    }
}

@media (min-width:577px) and (max-width: 1400px) {
    #teachers .teacher-card {
        aspect-ratio: 1 / 1.4;
        padding: 0px !important;
    }

    #teachers .teacher-photo img {
        width: 200px;
        height: 200px;
    }
}

/* Home - Highlights */
#highlights .carousel-3d {
    perspective: 1000px;
    width: 100%;
    height: 460px;
    position: relative;
}

#highlights .carousel-card {
    position: absolute;
    top: 0;
    left: 50%;
    width: 400px;
    max-width: 90vw;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.8s ease, opacity 0.8s ease;
    opacity: 0;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#highlights .carousel-card.active {
    opacity: 1;
    transform: translateX(-50%) translateZ(0) scale(1);
    z-index: 3;
    pointer-events: auto;
}

#highlights .carousel-card.prev {
    opacity: 0.6;
    transform: translateX(-150%) translateZ(-100px) scale(0.85);
    z-index: 2;
}

#highlights .carousel-card.next {
    opacity: 0.6;
    transform: translateX(50%) translateZ(-100px) scale(0.85);
    z-index: 2;
}

#highlights .carousel-card.far {
    opacity: 0;
    transform: translateX(-50%) translateZ(-300px) scale(0.7);
    z-index: 1;
}

#highlights #highlightsCarousel {
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    #highlights .carousel-card {
        width: 320px;
    }
}

@media (max-width: 576px) {
    #highlights .carousel-card {
        width: 280px;
    }

    #highlights #highlightsCarousel {
        padding-bottom: 10rem;
    }
}

/* Sub Pages Hero */
.page-hero {
    min-height: 320px;
    background: linear-gradient(200deg, #1a385d00 0%, #1a385d 85%);
    overflow: hidden;
}

.page-hero .overlay {
    background: rgba(0, 0, 0, 0.25);
}

.page-hero h1,
.page-hero p {
    position: relative;
    z-index: 2;
}

.page-hero .hero-wave {
    bottom: -1px;
}

/* Contact */
.contact-card .icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

.contact-card a {
    transition: color 0.2s ease;
}

.contact-card a:hover {
    color: var(--bs-primary);
}

.btn-outline-secondary {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-secondary:hover {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

/* Footer */
footer {
    position: relative;
    padding-top: 30px;
    background: #ffffff;
}

footer::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 150px;
    background: linear-gradient(0deg, rgb(228 228 228 / 36%) 15%, rgba(255, 255, 255, 0) 100%);
    top: -65px;
    z-index: -1;
}

footer .footer-top {
    padding-bottom: 20px;
}

footer .footer-top .first-part {
    padding: 0 15px;
}

footer .footer-top .first-part .logo {
    width: 200px;
    margin-bottom: 20px;
}

footer .footer-top .first-part h5 {
    margin-bottom: 20px;
}

footer .footer-top .first-part p {
    margin-bottom: 0;
    font-size: 1rem;
}

footer .footer-top .second-part .trust-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer .footer-top .second-part .trust-logo img {
    width: 100px;
    height: 100px;
    border-radius: 100px;
    margin: 0 15px;
    border: 1px solid #ededed;
    box-shadow: 0 0 3px #ededed;
}

footer .footer-top .second-part .social-network {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 25px 0 0px 0;
    justify-content: center;
    padding: 0;
}

footer .footer-top .second-part .social-network a {
    font-size: 30px;
    color: #17375e;
    margin: 0 15px;
    transition: 0.3s all;
}

footer .footer-top .second-part .social-network a:hover {
    color: #0A2342;
    transition: 0.3s all;
}

footer .footer-bottom {
    background-color: var(--secondry-background);
    padding: 15px 20px;
    display: flex;
    justify-content: start;
    align-items: center;
    color: var(--text-light);
}

footer .footer-bottom p {
    font-size: 15px;
    margin: 0 !important;
}

@media (max-width: 576px) {
    footer .footer-top .second-part .trust-logo {
        margin-top: 30px;
    }
}