/* ============================================================
   profile.css — Styles specific to Company Profile.html
   ============================================================ */

/* ----- Header ----- */
.profile-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 50px 0;
    color: white;
}

.profile-header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.profile-info              { flex: 1; min-width: 250px; }
.profile-info h1           { font-size: var(--fs-2xl); font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta              { display: flex; gap: 16px; flex-wrap: wrap; opacity: 0.9; font-size: var(--fs-base); }
.profile-meta i            { margin-inline-end: 4px; }

.verified-pill {
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 700;
}

/* ----- Two-column layout ----- */
.profile-layout {
    max-width: var(--container);
    margin: 30px auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

/* ----- Content sections ----- */
.profile-section {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.profile-section h2 {
    font-size: var(--fs-md);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section h2 i { color: var(--accent); }

/* ----- Gallery ----- */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gallery img {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.gallery img:hover { transform: scale(1.03); }

/* ----- Video / Map embeds ----- */
.video-wrap,
.map-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.map-wrap { padding-bottom: 45%; }

.video-wrap iframe,
.map-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ----- Classification tags ----- */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    background: var(--bg-soft);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--primary-dark);
}

/* ----- Contact sidebar ----- */
.contact-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    align-items: center;
}

.contact-row:last-child { border-bottom: none; }

.contact-row i {
    width: 36px;
    height: 36px;
    background: var(--bg-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-row .label { font-size: var(--fs-sm); color: var(--text-muted); }
/* قيم التواصل (هاتف/واتساب/بريد/موقع) بيانات LTR، فنفرض اتجاهها يساراً حتى لا يعكس RTL ترتيب مقاطع الرقم */
.contact-row .value { font-weight: 700; color: var(--text-dark); word-break: break-all; direction: ltr; }
[dir="rtl"] .contact-row .value { text-align: right; }

.hidden-value {
    filter: blur(5px);
    -webkit-user-select: none;
    user-select: none;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   === Polish Layer ===
   ============================================================ */

/* Profile header enhanced with pattern overlay */
.profile-header {
    position: relative;
    overflow: hidden;
}
.profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.profile-header-inner {
    position: relative;
    z-index: 1;
}

.profile-avatar {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.profile-avatar:hover { transform: scale(1.05) rotate(-2deg); }

.verified-pill {
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Rating row under title (opt-in) */
.profile-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffd84d;
    font-size: var(--fs-base);
    margin-top: 4px;
}
.profile-rating .rating-count {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    margin-inline-start: 6px;
    font-size: var(--fs-sm);
}

/* Section hover lift */
.profile-section {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.profile-section:hover {
    box-shadow: 0 10px 30px rgba(26, 82, 118, 0.1);
}

/* Tags hover */
.tag {
    transition: all 0.25s ease;
    cursor: default;
    border: 1px solid transparent;
}
.tag:hover {
    background: rgba(26, 82, 118, 0.1);
    border-color: rgba(26, 82, 118, 0.2);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Gallery enhanced */
.gallery img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
    position: relative;
}
.gallery-cell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.gallery-cell::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    background: rgba(14, 47, 68, 0.55);
    color: white;
    font-size: var(--fs-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.gallery-cell:hover::after { opacity: 1; }
.gallery-cell img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-cell:hover img { transform: scale(1.1); }

/* Contact row polish */
.contact-row {
    transition: background 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    margin: 0 -8px;
}
.contact-row:hover {
    background: var(--bg-soft);
}
.contact-row i {
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.contact-row:hover i {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Copy button */
.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: var(--fs-sm);
    transition: all 0.2s ease;
    margin-inline-start: auto;
    opacity: 0;
}
.contact-row:hover .copy-btn { opacity: 1; }
.copy-btn:hover {
    background: var(--primary);
    color: white;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.contact-row > div:nth-child(2) { flex: 1; min-width: 0; }

/* ============================================================
   === Header improvements ===
   ============================================================ */
.profile-header-inner {
    align-items: center;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.15);
    background: white;
}

.avatar-badge {
    position: absolute;
    bottom: 4px;
    inset-inline-end: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

.profile-header-actions {
    display: flex;
    gap: 8px;
    align-self: center;
    flex-shrink: 0;
}

/* ============================================================
   === About section: achievements ===
   ============================================================ */
.about-text {
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 22px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding-top: 22px;
    border-top: 1px dashed var(--border-soft);
}

.about-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 82, 118, 0.10);
    background: white;
}

.about-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-md);
    flex-shrink: 0;
}

.about-stat:nth-child(2) .about-stat-icon { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.about-stat:nth-child(3) .about-stat-icon { background: linear-gradient(135deg, var(--success), #2ecc71); }
.about-stat:nth-child(4) .about-stat-icon { background: linear-gradient(135deg, var(--primary-light), #5dade2); }

.about-stat-value {
    font-size: var(--fs-lg);
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1.1;
}

.about-stat-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

@media (max-width: 720px) {
    .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   === Video placeholder ===
   ============================================================ */
.video-placeholder {
    background: linear-gradient(135deg, var(--bg-soft), #e8eef3);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 50px 20px;
    text-align: center;
    color: var(--text-muted);
}

.video-placeholder i {
    font-size: var(--icon-lg);
    color: var(--border);
    margin-bottom: 12px;
    display: block;
}

.video-placeholder p {
    font-size: var(--fs-base);
    margin: 0;
}

/* ============================================================
   === Contact reveal CTA ===
   ============================================================ */
.reveal-contact {
    margin-top: 18px;
    text-align: center;
}

.contact-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(230, 126, 34, 0.3);
    border-radius: 10px;
    background: rgba(230, 126, 34, 0.08);
    color: var(--text-dark);
    text-align: start;
    font-size: var(--fs-sm);
    line-height: 1.8;
}

.contact-disclaimer i {
    flex: 0 0 auto;
    margin-top: 5px;
    color: var(--accent);
}

.contact-disclaimer p {
    margin: 0;
}

.btn-reveal {
    padding: 16px 24px;
    font-size: var(--fs-md);
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(230, 126, 34, 0.35);
    animation: revealPulse 2.4s ease-in-out infinite;
}
.btn-reveal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(230, 126, 34, 0.5);
    animation: none;
}
@keyframes revealPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(230, 126, 34, 0.35); }
    50%      { box-shadow: 0 10px 30px rgba(230, 126, 34, 0.55), 0 0 0 6px rgba(230, 126, 34, 0.12); }
}

.reveal-hint {
    margin-top: 12px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.reveal-hint i { color: var(--success); }

.contact-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    font-weight: 700;
}
.btn-whatsapp:hover {
    background: #1da851;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

/* ============================================================
   === Lightbox ===
   ============================================================ */
.bn-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 30, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 30px;
    animation: lbFadeIn 0.25s ease;
}
.bn-lightbox.active { display: flex; }

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.bn-lightbox img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: lbZoomIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lbZoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.bn-lightbox button {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.bn-lightbox button:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.08);
}
.bn-lb-close { top: 24px; inset-inline-end: 24px; }
.bn-lb-prev  { top: 50%; inset-inline-start: 24px; transform: translateY(-50%); }
.bn-lb-next  { top: 50%; inset-inline-end: 24px;   transform: translateY(-50%); }
.bn-lb-prev:hover { transform: translateY(-50%) scale(1.08); }
.bn-lb-next:hover { transform: translateY(-50%) scale(1.08); }

.bn-lb-counter {
    position: absolute;
    bottom: 24px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
}

/* ===== Reviews Section ===== */
.review-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-soft);
}

.review-avg-score {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.review-stars-display { display: flex; gap: 2px; }
.review-stars-display .star-filled { color: #f1c40f; font-size: var(--fs-md); }
.review-stars-display .star-empty  { color: #ddd; font-size: var(--fs-md); }
.review-stars-display.small .star-filled,
.review-stars-display.small .star-empty { font-size: var(--fs-sm); }
.review-count { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }

.review-card {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.review-author { font-weight: 600; color: var(--primary-dark); font-size: var(--fs-sm); }
.review-date   { font-size: var(--fs-sm); color: var(--text-muted); margin-inline-start: auto; }
.review-body   { color: var(--text-dark); font-size: var(--fs-base); line-height: 1.7; margin: 0; }
.review-empty  { color: var(--text-muted); font-style: italic; text-align: center; padding: 20px 0; }

/* Star rating input (reverse trick for RTL-friendly CSS) */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 12px;
}

.star-radio { display: none; }

.star-label {
    font-size: var(--fs-2xl);
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.star-radio:checked ~ .star-label {
    color: #f1c40f;
}

.review-form-wrap {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.review-form-wrap h3 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.review-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-size: var(--fs-base);
    resize: vertical;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.review-textarea:focus { outline: none; border-color: var(--primary-light); }

.review-login-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: var(--fs-base);
    flex-wrap: wrap;
}

/* ============================================================
   === Verified explanation tooltip (شرح "موثّقة" للجمهور) ===
   ============================================================ */
.verified-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-inline-start: 6px;
    cursor: help;
}
.verified-help > i { font-size: var(--fs-sm); opacity: 0.9; }
.verified-tip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 140%;
    inset-inline-end: 0;
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: var(--fs-sm);
    font-weight: 400;
    line-height: 1.6;
    width: max-content;
    max-width: 280px;
    white-space: normal;
    text-align: start;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 200;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}
.verified-help:hover .verified-tip,
.verified-help:focus .verified-tip,
.verified-help:focus-within .verified-tip { visibility: visible; opacity: 1; }

/* WhatsApp inline icon in contact rows */
.contact-row .wa-icon { color: #25D366; }

/* ============================================================
   === Equipment / materials table (للجمهور) ===
   ============================================================ */
.equip-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
}
.equip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 480px;
}
.equip-table thead th {
    background: var(--bg-soft);
    color: var(--primary-dark);
    font-weight: 700;
    text-align: start;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.equip-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    color: var(--text-dark);
}
.equip-table tbody tr:last-child td { border-bottom: none; }
.equip-table tbody tr:nth-child(even) { background: rgba(26, 82, 118, 0.025); }
.equip-table tbody tr:hover { background: rgba(41, 128, 185, 0.06); }
.equip-thumb {
    width: 56px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: zoom-in;
}
.equip-noimg { color: var(--text-muted); }
.catalog-download { margin-top: 16px; }

.supply-items-block { margin-bottom: 22px; }
.supply-items-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.supply-table .supply-no-col {
    width: 56px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
}
