/* ========================================
   نرخ آنلاین | Main Style.css
   Unified for All Pages
   ======================================== */

/* ---------- متغیرهای پایه ---------- */
:root {
    --primary: #1e4a76;
    --primary-dark: #0f2b3d;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --success: #059669;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ---------- رنگ‌های اختصاصی هر بخش ---------- */
.section-coin { --accent: #CD7F32; --accent-dark: #8B4513; --accent-light: #FFF3E0; }
.section-bubble { --accent: #E91E63; --accent-dark: #C2185B; --accent-light: #FCE4EC; }
.section-fund { --accent: #2E7D32; --accent-dark: #1B5E20; --accent-light: #E8F5E9; }
.section-currency { --accent: #1565C0; --accent-dark: #0D47A1; --accent-light: #E3F2FD; }
.section-hawala { --accent: #6A1B9A; --accent-dark: #4A148C; --accent-light: #F3E5F5; }

.gold-card { --accent: #FFD700; --accent-dark: #B8860B; --accent-light: #FFF8E1; }
.silver-card { --accent: #B0BEC5; --accent-dark: #78909C; --accent-light: #ECEFF1; }

/* Market card colors for landing page */
.card-currency { --accent: #1565C0; --accent-dark: #0D47A1; --accent-light: #E3F2FD; }
.card-crypto   { --accent: #f7931a; --accent-dark: #cc7a16; --accent-light: #fff3e0; }
.card-stock    { --accent: #2E7D32; --accent-dark: #1B5E20; --accent-light: #E8F5E9; }

/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazir', 'Tahoma', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, #eef2ff 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    animation: fadeInScale 0.6s ease-out;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Keyframes ---------- */
@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}
@keyframes rotateIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes priceFlash {
    0% { background-color: rgba(245, 158, 11, 0); transform: scale(1); }
    50% { background-color: rgba(245, 158, 11, 0.3); transform: scale(1.02); }
    100% { background-color: rgba(245, 158, 11, 0); transform: scale(1); }
}

/* ---------- Header ---------- */
.top-bar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: relative;        /* not sticky → scrolls away */
    box-shadow: var(--shadow-sm);
    animation: slideInRight 0.5s ease-out;
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.logo .tagline {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 500;
    opacity: 0.9;
    margin-top: -0.2rem;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    align-items: center;
}
.nav-link, .main-nav a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-link.active, .main-nav a.active {
    background: var(--primary-light);
    color: white;
    font-weight: 700;
}
.nav-link.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
.nav-link .badge {
    font-size: 0.7rem;
    background: var(--primary-dark);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}
.nav-link:hover:not(.disabled), .main-nav a:hover:not(.disabled) {
    background: var(--primary-light);
    color: white;
}
.live-time {
    font-family: 'Vazirmatn', 'Courier New', monospace;
    font-size: 0.8rem;
    background: #e6f7ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    border: 1px solid #bae6fd;
    color: var(--primary-dark);
    font-weight: 500;
    animation: glowPulse 2s infinite;
}

/* ---------- Hero (Home Page) ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 4rem 0 3rem;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.hero-text {
    max-width: 600px;
    animation: slideInLeft 0.7s ease-out;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.4;
    background: linear-gradient(to left, #FFD700, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.hero-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.cta-primary {
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    border: none;
    font-family: inherit;
    cursor: pointer;
}
.cta-primary:hover {
    background: #e68900;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}
.cta-note {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
}
.hero-visual {
    position: relative;
    animation: slideInRight 0.7s ease-out;
}
.trust-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.3);
}
.floating-chart {
    font-size: 4rem;
    text-align: center;
    color: #FFD700;
    opacity: 0.9;
    animation: floatAnimation 3s ease-in-out infinite;
}
.gold-icon { margin-left: 0.5rem; }
.trend-icon { color: white; opacity: 0.7; }

/* ---------- Available Section (Gold) ---------- */
.available-section {
    margin: 3rem 0;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-right: 0.8rem;
    border-right: 5px solid var(--accent, var(--primary));
    color: var(--primary-dark);
}
.section-coin .section-title { border-right-color: var(--accent); color: var(--accent-dark); }
.section-desc {
    color: var(--gray-700);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}
.hero-gold-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.gold-card, .silver-card {
    background: linear-gradient(135deg, var(--accent-light), white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--accent);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.gold-card:hover, .silver-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}
.gold-name i {
    font-size: 1.8rem;
    color: var(--accent);
    margin-left: 0.5rem;
    transition: transform 0.3s;
}
.gold-card:hover .gold-name i { transform: scale(1.2) rotate(5deg); }
.gold-price.price-placeholder {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-dark);
    margin: 0.8rem 0;
    opacity: 0.7;
}
.buy-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1.4rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-normal);
}
.buy-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ---------- Coming Soon Market Cards ---------- */
.coming-soon-section {
    margin: 4rem 0 2rem;
}
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}
.market-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}
.market-card:nth-child(1) { animation-delay: 0.1s; }
.market-card:nth-child(2) { animation-delay: 0.2s; }
.market-card:nth-child(3) { animation-delay: 0.3s; }
.market-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}
.market-icon {
    font-size: 2.8rem;
    color: var(--accent, var(--primary));
    margin-bottom: 1rem;
}
.market-card:hover .market-icon { transform: scale(1.1) rotate(5deg); }
.market-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--accent-dark, var(--primary-dark));
}
.market-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
.btn-disabled {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: not-allowed;
    font-family: inherit;
    opacity: 0.8;
}

/* ---------- Footer ---------- */
footer {
    margin-top: 4rem;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 2rem 0 1rem;
    font-size: 0.85rem;
    color: var(--gray-700);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1rem;
}
.footer-brand h4 {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.footer-links a {
    color: var(--gray-700);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--primary); }
.footer-contact span { white-space: nowrap; }
.copyright {
    text-align: center;
    border-top: 1px solid var(--gray-100);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.75rem;
}

/* ---------- About, Contact, Privacy Pages Styles ---------- */
.page-section {
    animation: fadeInUp 0.6s ease-out;
}
.lead-text {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--gray-700);
    margin-bottom: 2rem;
    border-right: 4px solid var(--primary-light);
    padding-right: 1.2rem;
    background: linear-gradient(to left, #f8faff, transparent);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.about-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.4rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}
.about-card:nth-child(1) { animation-delay: 0.1s; }
.about-card:nth-child(2) { animation-delay: 0.2s; }
.about-card:nth-child(3) { animation-delay: 0.3s; }
.about-card:nth-child(4) { animation-delay: 0.4s; }
.about-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.card-icon-wrapper { margin-bottom: 1rem; }
.card-icon {
    font-size: 2.4rem;
    color: var(--primary);
    transition: transform var(--transition-normal);
}
.about-card:hover .card-icon { transform: scale(1.15); color: var(--primary-dark); }
.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
}
.about-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
}
.about-history {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.8rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
    border-right: 6px solid var(--primary);
}
.about-history h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.about-history p { line-height: 2; color: var(--gray-700); }

/* Contact Cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.3rem;
    margin: 2rem 0;
}
.contact-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}
.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.contact-card i { font-size: 2rem; color: var(--primary); margin-bottom: 0.7rem; }
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary-dark); }
.contact-card a { color: var(--primary); text-decoration: none; font-weight: 500; word-break: break-word; }
.contact-card a:hover { text-decoration: underline; }

/* Contact Form */
.contact-form-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.8rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.contact-form-wrapper h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.contact-form .form-group { margin-bottom: 1.2rem; }
.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--gray-700);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border var(--transition-fast);
    background: var(--gray-50);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}
