﻿/* ========================================
   Base
======================================== */

:root {
    --primary: #2156D8;
    --primary-dark: #1743AD;
    --secondary: #3674F0;
    --text: #003366;
    --text-light: #5B6472;
    --background: #ffffff;
    --background-soft: #F3F6FC;
    --border: #D9E2F2;
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 15px rgba(33, 86, 216, 0.08);
    --shadow-md: 0 10px 30px rgba(33, 86, 216, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    color: var(--text);
    background: var(--background);
    line-height: 1.8;
}

body > .site-main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

.container {
    width: min(100% - 40px, var(--container-width));
    margin-inline: auto;
}

/* ========================================
   Buttons
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
}

    .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

    .btn-outline:hover {
        color: #fff;
        background: var(--primary);
    }

/* ========================================
   Section
======================================== */

section {
    padding: 90px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

    .section-heading > span,
    .section-label {
        display: inline-block;
        margin-bottom: 8px;
        color: var(--primary);
        font-size: 14px;
        font-weight: 700;
    }

    .section-heading h2 {
        margin-bottom: 10px;
        font-size: 34px;
        line-height: 1.4;
    }

    .section-heading p {
        max-width: 650px;
        margin-inline: auto;
        color: var(--text-light);
        font-size: 15px;
    }

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    text-align: right;
}

    .section-heading-row .text-link {
        margin-bottom: 8px;
    }

.text-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

    .text-link:hover {
        color: var(--primary-dark);
    }
/* ========================================
   News Card
======================================== */

.news-section {
    background: #fff;
}

.news-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: 0.25s ease;
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

.news-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 22px;
}

.news-date {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
}

.news-content h3 {
    margin-bottom: 10px;
    font-size: 19px;
    line-height: 1.6;
}

.news-content p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 14px;
}

.news-content a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

/* ========================================
   Header
======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}


/* ========================================
   Logo
======================================== */

.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

    .site-logo:hover {
        opacity: 0.9;
    }

.site-logo-image {
    display: block;
    width: auto;
    height: 52px;
    object-fit: contain;
}

/* ========================================
   Authentication
======================================== */

.header-auth {
    display: flex;
    align-items: center;
}

.header-login {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 20px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    background: var(--primary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.25s ease;
}

    .header-login:hover {
        color: #ffffff;
        background: var(--primary-dark);
        transform: translateY(-2px);
    }


/* ========================================
   Language
======================================== */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.language-item {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: var(--text-light);
    transition: 0.2s ease;
}

    .language-item:hover,
    .language-item.active {
        color: var(--primary);
        font-weight: 700;
    }

.language-divider {
    color: #b7c0cb;
}
/* ========================================
   Pagination
======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    font-size: 13px;
    transition: 0.2s ease;
}

    .pagination-item:hover,
    .pagination-item.active {
        border-color: var(--primary);
        color: #ffffff;
        background: var(--primary);
    }

.pagination-next {
    padding-inline: 18px;
}

/* ========================================
   Navbar
======================================== */

.site-navbar {
    position: sticky;
    /* زیر هدر چسبان قرار می‌گیرد؛ ارتفاع واقعی هدر را site.js تنظیم می‌کند */
    top: var(--site-header-height, 83px);
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.navbar-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
}

.navbar-desktop {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 58px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 6px;
    width: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
    transition: width 0.25s ease;
}

.navbar-link:hover,
.navbar-link.is-active {
    color: var(--primary);
}

.navbar-link:hover::after,
.navbar-link.is-active::after {
    width: 100%;
}

.navbar-link.navbar-link-admin,
.mobile-menu-link.mobile-menu-link-admin {
    color: var(--primary);
}

/* ========================================
   Footer
======================================== */

.site-footer {
    background: #003366;
    color: #ffffff;
    padding-top: 65px;
}


/* ========================================
   Footer Main
======================================== */

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 50px;
    padding-bottom: 50px;
}


/* ========================================
   Footer About
======================================== */

.footer-about {
    max-width: 330px;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 20px;
}

    .footer-logo img {
        width: auto;
        height: 55px;
        object-fit: contain;
        background: #ffffff;
        padding: 6px 12px;
        border-radius: 8px;
    }

.footer-about p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 2;
}


/* ========================================
   Footer Title
======================================== */

.footer-title {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
}

    .footer-title::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 38px;
        height: 2px;
        border-radius: 5px;
        background: var(--primary);
    }


/* ========================================
   Footer Links
======================================== */

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 11px;
    list-style: none;
}

    .footer-links a {
        color: rgba(255, 255, 255, 0.72);
        font-size: 13px;
        transition: color 0.2s ease, padding-right 0.2s ease;
    }

        .footer-links a:hover {
            color: #ffffff;
            padding-right: 5px;
        }


/* ========================================
   Footer Contact
======================================== */

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .footer-contact .footer-title {
        margin-bottom: 5px;
    }

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(33, 86, 216, 0.35);
    font-size: 15px;
}

.footer-contact-item strong,
.footer-contact-item div span {
    display: block;
}

.footer-contact-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer-contact-item strong {
    margin-bottom: 2px;
    color: #ffffff;
    font-size: 12px;
}

.footer-contact-item div span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}


/* ========================================
   Footer Bottom
======================================== */

.footer-bottom {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

    .footer-bottom p {
        color: rgba(255, 255, 255, 0.6);
        font-size: 11px;
    }

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

    .footer-bottom-links a {
        color: rgba(255, 255, 255, 0.6);
        font-size: 11px;
        transition: color 0.2s ease;
    }

        .footer-bottom-links a:hover {
            color: #ffffff;
        }



/* ========================================
   Logged-in User
======================================== */

.header-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 4px 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background-soft);
    box-shadow: var(--shadow-sm);
}

.header-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding-inline: 11px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    direction: ltr;
}

.header-logout-form {
    margin: 0;
    padding: 0;
}

.header-logout {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 13px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: var(--primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .header-logout:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 5px 14px rgba(33, 86, 216, 0.18);
    }

    .header-logout:active {
        transform: translateY(0);
    }

    .header-logout:focus-visible {
        outline: 3px solid rgba(33, 86, 216, 0.18);
        outline-offset: 2px;
    }
