﻿/* جلوگیری از بیرون زدن المان از صفحه در حالت موبایل */

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}

img, iframe, video {
    max-width: 100%;
    height: auto;
}

.container, .row, section, article {
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}
/*-------------------------------------*/


:root {
    --bg-img: url('/images/home/hero-bg.jpg'); /* مسیر پس‌زمینه را تغییر بده */
    --page-padding: 3rem;
    --card-bg: rgba(255,255,255,0.06); /* شفافیت کارت */
    --card-border: rgba(255,255,255,0.12);
    --glass-blur: 8px;
    --accent: #6c63ff;
    --text: rgba(255,255,255,0.92);
}

/* صفحه کلی */
.visit-cards-page {
    position: relative;
    color: var(--text);
    min-height: 100vh;
    padding: calc(var(--page-padding) + 2rem) 1rem;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, "IranSans", Tahoma, sans-serif;
}

/* پس‌زمینه شیک */
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(120deg, rgba(20,20,30,0.6), rgba(10,45,70,0.5)), var(--bg-img);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.02);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1150px;
    margin: 0 auto;
}

.page-title {
    margin: 0 0 .25rem 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.page-sub {
    margin: 0 0 1.5rem 0;
    color: rgba(255,255,255,0.75);
}

/* گرید کارت‌ها */
.cards-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(1, minmax(0,1fr));
}

@media(min-width:700px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media(min-width:1100px) {
    .cards-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }
}



/* کارت */
.card {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1.05rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 18px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s, border-color .28s;
    min-height: 160px;
    color: var(--text);
    text-align:justify;
}

    /* hover effect */
    .card:hover {
        transform: translateY(-8px) scale(1.01);
        box-shadow: 0 18px 40px rgba(2,6,23,0.6), 0 6px 18px rgba(0,0,0,0.25);
        border-color: rgba(255,255,255,0.18);
    }

.card-header {
    display: flex;
    gap: .9rem;
    align-items: center;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 3px 10px rgba(2,6,23,0.45);
    flex-shrink: 0;
}

    .avatar svg {
        width: 32px;
        height: 32px;
        fill: rgba(255,255,255,0.9);
        opacity: .95;
    }

.card-meta .name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-meta .title {
    margin: 0;
    font-size: .85rem;
    color: rgba(255,255,255,0.75);
}

.card-body {
    font-size: .92rem;
    color: rgba(255,255,255,0.86);
    flex: 1;
}

.card-footer {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
    align-items: center;
}

/* دکمه‌ها */
.btn-primary, .btn-outline {
    padding: .45rem .8rem;
    border-radius: .55rem;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform .18s, box-shadow .18s, opacity .18s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), #4f46e5);
    color: white;
    box-shadow: 0 6px 18px rgba(82,67,217,0.25);
}

    .btn-primary:hover {
        transform: translateY(-3px);
    }

.btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: none;
}

    .btn-outline:hover {
        opacity: 0.95;
        transform: translateY(-2px);
    }

/* Accessibility & prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .card, .btn-primary, .btn-outline {
        transition: none;
        transform: none !important;
    }
}

/* کوچک کردن متن در موبایل */
@media(max-width:420px) {
    .card {
        padding: .85rem;
        border-radius: 12px;
    }

    .avatar {
        width: 48px;
        height: 48px;
    }

    .page-title {
        font-size: 1.25rem;
    }
}
