@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.0.0/Vazirmatn-Variable-font-face.css');

/* ==========================================================================
   Design Tokens — Organic Futurism × Editorial Luxury × Persian RTL
   ========================================================================== */

:root {
    --bg-main: #F8F3EB;
    --bg-soft: #EFE6D9;
    --surface: rgba(255, 253, 248, 0.78);
    --surface-solid: #FFFDF8;

    --text-primary: #1D2822;
    --text-secondary: #5E6961;
    --text-subtle: #899189;

    --sage: #7F927F;
    --sage-deep: #526756;
    --terracotta: #C96C4B;
    --terracotta-dark: #A84F35;
    --gold-muted: #B69259;

    --border-soft: rgba(55, 73, 62, 0.12);
    --border-light: rgba(255, 255, 255, 0.75);

    --shadow-sm: 0 8px 24px rgba(39, 53, 44, 0.07);
    --shadow-md: 0 20px 50px rgba(39, 53, 44, 0.12);
    --shadow-lg: 0 35px 90px rgba(39, 53, 44, 0.16);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 42px;

    --transition-fast: 180ms cubic-bezier(.2,.8,.2,1);
    --transition-base: 350ms cubic-bezier(.2,.8,.2,1);

    --container: 1180px;
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text-primary);
    line-height: 1.85;
    background:
        radial-gradient(circle at 12% 8%, rgba(201, 108, 75, 0.11), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(127, 146, 127, 0.18), transparent 34%),
        linear-gradient(145deg, var(--bg-main) 0%, #fffaf1 48%, var(--bg-soft) 100%);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.36;
    background-image:
        linear-gradient(rgba(29, 40, 34, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 40, 34, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

::selection {
    color: #fff;
    background: var(--terracotta);
}

/* ==========================================================================
   Header
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(calc(100% - 32px), var(--container));
    margin: 18px auto 0;
    padding: 12px 18px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 248, 0.74);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-sm);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 0 !important;
    color: var(--text-primary);
    font-weight: 900;
}

.header-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 10px 18px rgba(39, 53, 44, 0.12));
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: 4px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    cursor: pointer;
    color: var(--sage-deep);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 230, 217, 0.56));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    font-size: 24px;
    line-height: 1;
    transition:
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        background var(--transition-fast);
    z-index: 1001;
    position: relative;
}

.menu-toggle:hover {
    color: var(--terracotta-dark);
    border-color: rgba(201, 108, 75, 0.35);
    transform: translateY(-1px);
}

.menu-toggle.hidden {
    display: none !important;
}

.btn-login-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 20px;
    border: 1px solid rgba(201, 108, 75, 0.28);
    border-radius: 999px;
    color: var(--terracotta-dark);
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(239, 230, 217, 0.62));
    box-shadow: 0 10px 24px rgba(168, 79, 53, 0.09);
    font-size: 14px;
    font-weight: 850;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    flex-shrink: 0 !important;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
}

.btn-login-header:hover {
    color: #fff;
    background: linear-gradient(145deg, var(--terracotta), var(--terracotta-dark));
    box-shadow: 0 16px 32px rgba(168, 79, 53, 0.22);
    transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-section {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 32px), var(--container));
    margin: 28px auto 0;
    padding: clamp(34px, 5vw, 74px);
    gap: clamp(24px, 5vw, 70px);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.86) 0%, rgba(239, 230, 217, 0.72) 48%, rgba(248, 243, 235, 0.92) 100%);
    box-shadow: var(--shadow-lg);
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 18px;
    z-index: -2;
    border-radius: calc(var(--radius-xl) - 12px);
    border: 1px solid rgba(182, 146, 89, 0.18);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    left: -10%;
    top: -18%;
    z-index: -1;
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(182, 146, 89, 0.16), transparent 62%),
        radial-gradient(circle, rgba(201, 108, 75, 0.10), transparent 66%);
    filter: blur(2px);
    pointer-events: none;
}

.hero-content {
    flex: 1 1 0;
    max-width: 54%;
    text-align: right;
}

.hero-content h1 {
    margin-bottom: 18px;
    max-width: 720px;
    color: var(--text-primary);
    font-size: clamp(32px, 4.2vw, 58px);
    font-weight: 950;
    line-height: 1.32;
    letter-spacing: 0;
}

.hero-content p {
    max-width: 620px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: clamp(15px, 1.5vw, 19px);
    line-height: 2.05;
}

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    color: #fff;
    background:
        linear-gradient(145deg, var(--sage-deep), var(--sage)),
        linear-gradient(145deg, var(--terracotta), var(--terracotta-dark));
    box-shadow: 0 18px 38px rgba(82, 103, 86, 0.22);
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        filter var(--transition-fast);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: translateX(120%);
    transition: transform 700ms cubic-bezier(.2,.8,.2,1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(82, 103, 86, 0.28);
    filter: saturate(1.04);
}

.btn-primary:hover::after {
    transform: translateX(-120%);
}

.hero-image {
    flex: 0 1 44%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
}

.hero-section .hero-image > .editable-wrapper {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

.hero-image img {
    display: block;
    width: min(100%, 440px);
    margin-inline-start: auto;
    border-radius: 34px;
    object-fit: cover;
    box-shadow:
        0 30px 70px rgba(39, 53, 44, 0.16),
        0 0 0 1px rgba(255,255,255,0.7);
    transform: rotate(-1.2deg);
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.hero-section:hover .hero-image img {
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        0 40px 90px rgba(39, 53, 44, 0.20),
        0 0 0 1px rgba(255,255,255,0.78);
}

/* ==========================================================================
   Services
   ========================================================================== */

.services-section {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    padding: 78px 0 60px;
    text-align: center;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 46px;
    color: var(--text-primary);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 950;
    line-height: 1.5;
}

.section-title::after {
    content: '';
    position: absolute;
    right: 50%;
    bottom: -12px;
    width: 86px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--terracotta), var(--gold-muted), var(--sage));
    transform: translateX(50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    position: relative;
    min-height: 100%;
    padding: 26px 20px 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.74), rgba(239, 230, 217, 0.46));
    box-shadow: var(--shadow-sm);
    text-align: center;
    overflow: hidden;
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base),
        background var(--transition-base);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.8), transparent 38%),
        radial-gradient(circle at 50% 0%, rgba(127, 146, 127, 0.12), transparent 42%);
    opacity: 0.85;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201, 108, 75, 0.22);
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(239, 230, 217, 0.58));
    box-shadow: var(--shadow-md);
}

