/* ==============================
   GLOBAL STYLE - RAYATECH SITE
   Optimized by GPT-5 ✨
   ============================== */

/* --- Font Import --- */
@font-face {
    font-family: 'vazir';
    src: url(../fonts/Vazir.woff);
}

/* ============================== VARIABLES ============================== */
:root {
    --bg: #41255a;
    --panel: #1e1e62;
    --muted: #A6A9B3;
    --text: #EEF0F5;
    --primary-1: #2a55ed;
    /* blue */
    --primary-2: #531ec5;
    /* purple */
    --primary-3: #2a54ed6e;
    --primary-3: #2a54ed6e;
    --primary-4: #531ec55f;
    --primary-5: #692092b3;
    --primary-6: #9111dc;
    --accent: #FFBF2E;
    /* gold */
    --glass: rgba(255, 255, 255, 0.04);
    --glass-2: rgba(123, 60, 255, 0.06);
    --radius-lg: 20px;
    --radius-md: 12px;
    --maxw: 1200px;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.4s cubic-bezier(.4, 0, .2, 1);
    --header-height: 100px;

}

/* ============================== RESET ============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--bg), #030305a0 120%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
    overflow-x: hidden;
}

/* ============================== GLOBAL ELEMENTS ============================== */
img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================== HEADER ============================== */
.site-header {
    background: linear-gradient(180deg, rgba(26, 26, 116, 0.153), rgba(70, 18, 103, 0.186));
    position: fixed;
    top: 5px;
    /* فاصله از بالا برای جلوه‌ی شناور */
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    border: 0.1px solid #1c1037;
    border-radius: 15px;
    transition: var(--transition-slow);
}

/* حالت استیکی موقع اسکرول */
.site-header.sticky {
    backdrop-filter: blur(6px);
    background: linear-gradient(180deg, rgba(26, 26, 116, 0.21), rgba(70, 18, 103, 0.454));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 0.1px solid #1c1037;
    padding: 10px 0;
    top: 5px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ============================== BRAND ============================== */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand__logo {
    width: 54px;
    height: 54px;
    border: 2px solid #7B3CFF;
    border-radius: 10px;
    object-fit: cover;
    padding: 6px;
    box-shadow: 0 6px 24px rgba(123, 60, 255, 0.12),
        inset 0 -6px 14px rgba(0, 0, 0, 0.25);
}

.brand__texts {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand__academy {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.6px;
    color: var(--text);
}

.brand__name {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 300;
}

/* ============================== NAVIGATION ============================== */
.main-nav {
    flex: 1;
    margin: 0 12px 0 32px;
    /* منو کمی نزدیک‌تر به لوگو */
}

.main-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.main-nav__item {
    position: relative;
}

.main-nav__item a,
.main-nav__item>span {
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition-fast);
    font-weight: 500;
}

.main-nav__item a:hover,
.main-nav__item>span:hover {
    color: white;
    transform: translateY(-3px);
    background: linear-gradient(90deg, rgba(127, 90, 255, 0.08), rgba(47, 91, 255, 0.05));
}

/* ============================== MEGA MENU ============================== */
/* ============================== MEGA MENU ============================== */
.mega-menu {
    position: absolute;
    right: 0;
    /* خط جداکننده سمت راست */
    top: 48px;
    background: rgba(25, 25, 35, 0.392);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    /* اندازه ستون با محتوا */
    gap: 24px;
    /* فاصله بین دو ستون */
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: var(--transition-slow);
    overflow: visible;
    z-index: 1000;
}

/* نمایش هنگام هاور با اسلاید آپ */
.main-nav__item:hover .mega-menu,
.main-nav__item:focus-within .mega-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: fit-content;
}

/* ستون اول: دسته‌ها یا خدمات طراحی */
.mega-menu .col:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    /* فقط بین دو ستون */
    padding-left: 12px;
}

/* لینک‌ها */
.mega-menu a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition-fast);
    position: relative;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* افکت هاور: حرکت به چپ و خط بنفش سمت راست */
.mega-menu a:hover {
    color: var(--text);
    transform: translateX(-6px);
    background: rgba(255, 255, 255, 0.04);
}

.mega-menu a::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, var(--primary-1), var(--primary-2));
    border-radius: 4px;
    transition: var(--transition-fast);
    opacity: 0;
}

.mega-menu a:hover::before {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
}

/* تیتر ستون‌ها */
.mega-menu h4 {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

/* ستون دوم بدون هیچ border اضافی */
.mega-menu .col:last-child {
    border-left: none;
    padding-left: 0;
}

/* ============================== BUTTONS ============================== */
.btn {
    all: unset;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text);
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
}

.btn--primary {
    background: linear-gradient(90deg, var(--primary-2), var(--primary-1));
    color: #fff;
    border: 1.5px solid #3c2388;
    box-shadow: 0 0 18px rgba(123, 60, 255, 0.3);
}

.btn--primary:hover {
    box-shadow: 0 0 28px rgba(123, 60, 255, 0.6);
    transform: translateY(-2px) scale(1.04);
}

.menu-toggle {
    display: none;
    background: transparent;
    font-size: 20px;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 768px) {
    .main-nav__list {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}