/* =============================================
   single-company.css
   يُضاف في: public/website/css/single-company.css
   ويُستدعى من الـ blade بـ:
   <link rel="stylesheet" href="{{ asset('website/css/single-company.css') }}">
============================================= */

/* ── Variables ─────────────────────────────── */
:root {
    --brand:        #256358;
    --brand-light:  #e8f3f1;
    --brand-dark:   #1a4840;
    --text-primary: #1a1a1a;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --bg-page:      #f8f9fa;
    --bg-card:      #ffffff;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:    0 4px 12px rgba(0,0,0,.08);
}

/* ── Pagination ─────────────────────────────── */
.page-item.active .page-link { background-color: var(--brand); border-color: var(--brand); }
.page-link { color: var(--brand); }

/* ── RTL table fix ──────────────────────────── */
td { text-align: right; }

/* ── Search section ─────────────────────────── */
.sc-search-section {
    background: var(--brand);
    padding: 32px 0;
}
.sc-search-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    box-shadow: var(--shadow-md);
}
.sc-search-form .input-wrap {
    position: relative;
    flex: 1;
}
.sc-search-form .input-wrap i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}
.sc-search-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 38px 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color .2s;
}
.sc-search-form input:focus { border-color: var(--brand); }
.sc-search-form .btn-search {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s;
}
.sc-search-form .btn-search:hover { background: var(--brand-dark); }
@media (max-width: 575px) {
    .sc-search-form { flex-direction: column; }
    .sc-search-form .btn-search { width: 100%; }
}

/* ── Page layout ────────────────────────────── */
.sc-page { background: var(--bg-page); padding: 32px 0 60px; }
.sc-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 991px) {
    .sc-layout { grid-template-columns: 1fr; }
    .sc-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 575px) {
    .sc-sidebar { grid-template-columns: 1fr; }
}

/* ── Card base ──────────────────────────────── */
.sc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}
.sc-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.sc-card-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.sc-card-header .header-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 14px;
    flex-shrink: 0;
}
.sc-card-body { padding: 20px; }

/* ── Hero card ──────────────────────────────── */
.sc-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 16px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
@media (max-width: 575px) {
    .sc-hero { flex-direction: column; align-items: center; text-align: center; }
}
.sc-hero__logo {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    object-fit: contain;
    background: var(--bg-page);
    flex-shrink: 0;
    padding: 8px;
}
.sc-hero__body { flex: 1; min-width: 0; }
.sc-hero__name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.3;
}
.sc-hero__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-wrap;
    margin: 0 0 16px;
}
.sc-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Tag / Badge ────────────────────────────── */
.sc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background .15s;
}
.sc-tag:hover { background: #d0e8e3; color: var(--brand-dark); }

/* ── Locked (for-registered-only) ───────────── */
.sc-locked {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Share bar ──────────────────────────────── */
.sc-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 0 0;
    margin-top: 14px;
    border-top: 1px solid var(--border);
}
.sc-share__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Info grid (inside sc-card-body) ────────── */
.sc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    padding: 20px;
}
.sc-info-item { display: flex; flex-direction: column; gap: 4px; }
.sc-info-item__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.sc-info-item__value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ── Table ──────────────────────────────────── */
.sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sc-table thead tr {
    background: var(--bg-page);
}
.sc-table th {
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    text-align: right;
}
.sc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}
.sc-table tbody tr:last-child td { border-bottom: none; }
.sc-table tbody tr:hover { background: var(--bg-page); }
.sc-table a { color: var(--brand); text-decoration: none; }
.sc-table a:hover { text-decoration: underline; }

/* ── Branches ───────────────────────────────── */
.sc-branch-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.sc-branch-item:last-child { border-bottom: none; }
.sc-branch-address {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.6;
}
.sc-map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand);
    font-size: 13px;
    margin-right: 8px;
    text-decoration: none;
}
.sc-map-link:hover { text-decoration: underline; }
.sc-branch-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.sc-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: border-color .15s;
}
.sc-contact-link:hover { border-color: var(--brand); color: var(--brand); }

/* ── Social icons ───────────────────────────── */
.sc-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-page);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 16px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sc-social-link:hover { background: var(--brand-light); color: var(--brand); }

/* ── Pictures grid ──────────────────────────── */
.sc-pictures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.sc-picture-item {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-page);
}
.sc-picture-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}
.sc-picture-item:hover img { transform: scale(1.04); }

/* ── Files grid ─────────────────────────────── */
.sc-files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.sc-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
    width: 90px;
    text-align: center;
    transition: border-color .15s;
}
.sc-file-item img { width: 48px; height: 48px; object-fit: contain; }
.sc-file-item:hover { border-color: var(--brand); color: var(--brand); }

/* ── Videos grid ────────────────────────────── */
.sc-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.sc-video-item {
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}
.sc-video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Sidebar ads ────────────────────────────── */
.sc-sidebar-ad {
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}
.sc-sidebar-ad .ads-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.sc-sidebar-ad .ads-skeleton {
    position: absolute;
    inset: 0;
    background: #f0f0f0;
    overflow: hidden;
}
.sc-sidebar-ad .ads-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, #fff 50%, transparent 100%);
    animation: shimmer 1.4s infinite;
    opacity: .5;
}
@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.sc-sidebar-ad .ads-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .4s ease;
}
.sc-sidebar-ad .ads-img.loaded { opacity: 1; }

/* ── ShareThis overrides ────────────────────── */
.at-style-responsive .at-share-btn { padding: 0; }
#st-1 .st-btn > img { margin-top: 0; }