.service-card img {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    object-fit: contain;
    border-radius: 26px;
    filter: drop-shadow(0 14px 20px rgba(39, 53, 44, 0.11));
}

.service-card h3 {
    margin-bottom: 12px;
    color: var(--sage-deep);
    font-size: 19px;
    font-weight: 950;
    line-height: 1.55;
}

.service-card p {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 2;
}

.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta-dark);
    font-size: 13px;
    font-weight: 850;
    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
}

.read-more:hover {
    color: var(--sage-deep);
    transform: translateX(-3px);
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-overlay,
.signup-modal,
.modal,
body.is-admin .modal-editor {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 18px;
    background:
        radial-gradient(circle at 50% 20%, rgba(248, 243, 235, 0.24), transparent 42%),
        rgba(29, 40, 34, 0.48);
    backdrop-filter: blur(12px) saturate(120%);
}

.modal-box,
.signup-modal-content,
.modal-content,
body.is-admin .modal-editor-content {
    position: relative;
    width: min(92vw, 500px);
    padding: 34px 30px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(239, 230, 217, 0.88));
    box-shadow: var(--shadow-lg);
    animation: modalEnter 360ms cubic-bezier(.2,.8,.2,1);
}

.modal-content,
.signup-modal-content {
    max-width: 420px;
    text-align: center;
}

.modal-box h3,
.signup-modal-content h3,
.modal-content h2 {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 950;
    line-height: 1.55;
}

.signup-modal-content p,
.modal-content p,
.modal-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 2;
}

.close-signup,
.close-btn {
    position: absolute;
    top: 16px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-subtle);
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.close-signup:hover,
.close-signup:focus,
.close-btn:hover {
    color: #fff;
    background: var(--terracotta);
    transform: rotate(6deg);
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   User Menu
   ========================================================================== */

.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    cursor: pointer;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    min-width: 172px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-md);
}

