/* CSS Copyright (c) 1404 کـارت سـاز | All Rights Reserved */
:root {
    --bg-color: #0f172a;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f43f5e;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --link-hover-shadow: rgba(0, 0, 0, 0.2);
    --brand-color: #6366f1;
    --brand-color-rgb: 99, 102, 241;
    --item-bg: rgba(255, 255, 255, 0.7);
    --item-border: rgba(0, 0, 0, 0.08);
    --background-color: rgba(255, 255, 255, 0.5);
    --text-color-muted: #64748b;
}

/* --- متغیرهای تم روشن --- */
[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --primary-color: #4f46e5;
    --primary-hover: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #059669;
    --warning-color: #d97706;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --link-hover-shadow: rgba(0, 0, 0, 0.15);
    --brand-color: #4f46e5;
    --brand-color-rgb: 79, 70, 229;
    --item-bg: rgba(255, 255, 255, 0.7);
    --item-border: rgba(0, 0, 0, 0.08);
    --background-color: rgba(255, 255, 255, 0.5);
    --text-color-muted: #64748b;
}

/* --- استایل‌های عمومی --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(at 40% 20%, hsla(280, 100%, 74%, 0.15) 0px, transparent 50%), radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.15) 0px, transparent 50%), radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 0.15) 0px, transparent 50%);
    z-index: -1;
}
.container { width: 100%; max-width: 650px; position: relative; }

.content-box {
    background-color: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    padding: 40px; transition: all 0.3s ease;
}

/* --- دکمه‌های تغییر تم و زبان --- */
.switcher-wrapper { position: absolute; top: 20px; left: 20px; z-index: 10; display: flex; gap: 10px; }
.theme-switch, .lang-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-switch input, .lang-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: "🌙"; height: 26px; width: 26px; left: 4px; bottom: 4px;
    background-color: white; transition: .4s; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.lang-switch .slider:before { content: "🇮🇷"; }
.theme-switch input:checked + .slider { background-color: var(--primary-color); }
.theme-switch input:checked + .slider:before { transform: translateX(26px); content: "☀️"; }
.lang-switch input:checked + .slider { background-color: var(--secondary-color); }
.lang-switch input:checked + .slider:before { transform: translateX(26px); content: "🇺🇸"; }

/* --- هدر و پروفایل --- */
.profile-header { text-align: center; margin-bottom: 40px; position: relative; }
.profile-img { width: 150px; height: 150px; border-radius: 50%; margin-bottom: 20px; object-fit: cover; }
.profile-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 5px; }
.bio { font-size: 1.1rem; color: var(--primary-color); font-weight: 500; }
.description { margin-top: 15px; color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* --- بخش لینک‌ها --- */
.links-list { list-style: none; }
.links-list li { margin-bottom: 5px; }
.links-list a {
    display: flex; align-items: center; padding: 18px 25px; border-radius: 16px;
    text-decoration: none; color: #fff; font-weight: 500; font-size: 1rem;
    transition: all 0.3s ease; border: 1px solid transparent;
}
.links-list a:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); filter: brightness(110%); }
.links-list a i { font-size: 1.2rem; margin-left: 15px; width: 25px; text-align: center; }


/* --- استایل بخش‌های جدید (اطلاعات) --- */
.section-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(99, 102, 241, 0), rgba(99, 102, 241, 0.75), rgba(99, 102, 241, 0));
    margin: 30px 0 20px 0;
}

.info-container { 
    margin-top: 0;
    padding-top: 30px; 
}
.info-card {
    background-color: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; margin-bottom: 20px;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.info-card:last-child { margin-bottom: 0; }
.info-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; text-align: center; }
.info-card p { color: var(--text-color); text-decoration: none; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; transition: color 0.3s ease; text-align: center; justify-content: center; }
.info-card a:hover { color: var(--primary-color); }
.info-card i { width: 20px; text-align: center; color: var(--text-muted); }

/* --- استایل آیکون پس‌زمینه --- */
/* === تغییر جدید: آیکون پس‌زمینه vCard مانند بقیه === */
.info-card-contact .bg-icon, .info-card-address .bg-icon, .info-card-hours .bg-icon, .info-card-vcard .bg-icon, .info-card-contact-form .bg-icon {
    position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
    font-size: 8rem; color: var(--primary-color); opacity: 0.05; z-index: 0;
}

.info-card-contact > *, .info-card-address > *, .info-card-hours > *, .info-card-vcard > *, .info-card-contact-form > * { position: relative; z-index: 1; }

