﻿/* ========== Vazir Font ========== */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ========== Root Variables ========== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --header-bg: #ffffff;
    --nav-bg: #0d6efd;
    --footer-bg: #212529;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ========== Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    /* RTL Support */
    body[dir="rtl"] {
        text-align: right;
    }

    body[dir="ltr"] {
        text-align: left;
    }

/* ========== Base Class ==============*/
a {
    color: #0077cc;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* ========== Header Styles ========== */
.site-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

    .logo-link:hover {
        opacity: 0.8;
    }

.logo-img {
    max-width: 200px;
    height: auto;
}

[dir="rtl"] .logo-img {
    margin-left: 10px;
    margin-right: 5px;
}

[dir="ltr"] .logo-img {
    margin-left: 5px;
    margin-right: 10px;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* User Menu */
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    min-width: 200px;
    background: white;
    border: 1px solid rgba(0,0,0,.1);
    z-index: 1050;
    right: 0;
    left: auto;
}

    .user-dropdown-menu.show {
        display: block;
    }

[dir="rtl"] .user-dropdown-menu {
    right: auto;
    left: 0;
}

/* Search Box */
.search-box {
    position: relative;
}

    .search-box input {
        padding-right: 45px;
        border-radius: var(--border-radius);
        border: 2px solid #e0e0e0;
        transition: var(--transition);
    }

[dir="rtl"] .search-box input {
    padding-right: 15px;
    padding-left: 45px;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
}

[dir="rtl"] .btn-search {
    right: auto;
    left: 5px;
}

/* User Menu */
.btn-user {
    background-color: var(--light-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 8px 15px;
    font-weight: 500;
    transition: var(--transition);
}

    .btn-user:hover {
        background-color: var(--primary-color);
        color: white;
    }

.dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: none;
    margin-top: 10px;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

.dropdown-item {
    padding: 10px 20px;
    transition: var(--transition);
}

    .dropdown-item:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

    .dropdown-item i {
        width: 20px;
    }

[dir="rtl"] .dropdown-item i {
    margin-left: 10px;
}

[dir="ltr"] .dropdown-item i {
    margin-right: 10px;
}

/* ========== Navigation Menu ========== */
.main-nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

.nav-menu > li {
    position: relative;
}

    .nav-menu > li > a {
        display: block;
        padding: 15px 20px;
        color: white;
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
    }

        .nav-menu > li > a:hover,
        .nav-menu > li > a.active {
            background-color: rgba(255,255,255,0.1);
        }

        .nav-menu > li > a i {
            font-size: 1.1rem;
        }

[dir="rtl"] .nav-menu > li > a i {
    margin-left: 5px;
}

[dir="ltr"] .nav-menu > li > a i {
    margin-right: 5px;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

/* Dropdown in Nav */
.nav-menu .dropdown-menu {
    background-color: white;
    min-width: 200px;
}

.nav-menu .dropdown-item {
    color: var(--dark-color);
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Mobile Menu */
.mobile-menu {
    background-color: var(--light-color);
    padding: 15px 0;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .mobile-nav-list li {
        border-bottom: 1px solid #e0e0e0;
    }

        .mobile-nav-list li a {
            display: block;
            padding: 12px 15px;
            color: var(--dark-color);
            text-decoration: none;
            transition: var(--transition);
        }

            .mobile-nav-list li a:hover {
                background-color: var(--primary-color);
                color: white;
            }

/* ========== Language Switcher ============*/
.language-switcher {
    display: flex;
    align-items: center;
    /*    gap: 10px;
    padding: 10px;
*/
}

    .language-switcher a {
        padding: 2px 2px;
        border: 1px solid #ddd;
        border-radius: 10px;
        text-decoration: none;
        text-align: center;
        color: #333;
    }

        .language-switcher a.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

.nav-lang-fixed {
    width: 70px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem !important;
    padding: 0 4px;
}

.nav-auth-fixed {
    width: 110px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem !important;
    padding: 0 4px;
}

/* ========== Main Content ========== */
.main {
    flex: 1;
    padding: 30px 0;
}

/* ========== Footer Styles ========== */
.footer {
    flex-shrink: 0;
    /*position: absolute;*/
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    list-style: none;
    padding: 0;
}

    .footer h5 {
        color: white;
        font-weight: bold;
        margin-bottom: 20px;
        font-size: 1.2rem;
    }

    .footer li {
        margin-bottom: 10px;
    }

    .footer a {
        color: #adb5bd;
        text-decoration: none;
        transition: var(--transition);
    }

        .footer a:hover {
            color: cadetblue;
        }

/*[dir="rtl"] .footer a::before {
    content: "◄ ";
    margin-left: 5px;
}

[dir="ltr"] .footer a::before {
    content: "► ";
    margin-right: 5px;
}
*/
/* ====== Contact Info ========= */
.contact-info {
    list-style: none;
    padding: 0;
}

    .contact-info li {
        margin-bottom: 12px;
        display: flex;
        align-items: center;
    }

    .contact-info i {
        color: var(--primary-color);
        font-size: 1.2rem;
        width: 25px;
    }

[dir="rtl"] .contact-info i {
    margin-left: 10px;
}

[dir="ltr"] .contact-info i {
    margin-right: 10px;
}
/* ========= Search Group ========== */
.search-group {
    display: flex;
}

[dir="rtl"] .search-group {
}

    [dir="rtl"] .search-group .form-control {
        direction: rtl;
        text-align: right;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-top-right-radius: 0.25rem !important;
        border-bottom-right-radius: 0.25rem !important;
    }

    [dir="rtl"] .search-group .btn {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-top-left-radius: 0.25rem !important;
        border-bottom-left-radius: 0.25rem !important;
    }

[dir="ltr"] .search-group {
    flex-direction: row;
}

    [dir="ltr"] .search-group .form-control {
        border-top-left-radius: 0.25rem !important;
        border-bottom-left-radius: 0.25rem !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        text-align: left;
        direction: ltr;
    }

    [dir="ltr"] .search-group .btn {
        border-top-right-radius: 0.25rem !important;
        border-bottom-right-radius: 0.25rem !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }


/* ========= Social Link ========== */
.social-links {
    margin-top: 15px;
}

    .social-links a {
        display: inline-block;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        background-color: rgba(255,255,255,0.1);
        color: white;
        border-radius: 50%;
        margin: 0 5px;
        transition: var(--transition);
        font-size: 1.2rem;
    }

        .social-links a:hover {
            background-color: var(--primary-color);
            transform: translateY(-3px);
        }

/*.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0 20px;
}
*/

.copyright {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* ========== Utility Classes ========== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.shadow {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

.transition {
    transition: var(--transition) !important;
}

/* ========== Responsive Design ============= */
@media (max-width: 768px) {
    .site-name {
        font-size: 1.2rem;
    }

    .nav-menu {
        display: none;
    }

    .main-content {
        padding: 20px 0;
    }

    .site-footer {
        text-align: center;
    }

    [dir="rtl"] .site-footer,
    [dir="ltr"] .site-footer {
        text-align: center;
    }

    .hero-slider .carousel-item {
        height: 400px;
    }

    .hero-slider .carousel-caption h1 {
        font-size: 2rem;
    }

    .hero-slider .carousel-caption p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .logo-img {
        max-width: 120px;
    }
}

/*Social-Floating-Bar*/
.social-floating-bar {
    position: fixed;
    top: 50%;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%);
}

.social-bar-left {
    left: 0;
    align-items: flex-start;
}

.social-bar-right {
    right: 0;
    align-items: flex-end;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1.3rem;
    text-decoration: none;
    transform-origin: left center;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-bar-left .social-link {
    transform-origin: left center;
    border-radius: 0 0.65rem 0.65rem 0;
}

.social-bar-right .social-link {
    transform-origin: right center;
    border-radius: 0.65rem 0 0 0.65rem;
}

.social-link:hover,
.social-link:focus-visible {
    transform: scaleX(1.05);
    filter: brightness(0.9);
    color: #fff !important;
    outline: none;
}

.social-logo {
    width: 27px;
    height: 27px;
    display: block;
    object-fit: contain;
}

.social-instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.social-telegram {
    background-color: #229ed9;
}

.social-linkedin {
    background-color: #0a66c2;
}

.social-aparat {
    background-color: #fc5d91;
}

.social-bale {
    background-color: #3ee871;
}

.social-rubika {
    background-color: #ac56ea;
}

.contact-floating-btn {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 1040;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 12px rgb(0 0 0 / 25%);
    cursor: pointer;
    font-size: 1.35rem;
    transition: transform 160ms ease, background-color 160ms ease;
}

    .contact-floating-btn:hover,
    .contact-floating-btn:focus-visible {
        background-color: #0b5ed7;
        transform: scale(1.08);
    }

@media (max-width: 767.98px) {
    .social-floating-bar {
        top: auto;
        bottom: 10rem;
        transform: none;
    }

    .social-link {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

        .social-link:hover,
        .social-link:focus-visible {
            transform: none;
        }

    .social-logo {
        width: 22px;
        height: 22px;
    }

    .contact-floating-btn {
        right: 14px;
        bottom: 6rem;
        width: 48px;
        height: 48px;
    }
}
