/* css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─── Fonts ─────────────────────────────── */

@font-face {
    font-family: IranSans;
    src: url("../asset/font/IRANSansWeb.woff2") format("woff2");
    font-display: swap;
}

/* ─── Base ─────────────────────────────── */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8 url('../asset/image/background.webp') center/cover no-repeat fixed;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rtl {
    direction: rtl;
    font-family: 'IranSans', 'Vazirmatn', 'Tahoma', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

p {
    text-align: justify;
}

main {
    flex: 1;
}

/* ─── Header ─────────────────────────────── */

.header {
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 20px;
}

.header-content {
    display: flex;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-bottom: 2px solid #484848;
    border-radius: 12px;
    padding: 0 30px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.12);
}

.header-banner {
    margin: 0 100px 0 30px;
    display: flex;
    align-items: center;
}

.header-banner img {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* ─── Hamburger ─────────────────────────── */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #334155;
    border-radius: 2px;
}

/* ─── Logo ─────────────────────────────── */

.logo img {
    display: block;
    max-width: 100%;
    height: 100px;
    width: auto;
    object-fit: contain;
    padding-top: 15px;
}

/* ─── Navigation ────────────────────────── */

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: 28px;
    margin-right: auto;
}

.rtl .nav {
    margin-right: 28px;
    margin-left: auto;
}

.nav a {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav a:hover {
    color: #999999;
}

/* ─── Language Switch ───────────────────── */

.lang-switch a {
    padding: 5px 10px;
    background: linear-gradient(135deg, #484848, #7e7e7e);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.lang-switch a:hover {
    background: #999999;
}

.current-lang {
    padding: 5px 10px;
    background: #b5b5b5;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
}

/* ─── Sections ─────────────────────────── */

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 45px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 55px;
    height: 4px;
    background: linear-gradient(90deg, #484848, #7e7e7e);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ─── Footer ───────────────────────────── */

.footer {
    max-width: 1200px;
    margin: 16px auto 30px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.93);
    border: 1px solid #1e3a8a;
    padding: 40px 40px 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.footer-info p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 6px;
}

/* fix direction for email */

.footer-info p:nth-of-type(2) {
    direction: ltr;
    unicode-bidi: embed;
}

.rtl .footer-info p:nth-of-type(2) {
    text-align: right;
}

/* Social */

.social-links {
    position: absolute;
    top: 0;
    left: 50%;
    right: 60%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 14px;
}

.social-links img {
    width: 36px;
    transition: transform 0.3s, opacity 0.3s;
}

.social-links img:hover {
    transform: scale(1.15);
    opacity: 1;
}

.social-links a {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    white-space: nowrap;
}

.social-links a:hover .tooltip {
    opacity: 1;
}

/* Copyright */

.copyright {
    text-align: center;
    color: #475569;
    font-size: 13px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
}

/* ─── Responsive ───────────────────────── */

@media (max-width: 768px) {

    /* Header */

    .header {
        padding: 6px 12px;
    }

    .header-content {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0;
    }

    /* Logo */

    .logo {
        position: absolute;
        left: 50%;
        top: 63%;
        transform: translate(-50%, -50%);
        order: unset;
    }

    .logo img {
        height: 60px;
        width: auto;
    }

    .header-banner {
        display: none !important;
    }

    /* Language switch */

    /* Language switch - mobile */
    .lang-switch {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: 8px;
    }

    .lang-switch a,
    .lang-switch .current-lang {
        font-size: 9px;
        padding: 3px 7px;
        border-radius: 4px;
        min-width: 26px;
        text-align: center;
    }

    .lang-switch a {
        background: linear-gradient(135deg, #484848, #7e7e7e);
        color: #fff;
        text-decoration: none;
        box-shadow: none;
    }

    .lang-switch .current-lang {
        background: #b5b5b5;
    }

    .rtl .lang-switch {
        margin-left: 0 !important;
        margin-right: 8px !important;
    }


    /* Hamburger */

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        border: none;
        background: none;
        cursor: pointer;
        order: 1;
        margin-left: 10px;
        margin-right: 10px;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #000;
        display: block;
    }

    /* Mobile Navigation */

    .nav {
        position: absolute;
        top: 100%;
        left: 10px;
        display: flex;
        flex-direction: column;
        text-align: center;
        width: fit-content;
        min-width: 160px;
        padding: 12px 24px;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.85);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.25s ease;
    }

    .rtl .nav {
        right: 10px;
        left: auto;
    }

    .rtl .nav a {
        text-align: right;
    }

    .nav.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav a {
        padding: 16px 0;
        display: block;
        font-size: 15px;
        font-weight: 600;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .nav a:hover {
        background: rgba(72, 72, 72, 0.06);
    }

    /* Sections */

    .section {
        margin: 10px 12px;
        padding: 10px;
        border-radius: 12px;
    }

    .section-title {
        font-size: 24px;
    }

    /* Footer */

    .footer {
        width: 98%;
        margin: 10px 5px 20px;
        padding: 30px 20px 16px;
        border-radius: 12px;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 18px;
        justify-content: center;
        align-items: center;
    }

    .footer-info p:nth-of-type(2),
    .footer-info p:nth-of-type(3),
    .rtl .footer-info p:nth-of-type(2),
    .rtl .footer-info p:nth-of-type(3) {
        text-align: center;
    }

    .social-links {
        position: static;
        transform: none;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }

    .social-links img {
        width: 24px;
        height: 24px;
    }

    .tooltip {
        bottom: -24px;
        font-size: 11px;
    }

}