/* --- استایل فوتر کپی‌رایت --- */
.copyright-footer { margin-top: 30px; text-align: center; padding-top: 20px; }
.copyright-footer p { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.copyright-footer a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
.copyright-footer a:hover { color: var(--primary-color); }

/* --- استایل دکمه بازگشت به بالا --- */
.back-to-top { display: block; text-align: center; color: var(--primary-color); text-decoration: none; margin-top: 20px; margin-bottom: 5px; font-size: 1.2rem; transition: color 0.3s ease; }
.back-to-top:hover { color: var(--primary-hover); }

/* --- استایل بخش vCard --- */
.vcard-btn {
    color: white; border: none; padding: 18px 25px; border-radius: 16px;
    font-weight: 500; font-size: 1rem; font-family: 'Vazirmatn', sans-serif;
    cursor: pointer; transition: all 0.3s ease; width: 100%;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    border: 1px solid transparent; background-color: var(--success-color);
}
.vcard-btn:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); filter: brightness(110%); }
.vcard-btn i { font-family: 'Font Awesome 6 Free'; font-size: 1.2rem; margin-left: 15px; width: 25px; text-align: center; color: #fff; }

/* --- استایل دکمه کپی لینک کوچک --- */
.copy-link-small-btn {
    background-color: var(--primary-color); color: white; border: none; padding: 10px 20px; border-radius: 12px;
    font-weight: 500; font-size: 0.9rem; font-family: 'Vazirmatn', sans-serif;
    cursor: pointer; transition: all 0.3s ease; display: inline-flex;
    align-items: center; justify-content: center; text-decoration: none; margin-top: 15px;
}
.copy-link-small-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); filter: brightness(110%); }
.copy-link-small-btn i { font-family: 'Font Awesome 6 Free'; font-size: 1rem; margin-left: 8px; }

/* --- استایل شمارنده بازدید --- */
.visit-counter { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 10px; }

/* --- استایل اعلان‌ها --- */
.notification {
    position: fixed; top: 20px; right: 20px; background-color: var(--success-color); color: white;
    padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(150%); transition: transform 0.3s ease; z-index: 1001;
}
.notification.show { transform: translateX(0); }

/* --- استایل QR Code (اصلاح شده) --- */
.qr-code-container { margin-top: 30px; text-align: center; }
.qr-code-container h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
#qr-code-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}
#qr-code-image {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    display: none;
}
.qr-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}
.qr-loading i {
    font-size: 2rem;
    color: var(--primary-color);
}
.qr-code-container p { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; }

