/* =========================================
   Hero Section (بخش کاور و هدر پروفایل/فروشگاه)
   ========================================= */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="2"/><circle cx="50" cy="50" r="30" fill="none" stroke="white" stroke-width="2"/><circle cx="50" cy="50" r="20" fill="none" stroke="white" stroke-width="2"/></svg>') repeat;
    animation: rotateBackground 40s linear infinite;
    z-index: -1;
    pointer-events: none;
}

/* محفظه لوگو و تیک آبی */
.logo-container, .mall-logo-wrapper {
    position: relative;
    display: inline-block;
    width: clamp(120px, 25vw, 160px);
    height: clamp(120px, 25vw, 160px);
    margin: 0 auto clamp(15px, 3vw, 25px);
    animation: fadeInDown 0.8s ease backwards;
}

.store-logo1 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    background-color: var(--white);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    inset-inline-end: 5px;
    width: clamp(30px, 8vw, 40px);
    height: clamp(30px, 8vw, 40px);
    background: var(--white);
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

/* دکمه ویرایش */
.edit-btn {
    position: absolute;
    top: clamp(10px, 3vw, 20px);
    inset-inline-start: clamp(10px, 3vw, 20px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border: none;
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    border-radius: 50%;
    font-size: clamp(18px, 4vw, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    z-index: 10;
    cursor: pointer;
}

@media (hover: hover) {
    .edit-btn:hover {
        background: var(--primary);
        color: var(--white);
        transform: scale(1.1) rotate(90deg);
    }
}
.edit-btn:active { transform: scale(0.95); }

/* متون در Hero */
.hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 0 10px;
}

.hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

/* ===== Stats Section (بخش آمار شیشه‌ای) ===== */
.stats-container {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 20px);
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: clamp(10px, 2.5vw, 15px) clamp(12px, 3vw, 20px);
    text-align: center;
    flex: 1 1 auto;
    min-width: 90px;
    max-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

@media (hover: hover) {
    .stat-box:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

.stat-number {
    font-size: clamp(1.4rem, 4vw, 1.7rem);
    font-weight: 800;
    color: var(--white);
    display: block;
    margin-bottom: 4px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* ===== Bio & Info Section (بخش بیوگرافی و اطلاعات) ===== */
.bio-section,
.info-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: clamp(20px, 4vw, 40px);
    margin: clamp(20px, 5vw, 40px) 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bio-section:hover,
.info-section:hover {
    box-shadow: var(--shadow-md);
}

.bio-section h2,
.info-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark);
    border-bottom: 3px solid var(--primary-light);
    padding-bottom: 10px;
    position: relative;
}

.bio-section h2::after,
.info-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    inset-inline-start: 0;
    width: 80px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.business-about-text {
    line-height: 1.9;
    text-align: justify;
    font-size: 1.05em;
    color: var(--text);
}

/* ===== باکس یادداشت مدیر (Managers Note Box) ===== */
.managers-note-box {
    background: #f8f9fa;
    border-inline-start: 4px solid var(--primary, #007bff);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    color: #333;
}

.bio-section .managers-note-box h4 {
    color: var(--primary, #007bff) !important;
    margin: 0 0 1rem 0 !important;
    font-weight: 600 !important;
}

.managers-note-box div {
    color: var(--text);
    line-height: 1.8;
}

/* ===== Info Grid (کارت‌های اطلاعات تماس) ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(15px, 3vw, 25px);
    margin-top: clamp(20px, 4vw, 30px);
}

.info-card {
    background-color: var(--gray-100);
    padding: clamp(16px, 3vw, 20px) 24px;
    border-radius: var(--radius-lg);
    border-inline-start: 4px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px; 
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

@media (hover: hover) {
    .info-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-inline-start-color: var(--primary);
        background-color: var(--white);
    }
}

.info-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 2px;
    font-weight: 600;
}

.info-card .value {
    font-size: 1.05rem;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.5;
}

.info-card .value a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.info-card .value a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.info-card .value[dir="ltr"] {
    text-align: left;
    font-family: monospace;
}

/* ===== Social Links (دکمه‌های شبکه‌های اجتماعی) ===== */
.social-links-grid, .social-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.social-btn, .social-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    background: var(--gray-100);
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.social-btn img, .social-bar img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: transform 0.3s;
}

@media (hover: hover) {
    .social-btn:hover, .social-bar a:hover {
        background: var(--white);
        border-color: var(--border);
        color: var(--primary);
        box-shadow: var(--shadow-sm);
        transform: translateY(-3px);
    }
    .social-btn:hover img, .social-bar a:hover img {
        transform: scale(1.1);
    }
}

.social-btn:active, .social-bar a:active {
    transform: scale(0.96);
    background: var(--gray-200);
}

/* ===== Keyframes (انیمیشن‌ها) ===== */
@keyframes rotateBackground {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   بهینه‌سازی دارک مود (Dark Mode Overrides)
   ========================================= */

/* ۱. حفظ رنگ سفید برای متن‌ها روی پس‌زمینه کاور (Hero) */
[data-theme="dark"] .hero,
[data-theme="dark"] .hero h1,
[data-theme="dark"] .stat-number {
    color: #ffffff; 
}

[data-theme="dark"] .hero .subtitle,
[data-theme="dark"] .stat-label {
    color: rgba(255, 255, 255, 0.85);
}

/* ۲. تنظیمات لوگو و تیک آبی */
[data-theme="dark"] .verified-badge,
[data-theme="dark"] .store-logo1 {
    background-color: #ffffff; 
}

/* ۳. دکمه ویرایش */
[data-theme="dark"] .edit-btn {
    background: var(--gray-100); 
    color: var(--text);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .edit-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ۴. بخش‌های بیوگرافی و اطلاعات (کارت‌های اصلی) */
[data-theme="dark"] .bio-section,
[data-theme="dark"] .info-section {
    background: var(--bg-card, #1e1e1e);
}

[data-theme="dark"] .bio-section h2,
[data-theme="dark"] .info-section h2 {
    color: #ffffff !important;
    border-bottom-color: #555555 !important;
}

[data-theme="dark"] .bio-section h2::after,
[data-theme="dark"] .info-section h2::after {
    background-color: var(--primary-light, #66b0ff) !important;
}

/* ۵. باکس یادداشت مدیر در دارک مود */
[data-theme="dark"] .managers-note-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border-inline-start-color: var(--primary-light, #66b0ff) !important;
    color: #e0e0e0 !important;
}

/* پوشش دادن تمام سلکتورهای احتمالی دارک مود با اولویت بالا */
[data-theme="dark"] .managers-note-box h4,
body.dark-mode .managers-note-box h4,
.dark-mode .managers-note-box h4 {
    color: #99ccff !important; 
}

[data-theme="dark"] .bio-section h4 {
    color: var(--primary-light, #66b0ff) !important;
}

/* ۶. کارت‌های اطلاعات (Info Grid) */
[data-theme="dark"] .info-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-inline-start-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    
}

[data-theme="dark"] .info-card:hover {
    background-color: rgba(255, 255, 255, 0.1); 
    border-inline-start-color: var(--primary);
}

[data-theme="dark"] .info-card label {
    color: var(--text-muted);
}

[data-theme="dark"] .info-card .value {
    color: #ffffff !important; /* متون بولد کاملاً سفید شوند تا در متن تیره برجسته‌تر دیده شوند */
}

/* ۷. دکمه‌های شبکه‌های اجتماعی */
[data-theme="dark"] .social-btn, 
[data-theme="dark"] .social-bar a {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid var(--border);
}

[data-theme="dark"] .social-btn:hover, 
[data-theme="dark"] .social-bar a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}