.user-dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-align: center;
    font-size: 13px;
    font-weight: 850;
    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.user-dropdown-content a:hover {
    color: var(--terracotta-dark);
    background: rgba(201, 108, 75, 0.08);
}

.logout-link {
    color: #B5422F !important;
}

.show-dropdown {
    display: block !important;
}

/* ==========================================================================
   Right Sidebar
   ========================================================================== */

/* پس‌زمینه تار و تیره پشت منو */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(29, 40, 34, 0.20);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: 9998;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* پنل اصلی سایدبار */
.right-sidebar {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    max-width: calc(100vw - 26px);
    height: 100vh;
    background: linear-gradient(180deg, rgba(255,253,248,0.94), rgba(249,244,236,0.96));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: -18px 0 50px rgba(39,53,44,0.16);
    transition: right var(--transition-base);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(82,103,86,0.10);
}

/* باز شدن منو با کلاسی که در جاوااسکریپت فعلی شما استفاده می‌شود */
.right-sidebar.active-sidebar {
    right: 0;
}

/* هدر منو (عنوان و دکمه بستن) */
.sidebar-header {
    padding: 24px 22px 18px;
    border-bottom: 1px solid rgba(82,103,86,0.10);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* دکمه بستن منو */
.close-sidebar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(82,103,86,0.10);
    background: rgba(255,255,255,0.75);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-sidebar:hover {
    color: var(--terracotta-dark);
    border-color: rgba(169,79,53,0.24);
    transform: rotate(90deg);
}

/* منوی لیست لینک‌ها */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 18px 14px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li + li {
    margin-top: 6px;
}

/* لینک‌های منو با پشتیبانی از قابلیت ویرایش ادمین */
.sidebar-menu li a,
.sidebar-menu li .editable-wrapper > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary) !important;
    border-radius: 18px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none !important;
}

.sidebar-menu li a:hover,
.sidebar-menu li .editable-wrapper > a:hover {
    background: rgba(127,146,127,0.08);
    color: var(--sage-deep) !important;
    border-color: rgba(127,146,127,0.14);
    transform: translateX(-3px);
}

/* ==========================================================================
   Slider Carousel
   ========================================================================== */

.sliders-section {
    position: relative;
    width: 100%;
    margin-top: 54px;
    padding: 76px 0 70px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.28), rgba(239, 230, 217, 0.56));
}

.slider-title {
    margin-bottom: 38px;
    color: var(--text-primary);
    text-align: center;
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 950;
    line-height: 1.5;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 20px 0;
    overflow: hidden;
    cursor: grab;
}

.slider-wrapper:active {
    cursor: grabbing;
}

.unified-track {
    display: flex;
    gap: 28px;
    width: max-content;
    padding: 0 6vw;
    direction: rtl;
    transition: transform 0.5s ease-out;
    will-change: transform;
}

.uni-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    width: 900px;
    min-height: 420px;
    padding: 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    user-select: none;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.uni-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.52), transparent 42%),
        radial-gradient(circle at 85% 12%, rgba(255,255,255,0.36), transparent 32%);
}

.uni-card:hover {
    transform: translateY(-7px);
    border-color: rgba(182, 146, 89, 0.25);
    box-shadow: var(--shadow-lg);
}

.card-inner-single {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    height: 100%;
}

.single-text-side {
    flex: 1;
    text-align: right;
}

.single-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 9px 22px;
    border: 1px solid rgba(182, 146, 89, 0.34);
    border-radius: 999px;
    color: #7E6030;
    background: rgba(255, 253, 248, 0.52);
    box-shadow: 0 10px 22px rgba(182, 146, 89, 0.10);
    font-size: 20px;
    font-weight: 950;
}

.single-name {
    margin-bottom: 18px;
    font-size: 38px;
    font-weight: 950;
    line-height: 1.45;
}

.single-details {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 13px 0;
    opacity: 0.92;
    font-size: 19px;
    font-weight: 650;
}

.single-details i {
    color: currentColor;
    font-size: 22px;
}

.single-img-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.single-img {
    width: 100%;
    max-width: 320px;
    height: 320px;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,0.55);
    border-radius: 26px;
    box-shadow: 0 20px 40px rgba(39, 53, 44, 0.16);
    pointer-events: auto;
}