.contact-form .cta-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}
.contact-form .cta-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Privacy Blocks */
.privacy-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.privacy-block {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
}
.privacy-block:nth-child(1) { animation-delay: 0.05s; }
.privacy-block:nth-child(2) { animation-delay: 0.1s; }
.privacy-block:nth-child(3) { animation-delay: 0.15s; }
.privacy-block:nth-child(4) { animation-delay: 0.2s; }
.privacy-block:nth-child(5) { animation-delay: 0.25s; }
.privacy-block:nth-child(6) { animation-delay: 0.3s; }
.privacy-block:nth-child(7) { animation-delay: 0.35s; }
.privacy-block:nth-child(8) { animation-delay: 0.4s; }
.privacy-block:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.privacy-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.privacy-block h3 i { color: var(--primary); }
.privacy-block p,
.privacy-block ul {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--gray-700);
}
.privacy-block ul {
    padding-right: 1.5rem;
    margin-top: 0.5rem;
}
.privacy-block ul li { margin-bottom: 0.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero { padding: 2.5rem 0 2rem; }
    .hero-title { font-size: 1.8rem; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-cta { justify-content: center; }
    .header-flex { flex-direction: column; align-items: stretch; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
    .logo { text-align: center; }
    .about-grid,
    .contact-cards { grid-template-columns: 1fr; }
    .privacy-block { padding: 1.2rem; }
    .lead-text { font-size: 1rem; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 1.5rem; }
    .cta-primary { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
}

/* ---------- Print / Accessibility ---------- */
@media print {
    .buy-btn, .cta-primary, .top-bar { display: none; }
    body { background: white; }
    * { animation: none !important; transition: none !important; }
}

/* ---------- بهبود هدر در موبایل ---------- */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;      /* چیدمان عمودی */
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }

    .main-nav {
        width: 100%;                 /* تمام عرض */
        max-width: 100%;
        flex: auto;
    }

    .main-nav ul {
        justify-content: center;     /* وسط‌چین کردن آیتم‌ها */
        flex-wrap: wrap;            /* اگر جا نشد به خط بعد برود */
        gap: 0.6rem;
    }

    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .live-time {
        width: auto;
        margin: 0 auto;
    }
}


/* ---------- Logo link & image ---------- */
.logo-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    height: 42px;               /* adjust to your liking */
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.6rem;          /* slightly smaller to fit beside the icon */
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-text .tagline {
    font-size: 0.7rem;
    color: var(--gray-700);
    margin-top: 0.1rem;
}

/* Remove the old .logo h1 and .logo p styles that are now unused,
   or keep them if they are still needed for other elements.
   The .logo class is no longer used in the header. */