/* ===== Page builder blocks (resources/views/pages/blocks) ===== */
.pb-blocks {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 10px;
}

.pb-align-start { text-align: start; }
.pb-align-center { text-align: center; }
.pb-align-end { text-align: end; }

.pb-heading {
    color: #1f2a5a;
    font-weight: 700;
    line-height: 1.5;
    margin: 12px 0 0;
}
h2.pb-heading { font-size: 26px; }
h3.pb-heading { font-size: 21px; }
h4.pb-heading { font-size: 18px; }
h2.pb-heading::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 10px;
    background: #4f46e5;
    border-radius: 2px;
}
h2.pb-heading.pb-align-center::after { margin-inline: auto; }
h2.pb-heading.pb-align-end::after { margin-inline-start: auto; }

.pb-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
    margin: 0;
}

.pb-richtext {
    background: #fafafa;
    border-radius: 15px;
    padding: 28px 26px;
    border-inline-start: 4px solid #1f5f99;
}

.pb-image,
.pb-video { margin: 0 auto; width: 100%; }
.pb-size-full { max-width: 100%; }
.pb-size-wide { max-width: 900px; }
.pb-size-medium { max-width: 640px; }
.pb-size-small { max-width: 380px; }
.pb-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .08);
}
.pb-image figcaption,
.pb-video figcaption {
    margin-top: 10px;
    font-size: .95rem;
    color: #666;
    text-align: center;
}

.pb-video { max-width: 900px; }
.pb-video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .12);
}
.pb-video-frame iframe,
.pb-video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pb-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid #2A75B8;
    transition: background .2s, color .2s;
}
.pb-button-primary { background: #2A75B8; color: #fff; }
.pb-button-primary:hover { background: #4f46e5; border-color: #4f46e5; color: #2A75B8; }
.pb-button-outline { background: transparent; color: #2A75B8; }
.pb-button-outline:hover { background: #2A75B8; color: #fff; }
.pb-button:focus-visible { outline: 3px solid #4f46e5; outline-offset: 3px; }

@media (max-width: 576px) {
    h2.pb-heading { font-size: 22px; }
    .pb-richtext { padding: 20px 16px; }
}

/* ----- grid helpers (cards, gallery, columns) ----- */
.pb-cards,
.pb-gallery,
.pb-columns {
    display: grid;
    gap: 20px;
}
.pb-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ----- cards ----- */
.pb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 33, 71, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.pb-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 33, 71, .12); }
.pb-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #f3f5f8; }
.pb-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-card-body { padding: 18px 20px 22px; border-top: 3px solid #4f46e5; flex: 1; }
.pb-card-title { font-size: 18px; font-weight: 700; color: #1f2a5a; margin: 0 0 8px; line-height: 1.5; }
.pb-card-text { font-size: .98rem; color: #555; line-height: 1.8; margin: 0; }
.pb-card-link { color: inherit; text-decoration: none; }
/* whole card clickable via the title link */
.pb-card-link::after { content: ""; position: absolute; inset: 0; }
.pb-card-link:focus-visible { outline: none; }
.pb-card:focus-within { outline: 3px solid #4f46e5; outline-offset: 2px; }
.pb-card-more { display: inline-block; margin-top: 10px; color: #4f46e5; font-weight: 700; }

/* ----- gallery ----- */
.pb-gallery { gap: 12px; }
.pb-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f5f8;
}
.pb-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.pb-gallery-item:hover img { transform: scale(1.06); }
.pb-gallery-item:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.pb-gallery-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 18px 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    color: #fff;
    font-size: .85rem;
}

/* ----- columns ----- */
.pb-columns { gap: 28px; align-items: start; }
.pb-column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pb-column .pb-cards,
.pb-column .pb-gallery { grid-template-columns: 1fr; }

/* ----- accordion ----- */
.pb-accordion { display: flex; flex-direction: column; gap: 10px; }
.pb-acc-item { border: 1px solid #e3e7ee; border-radius: 12px; background: #fff; overflow: hidden; }
.pb-acc-title {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    font-weight: 700;
    font-size: 1.02rem;
    color: #1f2a5a;
    cursor: pointer;
}
.pb-acc-title::-webkit-details-marker { display: none; }
.pb-acc-title::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: .8rem;
    color: #4f46e5;
    transition: transform .2s ease;
}
.pb-acc-item[open] > .pb-acc-title { background: #f6f8fb; border-bottom: 1px solid #e3e7ee; }
.pb-acc-item[open] > .pb-acc-title::after { transform: rotate(180deg); }
.pb-acc-title:focus-visible { outline: 3px solid #4f46e5; outline-offset: -3px; }
.pb-acc-body { padding: 14px 18px 18px; line-height: 1.9; color: #444; }

/* ----- files ----- */
.pb-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pb-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    background: #fff;
    color: #1f2a5a;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.pb-file:hover { border-color: #4f46e5; background: #eef2ff; }
.pb-file:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.pb-file-icon { font-size: 26px; color: #6b7280; flex-shrink: 0; }
.pb-file-pdf { color: #d93025; }
.pb-file-doc, .pb-file-docx { color: #2b579a; }
.pb-file-xls, .pb-file-xlsx { color: #217346; }
.pb-file-ppt, .pb-file-pptx { color: #d24726; }
.pb-file-name { flex: 1; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.pb-file-meta { font-size: .82rem; color: #888; white-space: nowrap; direction: ltr; }
.pb-file-dl { color: #4f46e5; }

@media (max-width: 992px) {
    .pb-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pb-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pb-columns.pb-cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .pb-cards.pb-cols-2, .pb-cards.pb-cols-3, .pb-cards.pb-cols-4,
    .pb-columns.pb-cols-2 { grid-template-columns: 1fr; }
    .pb-gallery.pb-cols-3, .pb-gallery.pb-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== صفحة الصفحات (resources/views/pages/index) ===== */
.pb-page-cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pb-page-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}
.pb-page-meta i { color: #4f46e5; margin-inline-end: 6px; }

.pb-page-details { line-height: 2; }

.details-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    padding: 20px 25px;
    background: #fafafa;
    border-radius: 15px;
    border: 1px solid #eee;
}
.share-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2a5a;
    font-weight: 600;
}
.share-label i { color: #4f46e5; }
.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: #fff;
}
.share-facebook { background: #1877f2; }
.share-twitter { background: #000; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-linkedin { background: #0a66c2; }
.share-copy { background: #4f46e5; }
.share-copy.copied { background: #28a745; }

@media (max-width: 768px) {
    .details-share { justify-content: center; padding: 18px 15px; }
    .share-label { width: 100%; justify-content: center; }
    .share-buttons { justify-content: center; }
}