/* --- استایل انیمیشن ورود پله‌پله --- */
.stagger-item { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.stagger-item.is-visible { opacity: 1; transform: translateY(0); }

/* --- واکنش‌گرایی کامل --- */
@media (max-width: 768px) { .content-box { padding: 30px 25px; } .profile-header h1 { font-size: 1.8rem; } .links-list a { padding: 15px 20px; } }
@media (max-width: 480px) {
    .container { padding: 0; }
    .content-box { border-radius: 0; padding: 25px 20px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
    .profile-header { padding-top: 60px; }
    .switcher-wrapper { top: 15px; left: 15px; }
}

/* --- استایل لینک‌های نقشه --- */
.map-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }
.map-links a { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.25rem; color: #fff; text-decoration: none; border-radius: 0.5rem; font-size: 0.9rem; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); background: var(--brand-color); }
.map-links a:hover { transform: translateY(-3px); box-shadow: 0 5px 10px var(--link-hover-shadow); color: #fff; }
.map-links a i { margin-left: 0.5rem; color: #fff; }

/* --- استایل شبکه‌های اجتماعی --- */
.social-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 1.5rem 0; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; text-decoration: none; color: #fff; font-size: 1.4rem; transition: transform 0.2s ease, box-shadow 0.2s ease; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); }
.social-icons a:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 5px 10px var(--link-hover-shadow); }
.social-icons a.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icons a.whatsapp { background: linear-gradient(45deg, #25d366, #128c7e); }
.social-icons a.linkedin { background: linear-gradient(45deg, #0077b5, #00a0dc); }
.social-icons a.telegram { background: linear-gradient(45deg, #0088cc, #24a1e1); }
.social-icons a.youtube { background: linear-gradient(45deg, #ff0000, #ff5e5e); }
.social-icons a.eitaa { background: linear-gradient(45deg, #f37f00, #d96b00); }
.social-icons a.bale { background: linear-gradient(45deg, #00b894, #00b894); }
.social-icons a.robi { background: linear-gradient(45deg, #843b83, #a52278); }
.social-icons a.phone { background: linear-gradient(45deg, #ff8c00, #ffa500); }
.social-icons a.email { background: linear-gradient(45deg, #d44638, #ff6b6b); }
.social-icons a i { color: #fff; }

/* --- استایل برای زبان انگلیسی --- */
body.lang-en .social-icons a { font-family: 'Font Awesome 6 Free'; }
body.lang-en .switcher-wrapper { left: auto; right: 20px; }
body.lang-en .links-list a i { margin-left: 0; margin-right: 15px; }
body.lang-en .vcard-btn i { margin-left: 0; margin-right: 15px; }
body.lang-en .copy-link-small-btn i { margin-left: 0; margin-right: 8px; }
body.lang-en .map-links a i { margin-left: 0; margin-right: 0.5rem; }
body.lang-en .info-card-contact .bg-icon, body.lang-en .info-card-address .bg-icon, body.lang-en .info-card-hours .bg-icon, body.lang-en .info-card-vcard .bg-icon, body.lang-en .info-card-contact-form .bg-icon { right: auto; left: 5%; }
@media (max-width: 480px) { body.lang-en .switcher-wrapper { left: auto; right: 15px; } }

/* === پیشنهاد: استایل برای بهبود دسترسی‌پذیری (Focus State) === */
.links-list a:focus,
.vcard-btn:focus,
.copy-link-small-btn:focus,
.back-to-top:focus,
.social-icons a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- Link/Button Specific Backgrounds (Applied Over Default) --- */
.links-list a.single, .social-icons a.single { background: var(--brand-color); } /* Explicit single class */
.links-list a.website, .map-links a.website { background: linear-gradient(45deg, #0073e6, #00a8ff); }
.links-list a.portfolio { background: linear-gradient(45deg, #6c5ce7, #a29bfe); }
.links-list a.instagram, .social-icons a.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.links-list a.whatsapp, .social-icons a.whatsapp { background: linear-gradient(45deg, #25d366, #128c7e); }
.links-list a.linkedin, .social-icons a.linkedin { background: linear-gradient(45deg, #0077b5, #00a0dc); }
.links-list a.telegram, .social-icons a.telegram { background: linear-gradient(45deg, #0088cc, #24a1e1); }
.links-list a.youtube, .social-icons a.youtube { background: linear-gradient(45deg, #ff0000, #ff5e5e); }
.links-list a.eitaa, .social-icons a.eitaa { background: linear-gradient(45deg, #f37f00, #d96b00); }
.links-list a.phone, .social-icons a.phone { background: linear-gradient(45deg, #ff8c00, #ffa500); }
.links-list a.email, .social-icons a.email { background: linear-gradient(45deg, #d44638, #ff6b6b); }
.links-list a.app-download { background: linear-gradient(45deg, #8e44ad, #9b59b6); }
.links-list a.shop { background: linear-gradient(45deg, #27ae60, #2ecc71); }
.links-list a.booking { background: linear-gradient(45deg, #2980b9, #3498db); }
.links-list a.snappfood { background: #ff00a6; }
.links-list a.faq-link { background: linear-gradient(45deg, #34495e, #2c3e50); }
.links-list a.pdf-link { background: linear-gradient(45deg, #c0392b, #e74c3c); }
.map-links a.map-neshan { background: linear-gradient(45deg, #1a73e8, #4285f4); }
.map-links a.map-balad { background: linear-gradient(45deg, #00a99d, #00c3b3); }

/* شروع تغییر: اعمال رنگ‌های داینامیک */
.profile-header h1 {
    color: var(--profile-name-color);
}

.profile-header .bio {
    color: var(--bio-text-color);
}

.info-card h3,
.contact-form-header h3 {
    color: var(--section-title-color);
}
/* پایان تغییر */


/* ==================== استایل‌های فرم تماس (بازنویسی شده) ==================== */

/* متن توضیحات زیر عنوان */
.info-card-contact-form > p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* استایل فیلدهای فرم */
.info-card-contact-form .form-group {
    margin-bottom: 15px; /* کاهش فاصله */
}

.info-card-contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.info-card-contact-form input[type="text"],
.info-card-contact-form input[type="tel"],
.info-card-contact-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--item-bg); /* پس‌زمینه هماهنگ با تم */
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.info-card-contact-form input:focus,
.info-card-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.info-card-contact-form textarea {
    resize: vertical;
    min-height: 80px; /* کاهش ارتفاع */
}

/* استایل دکمه ارسال پیام */
.info-card-contact-form .contact-submit-btn {
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif; /* اضافه شدن فونت */
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color); /* استفاده از رنگ اصلی تم */
    margin-top: 10px;
}

.info-card-contact-form .contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    filter: brightness(110%);
}

/* استایل پیام بازخورد */
.info-card-contact-form .form-feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    display: none; /* به طور پیش‌فرض مخفی است */
}

.info-card-contact-form .form-feedback.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.info-card-contact-form .form-feedback.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.info-card-contact-form .contact-submit-btn i {
    color: #fff;
}

/* شروع تغییر: اعمال رنگ داینامیک به دکمه‌های جدید */
.map-links a {
    background: var(--map_links_color) !important;
}

.copy-link-small-btn {
    background-color: var(--copy_link_button_color) !important;
}

.vcard-btn {
    background-color: var(--vcard_button_color) !important;
}

.info-card h3 {
    color: var(--section_title_color);
}

.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.pwa-install-btn i {
    margin-left: 8px;
}

/* --- استایل‌های اسپلش اسکرین سفارشی --- */
#custom-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF; /* مقدار پیش‌فرض، در JS تغییر می‌کند */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#custom-splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#splash-gif {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
}