/* ==========================================================================
   1. المتغيرات والأساسيات للبروفايل الشخصي (Profile Core Styles)
   ========================================================================== */
:root {
    --primary-color: #0056b3; /* اللون الافتراضي - يتم تخصيصه لكل شخص */
    --white: #ffffff;
    --text-main: #1a2a3a;
    --text-muted: #5a6a7a;
    --bg-site: #f4f7f9;
    --soft-blue: #f0f4f8;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-site);
    color: var(--text-main);
    margin: 0; 
    padding: 0; 
    direction: rtl;
}

.container {
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 20px;
}

/* العنوان المشترك للأقسام الداخلية في البروفايل */
.section-title {
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--primary-color);
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.between-title {
    font-size: 2rem !important;
    font-weight: 700;
}

/* ==========================================================================
   2. هيدر البروفايل (اللوجو يمين، صورة الشخص شمال)
   ========================================================================== */
.profile-header {
    background: var(--white); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 15px 40px; 
    border-radius: 20px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    margin-bottom: 30px; 
    border-bottom: 4px solid var(--primary-color);
}

.header-logo { 
    height: 55px; 
    width: auto; 
}

.header-avatar { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    border: 3px solid var(--primary-color); 
    object-fit: cover; 
}

/* ==========================================================================
   3. قسم الوسط والبيانات (صورة الميزة الكبيرة والوصف التعريفى)
   ========================================================================== */
.main-content-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-bottom: 40px; 
}

.large-feature-img { 
    width: 100%; 
    height: 350px; 
    object-fit: cover; 
    border-radius: 24px; 
}

.bio-card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.bio-card h1 { 
    color: var(--primary-color); 
    margin: 0 0 15px 0; 
    font-size: 2rem; 
}

.bio-card p { 
    font-size: 1.05rem; 
    line-height: 1.8; 
    color: var(--text-muted); 
    margin: 0; 
}

@media (max-width: 768px) { 
    .main-content-grid { 
        grid-template-columns: 1fr; 
    } 
}

/* ==========================================================================
   4. أقسام الميديا والتفاعل (فيديو، معرض صور، روابط، جي بي إس)
   ========================================================================== */

/* أ) قسم الفيديو السلس */
.video-section { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    margin-bottom: 40px; 
}

.video-container { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: 16px; 
}

.video-container iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: none; 
}

/* ب) معرض الصور الفخم (3 تحتهم 3) */
.gallery-section {
    margin: 40px 0;
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(1, 1fr); }
}

/* جـ) بوكس الروابط الخارجية */
.links-box {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.links-box h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--bg-site);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.link-item {
    display: block;
    background: var(--bg-site);
    color: var(--text-main);
    padding: 14px 20px;
    margin: 10px 0;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-5px);
}

/* د) الموقع الجغرافي (GPS) */
.gps-section { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    margin-bottom: 20px; 
}

.map-placeholder { 
    width: 100%; 
    height: 350px; 
    border-radius: 16px; 
    border: none; 
}

/* ==========================================================================
   5. أزرار التواصل الاجتماعي الفاخرة (Social Icons & Buttons)
   ========================================================================== */
.social-icons-section { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    margin-bottom: 40px; 
    text-align: center; 
}

.icons-wrapper { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    flex-wrap: wrap; 
    margin-top: 10px; 
}

.icon-btn {
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: #f0f4f8;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.6rem; 
    text-decoration: none; 
    transition: var(--transition);
}

/* ألوان تأثيرات الأيقونات (Hover Effects) */
.icon-btn.fb { color: #1877f2; }
.icon-btn.fb:hover { background: #1877f2; color: white; transform: scale(1.1); }

.icon-btn.insta { color: #e1306c; }
.icon-btn.insta:hover { background: #e1306c; color: white; transform: scale(1.1); }

.icon-btn.wa { color: #25d366; }
.icon-btn.wa:hover { background: #25d366; color: white; transform: scale(1.1); }

.icon-btn.mail { color: var(--primary-color); }
.icon-btn.mail:hover { background: var(--primary-color); color: white; transform: scale(1.1); }

.icon-btn.tiktok { color: #010101; }
.icon-btn.tiktok:hover { background: #000000; color: white; transform: scale(1.1); }

/* زر المشاركة الذكي (Share & Toast) */
.share-btn {
    background-color: #f0f4f8 !important;
    color: #0f172a !important;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: #0056b3 !important;
    color: #ffffff !important;
    transform: translateY(-3px);
}

.share-toast {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-toast.show {
    bottom: 30px;
    opacity: 1;
}

/* ==========================================================================
   6. تنسيق قسم الـ QR Code التفاعلي وطباعته
   ========================================================================== */
.qr-section {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 40px;
}

.qr-card-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: #f8fafc; 
    padding: 25px;
    border-radius: 18px;
    border: 1px dashed #cbd5e1; 
}

.qr-info { flex: 1; }
.qr-info h3 { margin: 0 0 10px 0; color: var(--text-main); font-size: 1.2rem; font-weight: 700; }
.qr-info p { margin: 0 0 20px 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.btn-download-qr {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-download-qr:hover {
    background: #003d80;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2);
}

.qr-display-box {
    background: var(--white);
    padding: 15px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode img, #qrcode canvas { max-width: 100%; height: auto; display: block; }

@media (max-width: 650px) {
    .qr-card-wrapper { flex-direction: column-reverse; text-align: center; gap: 20px; }
    .btn-download-qr { display: flex; width: 100%; justify-content: center; }
}

/* ==========================================================================
   7. زر الواتساب العائم التفاعلي (Floating WhatsApp)
   ========================================================================== */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px; 
    background-color: #25d366; 
    color: #ffffff !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem; 
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    z-index: 9999; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsapp-pulse 2s infinite;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20ba5a;
    box-shadow: 0 12px 30px rgba(32, 186, 90, 0.5);
}

@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .floating-whatsapp-btn { bottom: 20px; left: 20px; width: 55px; height: 55px; font-size: 2rem; }
}