/* =========================================
   Architects Module Styles (Final Fixed Version)
   ========================================= */

/* --- 1. Archive Grid (Public) --- */
.arch-archive-container { text-align: center; max-width: 1200px; margin: 0 auto; padding: 40px 20px; direction: rtl; }
.arch-main-title { font-size: 2.5rem; margin-bottom: 30px; color: #333; }
.arch-categories-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-btn { background: #bcaaa4; color: #fff; border: none; padding: 8px 20px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-size: 1rem; }
.cat-btn:hover { background: #8d6e63; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; }
.arch-card-item { text-align: center; padding: 30px; background: #fff; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.arch-card-item:hover { transform: translateY(-5px); }
.arch-avatar-circle { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; margin: 0 auto 15px; border: 4px solid #f0f0f0; }
.arch-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.arch-card-item h3 { margin: 15px 0 5px; font-size: 1.3rem; color: #333; }
.arch-prof { color: #888; margin-bottom: 20px; font-weight: 500; }
.arch-btn-view { display: inline-block; color: #333; text-decoration: none; border-bottom: 1px solid #333; padding-bottom: 2px; font-weight: bold; }
.arch-footer-note { margin-top: 60px; background: #f9f9f9; padding: 40px; border-radius: 10px; }
.cta-join { background: #1877f2 !important; color: #fff !important; padding: 12px 25px !important; text-decoration: none; border-radius: 6px; display: inline-block; margin-top: 15px; font-weight: bold; }

/* --- 2. Digital Card (Embedded) --- */
.card-page-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.digital-card { width: 100%; max-width: 400px; border-radius: 20px; border: 2px solid #000; padding: 40px 30px; text-align: center; box-shadow: 0 15px 40px rgba(0,0,0,0.1); position: relative; box-sizing: border-box; background: #fff; margin: 0 auto; }
.card-profile-img { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 20px; overflow: hidden; border: 4px solid rgba(255,255,255,0.8); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.card-profile-img img { width: 100%; height: 100%; object-fit: cover; }
.card-name { margin: 0; font-size: 2rem; font-weight: 700; color: #222; }
.card-profession { margin: 5px 0 20px; font-size: 1.1rem; color: #666; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }
.card-business-name { font-weight: bold; margin-bottom: 20px; font-size: 1.2rem; color: #333; }
.card-content { font-size: 1rem; line-height: 1.6; margin-bottom: 30px; color: #555; }
.card-contact-details { margin-bottom: 30px; background: rgba(255,255,255,0.5); padding: 15px; border-radius: 10px; }
.detail-row { margin-bottom: 8px; font-size: 1rem; }
.detail-row a { color: #333; text-decoration: none; }
.card-socials { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.soc-icon { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-size: 22px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.soc-icon:hover { transform: scale(1.1); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.soc-icon.facebook { background: #1877f2; }
.soc-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.soc-icon.linkedin { background: #0077b5; }
.soc-icon.whatsapp { background: #25D366; }
.soc-icon.email { background: #444; }
.soc-icon.website { background: #555; }
.card-logo-bottom img { max-height: 60px; opacity: 0.9; }
.owner-bar { margin-bottom: 20px; }
.edit-btn { background: #333; color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 30px; font-size: 0.95rem; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.card-footer-search { width: 100%; max-width: 400px; margin-top: 30px; margin-left: auto; margin-right: auto; }
.card-footer-search input { width: 100%; padding: 15px; border-radius: 10px; border: none !important; background: #0c4a4a; color: #fff; text-align: center; font-size: 1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.card-footer-search input::placeholder { color: rgba(255,255,255,0.7); }

/* --- 3. Editor Styles (החלק הקריטי לעיצוב ה-2 טורים) --- */
#market-arch-editor-wrap {
    max-width: 1000px;
    margin: 0 auto;
    direction: rtl;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* כותרת עליונה */
.editor-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.editor-header-bar h2 { margin: 0; font-size: 24px; color: #333; }
.editor-header-bar p { margin: 5px 0 0; color: #777; font-size: 14px; }
.view-card-btn { background: #f9f9f9 !important; color: #333 !important; border: 1px solid #ccc !important; }

/* Grid Layout - כאן הקסם של ה-2 טורים */
.market-editor-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* יחס 2:1 לטובת התוכן */
    gap: 30px;
    align-items: start;
}

/* קוביות לבנות */
.market-card-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.box-header {
    font-size: 16px;
    font-weight: 700;
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.box-header .dashicons { color: #1877f2; font-size: 20px; }

/* שדות טופס */
.field-wrap { margin-bottom: 15px; }
.field-wrap label { display: block; font-weight: 600; font-size: 13px; color: #555; margin-bottom: 6px; }
.field-wrap input[type="text"],
.field-wrap input[type="email"],
.field-wrap select,
.field-wrap textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* תמונה */
.center-text { text-align: center; }
.profile-preview-wrapper { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; background: #eee; margin: 0 auto 15px; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.profile-preview-wrapper img { width: 100%; height: 100%; object-fit: cover; }

/* גלריה בעורך */
.editor-gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.editor-gallery-grid .gallery-thumb { width: 70px; height: 70px; border-radius: 4px; overflow: hidden; border: 1px solid #eee; }
.editor-gallery-grid .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.market-gallery-upload-btn { width: 100%; background: #f0f2f5; border: 1px solid #ccc; color: #333; }

/* כפתור שמירה צף */
.save-card-btn { width: 100%; padding: 15px; font-size: 18px; font-weight: bold; margin-top: 10px; }

/* גלריה בכרטיס הציבורי */
.card-gallery-section { margin-top: 30px; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 20px; text-align: center; }
.card-gallery-section h3 { font-size: 1.2rem; margin-bottom: 15px; text-transform: uppercase; color: #444; }
.card-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer; background: #eee; transition: transform 0.2s; }
.gallery-item:hover { transform: scale(1.05); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* מובייל */
@media (max-width: 800px) {
    .market-editor-layout { grid-template-columns: 1fr; }
    .editor-col-sidebar { order: -1; }
}

/* Fix Header Colors for Digital Card */
header .menu-item a, header .elementor-nav-menu a, .site-header a, #masthead a { color: #000 !important; }