.uni-img-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.42);
    box-shadow: inset 0 6px 18px rgba(39, 53, 44, 0.08);
    font-size: 82px;
}

.card-inner-group {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.group-title {
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 15px;
    text-align: center;
    font-size: 28px;
    font-weight: 950;
    line-height: 1.5;
}

.group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 80px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.24;
    transform: translateX(-50%);
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    flex: 1;
    align-items: center;
}

.group-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 0;
    padding: 15px 10px;
    border: 1px solid rgba(255,255,255,0.62);
    border-radius: 18px;
    background: rgba(255,255,255,0.46);
    box-shadow: 0 8px 18px rgba(39, 53, 44, 0.06);
    text-align: center;
    transition:
        transform var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.group-person:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.84);
    box-shadow: 0 14px 26px rgba(39, 53, 44, 0.10);
}

.group-person-icon {
    margin-bottom: 10px;
    opacity: 0.74;
    font-size: 26px;
}

.group-person-name {
    width: 100%;
    margin-bottom: 6px;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.group-person-major {
    margin-bottom: 4px;
    opacity: 0.86;
    font-size: 12px;
    font-weight: 850;
}

.group-person-uni {
    opacity: 0.72;
    font-size: 11px;
    font-weight: 500;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(82, 103, 86, 0.24);
    cursor: pointer;
    transition:
        width var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.dot:hover {
    transform: translateY(-1px);
}

.dot.active {
    width: 32px;
    background: var(--terracotta);
}

/* Slider Themes */

.theme-gold {
    color: #4A3A1E;
    border-color: rgba(182, 146, 89, 0.26);
    background:
        linear-gradient(135deg, #FFF9EA 0%, #EEDAA7 100%);
}

.theme-blue {
    color: #203C42;
    border-color: rgba(127, 146, 127, 0.25);
    background:
        linear-gradient(135deg, #F7FBF6 0%, #D8E1D3 100%);
}

.theme-white {
    color: var(--text-primary);
    border-color: var(--border-light);
    background:
        linear-gradient(135deg, rgba(255,253,248,0.96), rgba(239,230,217,0.76));
}

.theme-green {
    color: #263B2D;
    border-color: rgba(82, 103, 86, 0.23);
    background:
        linear-gradient(135deg, #F5FAF1 0%, #C9D8C2 100%);
}

.theme-purple {
    color: #3A332C;
    border-color: rgba(201, 108, 75, 0.18);
    background:
        linear-gradient(135deg, #FFF5EE 0%, #E7C5B2 100%);
}

.theme-red {
    color: #4B2A22;
    border-color: rgba(201, 108, 75, 0.28);
    background:
        linear-gradient(135deg, #FFF6EF 0%, #E8B7A3 100%);
}

.theme-dark {
    color: #F8F3EB;
    border-color: rgba(255,255,255,0.16);
    background:
        linear-gradient(135deg, #526756 0%, #1D2822 100%);
}

.theme-dark .single-rank-badge {
    color: #F8E7C8;
    border-color: rgba(248, 231, 200, 0.34);
    background: rgba(255,255,255,0.10);
}

.theme-dark .group-person {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.10);
}

.theme-dark .group-person-name {
    color: #fff;
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */

body.is-admin .editable-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

body.is-admin .editable-wrapper:hover {
    outline: 2px dashed var(--terracotta);
    border-radius: 8px;
}

body.is-admin .edit-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(29, 40, 34, 0.12);
    border-radius: 50%;
    color: var(--text-primary);
    background: #F3C969;
    box-shadow: 0 8px 18px rgba(39, 53, 44, 0.16);
    cursor: pointer;
    font-size: 14px;
}

body.is-admin .modal-editor-content textarea,
body.is-admin .modal-editor-content input {
    width: 100%;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text-primary);
    background: rgba(255,255,255,0.78);
    font-family: inherit;
    outline: none;
}

body.is-admin .modal-editor-content textarea:focus,
body.is-admin .modal-editor-content input:focus {
    border-color: rgba(201, 108, 75, 0.42);
    box-shadow: 0 0 0 4px rgba(201, 108, 75, 0.10);
}

body.is-admin .admin-card-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: rgba(29, 40, 34, 0.82);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

body.is-admin .uni-card:hover .admin-card-controls {
    opacity: 1;
}

body.is-admin .admin-card-controls form {
    display: inline;
    margin-bottom: 2px;
}

body.is-admin .admin-card-controls button,
body.is-admin .admin-card-controls select {
    border: 0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 12px;
}

body.is-admin .admin-card-controls button {
    padding: 6px 9px;
    color: var(--text-primary);
    background: var(--surface-solid);
    cursor: pointer;
}

body.is-admin .admin-card-controls select {
    padding: 5px;
}

body.is-admin .admin-btns-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

body.is-admin .add-card-btn {
    border: none;
    border-radius: 999px;
    padding: 11px 22px;
    color: #fff;
    background: linear-gradient(145deg, var(--sage-deep), var(--sage));
    box-shadow: 0 16px 34px rgba(82, 103, 86, 0.22);
    font-family: inherit;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (min-width: 601px) and (max-width: 1200px) {
    header,
    .hero-section,
    .services-section {
        width: calc(100% - 40px);
        max-width: 1160px;
    }

    .hero-section {
        flex-flow: row nowrap !important;
        direction: rtl !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 24px auto !important;
        padding: 32px !important;
        gap: 28px !important;
        text-align: right !important;
    }

    .hero-section > .hero-content {
        order: 1 !important;
        flex: 1 1 0 !important;
        width: 50% !important;
        min-width: 0 !important;
        max-width: 50% !important;
        margin: 0 !important;
        text-align: right !important;
    }

    .hero-section > .hero-image {
        display: flex !important;
        order: 2 !important;
        flex: 1 1 0 !important;
        width: 50% !important;
        min-width: 0 !important;
        max-width: 50% !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .hero-section > .hero-image > .editable-wrapper {
        display: flex !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .hero-section > .hero-image img {
        width: min(100%, 300px) !important;
        max-width: 300px !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        object-fit: cover !important;
        margin: 0 !important;
    }

    .hero-section .hero-content h1 {
        font-size: clamp(24px, 3vw, 34px) !important;
        line-height: 1.5 !important;
        margin: 0 0 12px !important;
    }

    .hero-section .hero-content p {
        font-size: 15px !important;
        line-height: 1.9 !important;
        margin: 0 0 18px !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px !important;
    }

    .services-section {
        padding: 58px 0 50px !important;
    }
}

@media (max-width: 950px) {
    .uni-card {
        width: 750px !important;
        min-height: 380px !important;
        padding: 30px !important;
    }

    .card-inner-single {
        flex-direction: row !important;
        gap: 30px !important;
        align-items: center !important;
    }

    .single-text-side {
        text-align: right !important;
    }

    .single-name {
        font-size: 28px !important;
    }

    .single-details {
        font-size: 18px !important;
    }

    .single-img {
        max-width: 240px !important;
        height: 240px !important;
    }

    .group-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .group-person {
        padding: 10px 5px !important;
    }

    .group-person-name {
        font-size: 13px !important;
    }

    .group-person-major {
        font-size: 11px !important;
    }

    .group-person-uni {
        font-size: 9px !important;
    }
}

@media screen and (max-width: 600px) {
    body {
        line-height: 1.75;
    }

    header {
        width: calc(100% - 18px);
        margin-top: 9px;
        padding: 9px 10px;
        border-radius: 22px;
    }

    .header-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .header-right {
        gap: 8px;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        font-size: 21px;
    }

    .btn-login-header {
        min-height: 36px;
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    .hero-section {
        display: flex !important;
        flex-flow: row nowrap !important;
        direction: rtl !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: calc(100% - 18px) !important;
        margin: 12px auto 0 !important;
        padding: 20px 14px !important;
        gap: 10px !important;
        border-radius: 26px !important;
        text-align: right !important;
    }

    .hero-section::before {
        inset: 10px;
        border-radius: 18px;
    }

    .hero-section > .hero-content {
        order: 1 !important;
        flex: 1 1 0 !important;
        width: 50% !important;
        min-width: 0 !important;
        max-width: 50% !important;
        margin: 0 !important;
        text-align: right !important;
    }

    .hero-section > .hero-image {
        display: flex !important;
        order: 2 !important;
        flex: 1 1 0 !important;
        width: 50% !important;
        min-width: 0 !important;
        max-width: 50% !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .hero-section > .hero-image > .editable-wrapper {
        display: flex !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .hero-section > .hero-image img {
        width: min(100%, 150px) !important;
        max-width: 150px !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        object-fit: cover !important;
        margin: 0 !important;
        border-radius: 22px;
    }

    .hero-section .hero-content h1 {
        font-size: 18px !important;
        line-height: 1.55 !important;
        margin: 0 0 8px !important;
    }

    .hero-section .hero-content p {
        font-size: 11px !important;
        line-height: 1.8 !important;
        margin: 0 0 12px !important;
    }

    .btn-primary {
        min-height: 36px;
        padding: 7px 14px;
        font-size: 11.5px;
    }

    .services-section {
        width: calc(100% - 24px);
        padding: 46px 0 38px !important;
    }

    .section-title {
        margin-bottom: 34px;
        font-size: 22px;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    .service-card {
        padding: 18px 10px !important;
        border-radius: 22px;
    }

    .service-card img {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 10px !important;
        border-radius: 18px;
    }

    .service-card h3 {
        margin-bottom: 6px !important;
        font-size: 15px !important;
    }

    .service-card p,
    .read-more {
        font-size: 11px !important;
        line-height: 1.85;
    }

    .right-sidebar {
        right: -276px;
        width: 266px;
    }

    .uni-card {
        width: 88vw !important;
        min-height: auto !important;
        padding: 20px 12px !important;
        border-radius: 24px;
    }

    .card-inner-single {
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .single-text-side {
        flex: 1;
        min-width: 0;
        text-align: right !important;
    }

    .single-img-side {
        flex: 0 0 auto;
    }

    .single-details {
        justify-content: flex-start !important;
        gap: 8px !important;
        margin: 8px 0 !important;
        font-size: 13px !important;
    }

    .single-details i {
        font-size: 16px !important;
    }

    .single-name {
        margin-bottom: 10px !important;
        font-size: 18px !important;
    }

    .single-rank-badge {
        margin-bottom: 10px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    .single-img {
        max-width: 95px !important;
        height: 95px !important;
        border-width: 3px !important;
        border-radius: 18px;
    }

    .uni-img-placeholder {
        width: 85px !important;
        height: 85px !important;
        font-size: 32px !important;
    }

    .group-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .group-title {
        margin-bottom: 12px !important;
        font-size: 15px !important;
    }

    .group-person {
        padding: 6px 2px !important;
        border-radius: 12px;
    }

    .group-person-icon {
        margin-bottom: 4px !important;
        font-size: 16px !important;
    }

    .group-person-name {
        font-size: 9px !important;
    }

    .group-person-major {
        font-size: 8px !important;
    }

    .group-person-uni {
        font-size: 7px !important;
    }

    .slider-title {
        margin-bottom: 22px;
    }

    .sliders-section {
        margin-top: 32px;
        padding: 48px 0 46px;
    }

    .modal-box,
    .signup-modal-content,
    .modal-content,
    body.is-admin .modal-editor-content {
        padding: 30px 20px 24px;
        border-radius: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
/* ==========================================================================
   Support Modal (Add this at the end of the Modals section)
   ========================================================================== */

.support-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29, 40, 34, 0.60);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 10001;
}

.support-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.support-modal-container {
    width: min(92vw, 460px);
    border-radius: 28px;
    padding: 28px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,249,242,0.92));
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: var(--shadow-lg);
    animation: modalEnter 360ms cubic-bezier(.2,.8,.2,1); /* استفاده از انیمیشن موجود در کدهای شما */
}

.support-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(145deg, var(--sage-deep), var(--terracotta));
    box-shadow: 0 18px 36px rgba(82,103,86,0.18);
}

.support-modal-container h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 950;
    border: none;
    padding: 0;
}

.support-modal-container p {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.9;
}

.btn-close-support {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    background: linear-gradient(180deg, var(--terracotta), var(--terracotta-dark));
    box-shadow: 0 12px 28px rgba(169,79,53,0.22);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-close-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(169,79,53,0.28);
}
