:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text-primary: #1e2126;
    --text-secondary: #4a505c;
    --text-muted: #6b7280;
    --accent: #3b5bdb;
    --accent-soft: rgba(59, 91, 219, 0.08);
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --transition: 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
    LIGHT THEME BACKGROUND
========================================= */

.background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 10%, rgba(59, 91, 219, 0.05), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(59, 91, 219, 0.03), transparent 30%),
        var(--bg);
}

/* =========================================
    MAIN CONTAINER
========================================= */

.page {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 50px 0;
}

/* =========================================
    CARD BASE
========================================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

/* =========================================
    HERO
========================================= */

.hero {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: center;
    padding: 40px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: fadeUp 0.7s ease both;
}

.hero-images {
    position: relative;
    min-height: 340px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    position: absolute;
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image.one {
    transform: rotate(-6deg) translateX(-60px);
    z-index: 1;
}

.hero-image.two {
    transform: rotate(5deg) translateX(60px);
    z-index: 2;
}

.hero-images:hover .hero-image.one {
    transform: rotate(-8deg) translateX(-70px) translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.hero-images:hover .hero-image.two {
    transform: rotate(7deg) translateX(70px) translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.hero-content {
    text-align: right;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    color: #111827;
}

.hero h1 span {
    color: var(--accent);
}

.hero-description {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 2;
    max-width: 500px;
    margin-bottom: 24px;
}

/* =========================================
    QUICK ACTIONS
========================================= */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.action:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action.primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.action.primary:hover {
    background: #2f4ec9;
    border-color: #2f4ec9;
    box-shadow: 0 6px 16px rgba(59, 91, 219, 0.3);
}

.action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* =========================================
    SECTIONS
========================================= */

.section {
    margin-top: 24px;
    padding: 30px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.7s ease both;
    transition: box-shadow var(--transition);
}

.section:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.section-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* =========================================
    ABOUT
========================================= */

.about-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 2.1;
    max-width: 800px;
}

/* =========================================
    LINKS
========================================= */

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.link-card:hover {
    border-color: #d1d5db;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.link-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    transition: background 0.2s;
}

.link-card:hover .link-icon {
    background: rgba(59, 91, 219, 0.12);
}

.link-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.link-info {
    min-width: 0;
    flex: 1;
}

.link-title {
    display: block;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.link-value {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    direction: ltr;
    text-align: right;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.link-arrow {
    color: #9ca3af;
    font-size: 1.1rem;
    transition: transform 0.2s, color 0.2s;
}

.link-card:hover .link-arrow {
    transform: translateX(-3px);
    color: var(--accent);
}

/* =========================================
    GALLERY
========================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #f3f4f6;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 9 / 16;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s;
}

.gallery-item::after {
    content: "مشاهده";
    position: absolute;
    inset: auto 12px 12px auto;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(6px);
    transition: 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
    LIGHTBOX
========================================= */

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(900px, 95vw);
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: #f3f4f6;
    transform: rotate(90deg);
}

/* =========================================
    FOOTER
========================================= */

footer {
    text-align: center;
    padding: 30px 10px 10px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

footer a {
    color: var(--accent);
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================================
    ANIMATION
========================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
    RESPONSIVE
========================================= */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px;
        text-align: center;
    }
    .hero-images {
        min-height: 280px;
        order: -1;
    }
    .hero-image {
        width: 160px;
        height: 240px;
    }
    .hero-image.one {
        transform: rotate(-6deg) translateX(-45px);
    }
    .hero-image.two {
        transform: rotate(5deg) translateX(45px);
    }
    .hero-content {
        text-align: center;
    }
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    .actions {
        justify-content: center;
    }
    .section {
        padding: 25px;
    }
}

@media (max-width: 650px) {
    .page {
        width: min(100% - 20px, 500px);
        padding: 30px 0;
    }
    .hero {
        padding: 22px 18px;
        border-radius: 16px;
    }
    .hero-images {
        min-height: 230px;
    }
    .hero-image {
        width: 130px;
        height: 195px;
        border-width: 2px;
        border-radius: 10px;
    }
    .hero-image.one {
        transform: rotate(-4deg) translateX(-25px);
    }
    .hero-image.two {
        transform: rotate(4deg) translateX(25px);
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .actions {
        flex-direction: column;
        gap: 8px;
    }
    .action {
        width: 100%;
    }
    .section {
        padding: 20px;
        border-radius: 12px;
        margin-top: 16px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 15px;
    }
    .section-title {
        font-size: 1.2rem;
    }

    /* Links grid: 3 columns with icons only */
    .links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .link-card {
        padding: 10px;
        justify-content: center;
        border-radius: 10px;
    }
    .link-info,
    .link-arrow {
        display: none;
    }
    .link-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        background: transparent;
    }
    .link-card:hover .link-icon {
        background: transparent;
    }

    .gallery {
        gap: 10px;
    }
    .lightbox-close {
        top: 12px;
        left: 12px;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}