/* ==================== فونت فیس ==================== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ==================== متغیرها ==================== */
:root {
    --deep-navy: #071a33;
    --navy: #0a2542;
    --cobalt: #0f3460;
    --medium-blue: #1a5c8a;
    --teal-dark: #0a5c44;
    --teal: #0d7a5e;
    --teal-light: #15a37a;
    --gold: #c8a84e;
    --gold-light: #d4b860;
    --gold-pale: #e8d5a3;
    --burgundy: #8b1a2b;
    --cream: #fdf8f0;
    --cream-warm: #fefaf5;
    --text-dark: #1a1a1a;
    --text-medium: #3d3028;
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 30px rgba(200, 168, 78, 0.25);
    --radius-card: 24px;
    --radius-input: 14px;
    --radius-button: 16px;
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 400;
    background-color: var(--deep-navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;       /* ← این مهم است */
    justify-content: flex-start;  /* محتوا از بالا شروع شود */
    align-items: center;          /* همچنان افقی وسط‌چین */
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

/* ==================== پس‌زمینه کاشی‌کاری اسلیمی ==================== */
.tilework-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #06182e;
    background-image:
        linear-gradient(0deg, rgba(30, 90, 140, 0.22) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(30, 90, 140, 0.22) 1.5px, transparent 1.5px),
        linear-gradient(45deg, rgba(20, 130, 110, 0.28) 1.5px, transparent 1.5px),
        linear-gradient(-45deg, rgba(20, 130, 110, 0.28) 1.5px, transparent 1.5px),
        repeating-linear-gradient(45deg, rgba(13, 122, 94, 0.13) 0px, rgba(13, 122, 94, 0.13) 6px, transparent 6px, transparent 12px),
        repeating-linear-gradient(-45deg, rgba(15, 100, 140, 0.10) 0px, rgba(15, 100, 140, 0.10) 8px, transparent 8px, transparent 16px),
        radial-gradient(circle at 50% 50%, rgba(200, 168, 78, 0.35) 3px, transparent 3.5px),
        radial-gradient(circle at 25% 25%, rgba(180, 150, 90, 0.18) 1.5px, transparent 2px);
    background-size: 100px 100px, 100px 100px, 100px 100px, 100px 100px, 50px 50px, 40px 40px, 50px 50px, 25px 25px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 10px 10px, 25px 25px, 0 0;
    opacity: 0.85;
}

.tilework-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(200, 168, 78, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 60%, rgba(13, 122, 94, 0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 80%, rgba(30, 90, 140, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 75% 35%, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 60% 15%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 85% 55%, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 50% 45%, rgba(200, 168, 78, 0.04) 2px, transparent 2px);
    background-size: 300px 300px, 250px 250px, 350px 350px, 280px 280px, 320px 320px, 270px 270px, 400px 400px;
    background-position: 0 0, 80px 40px, 150px 100px, 200px 30px, 50px 120px, 180px 160px, 100px 80px;
    animation: particlesFloat 25s ease-in-out infinite;
}

@keyframes particlesFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(15px, -20px);
    }
    50% {
        transform: translate(-10px, -35px);
    }
    75% {
        transform: translate(-20px, -8px);
    }
}

/* ==================== container و کارت اصلی ==================== */
.container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 0 auto;               /* فضا را تا پایین پر کند */
    margin: auto 0;               /* کمک به وسط‌چین شدن عمودی */
    position: relative;
    z-index: 1;
}

.card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(254, 250, 245, 0.97) 0%, rgba(253, 248, 240, 0.98) 40%, rgba(252, 245, 235, 0.97) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius-card);
    padding: 50px 32px 38px;
    position: relative;
    box-shadow: var(--shadow-strong), var(--shadow-gold);
    border: 1.5px solid rgba(200, 168, 78, 0.3);
    overflow: visible;
    transition: var(--transition-smooth);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 28px;
    background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(200, 168, 78, 0.25) 6px, rgba(200, 168, 78, 0.25) 7px),
        repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(13, 122, 94, 0.20) 6px, rgba(13, 122, 94, 0.20) 7px),
        linear-gradient(180deg, rgba(200, 168, 78, 0.35) 0%, rgba(200, 168, 78, 0.08) 40%, transparent 100%);
    border-radius: 20px 20px 0 0;
    z-index: 2;
    pointer-events: none;
    border-bottom: 1px solid rgba(200, 168, 78, 0.3);
}

.card::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: calc(var(--radius-card) - 4px);
    border: 1px solid rgba(200, 168, 78, 0.15);
    pointer-events: none;
    z-index: 0;
}

/* ==================== گنبد مسجد ==================== */
.dome-wrapper {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.4));
}

.dome-finial {
    width: 6px;
    height: 28px;
    background: linear-gradient(180deg, #e8c860 0%, #b89430 60%, #8a6d20 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(200, 168, 78, 0.5);
}

.dome-finial::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #f0d878 0%, #c8a030 70%, #8a6d20 100%);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(240, 216, 120, 0.6);
}

.dome-body {
    width: 110px;
    height: 72px;
    background: linear-gradient(180deg, #1aad85 0%, #0d8a6e 25%, #0a6d52 55%, #085a42 100%);
    border-radius: 110px 110px 18px 18px;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 -8px 20px rgba(0, 0, 0, 0.25), 0 8px 18px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 2px solid rgba(200, 168, 78, 0.5);
}

.dome-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 9px, rgba(255, 255, 255, 0.06) 9px, rgba(255, 255, 255, 0.06) 10px),
        repeating-linear-gradient(90deg, transparent, transparent 14px, rgba(200, 168, 78, 0.1) 14px, rgba(200, 168, 78, 0.1) 15px);
    border-radius: inherit;
    pointer-events: none;
}

.dome-body::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.dome-drum {
    width: 85px;
    height: 22px;
    background: linear-gradient(180deg, #0a6d52 0%, #085035 100%);
    border-radius: 0 0 8px 8px;
    position: relative;
    z-index: 1;
    border: 1.5px solid rgba(200, 168, 78, 0.45);
    border-top: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dome-drum::before {
    content: '';
    position: absolute;
    width: 55px;
    height: 10px;
    background: radial-gradient(ellipse at 20% 100%, rgba(200, 168, 78, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(200, 168, 78, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(200, 168, 78, 0.3) 0%, transparent 60%);
    bottom: 3px;
    pointer-events: none;
}

/* ==================== هدر ==================== */
.header {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.header-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.star-ornament {
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 4px rgba(200, 168, 78, 0.5));
}

.star-ornament::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #e8c860, #b89430);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.header h1 {
    font-size: 25px;
    font-weight: 900;
    color: #1a3c5c;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.header h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 8px auto 0;
    border-radius: 2px;
}

.header p {
    font-size: 14px;
    color: #5a4a38;
    opacity: 0.85;
    font-weight: 400;
    margin-top: 4px;
}
