/* Register content: newsletter archive page (page.aspx?page_key=newsletter), photo albums and video gallery.
   Colours follow style.css: gold #8e7037 / #b28b36 / #dbaf5a, brown #301a0e, cream #e9d9b3. */

/* ---------- Newsletter archive ---------- */
.tp-nl { --nl-gold: #8e7037; --nl-gold-2: #b28b36; --nl-gold-3: #dbaf5a; --nl-brown: #301a0e; --nl-cream: #f7f0e1; --nl-line: #e9d9b3;
    font-family: 'Droid Arabic Kufi', Lato, Tahoma, Arial, sans-serif; color: var(--nl-brown); margin: 0 0 30px; }
.tp-nl * { box-sizing: border-box; }

.tp-nl-hero { text-align: center; background: linear-gradient(180deg, #fff 0%, var(--nl-cream) 100%);
    border: 1px solid var(--nl-line); border-radius: 14px; padding: 24px 20px 20px; margin-bottom: 18px; }
.tp-nl-hero img { max-width: 100%; height: auto; width: 360px; display: block; margin: 0 auto 6px; }
.tp-nl-hero p { max-width: 640px; margin: 0 auto 12px; font-size: 14px; line-height: 1.9; color: #5a4636; }
.tp-nl-count { display: inline-block; background: var(--nl-gold); color: #fff; border-radius: 999px; padding: 4px 16px; font-size: 13px; }

.tp-nl-years { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.tp-nl-years a { border: 1px solid var(--nl-gold-3); color: var(--nl-gold); background: #fff; border-radius: 999px;
    padding: 4px 14px; font-size: 13px; text-decoration: none; transition: background .15s, color .15s; }
.tp-nl-years a:hover, .tp-nl-years a:focus { background: var(--nl-gold); border-color: var(--nl-gold); color: #fff; }

.tp-nl-year { margin-bottom: 26px; scroll-margin-top: 90px; }
.tp-nl-year h2 { display: flex; align-items: baseline; gap: 10px; font-size: 22px; color: var(--nl-brown); margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 2px solid var(--nl-line); }
.tp-nl-year h2 span { font-size: 13px; font-weight: normal; color: var(--nl-gold); }

.tp-nl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tp-nl-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: #fff;
    border: 1px solid var(--nl-line); border-radius: 12px; padding: 16px 10px 12px; text-decoration: none; color: var(--nl-brown);
    transition: transform .15s, box-shadow .15s, border-color .15s; }
.tp-nl-card:hover, .tp-nl-card:focus { transform: translateY(-3px); border-color: var(--nl-gold-3);
    box-shadow: 0 8px 20px rgba(48, 26, 14, .12); text-decoration: none; color: var(--nl-brown); }
.tp-nl-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--nl-cream); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tp-nl-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--nl-gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tp-nl-month { font-size: 16px; font-weight: bold; }
.tp-nl-meta { font-size: 12px; color: #8a7666; }
.tp-nl-open { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--nl-gold-2); }
.tp-nl-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 480px) {
    .tp-nl-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tp-nl-hero { padding: 16px 12px; }
    .tp-nl-year h2 { font-size: 19px; }
}

/* ---------- Photo albums, album photos and videos (PhotoAlbum.aspx, Gallery.aspx, VideoGallery.aspx) ---------- */
.tp-gal { --gal-gold: #8e7037; --gal-gold-2: #b28b36; --gal-gold-3: #dbaf5a; --gal-brown: #301a0e; --gal-cream: #f7f0e1; --gal-line: #e9d9b3;
    font-family: 'Droid Arabic Kufi', Lato, Tahoma, Arial, sans-serif; color: var(--gal-brown); margin: 0 0 30px; }
.tp-gal * { box-sizing: border-box; }

.tp-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tp-gal-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--gal-line); border-radius: 12px;
    overflow: hidden; text-decoration: none; color: var(--gal-brown); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tp-gal-card:hover, .tp-gal-card:focus { transform: translateY(-3px); border-color: var(--gal-gold-3);
    box-shadow: 0 8px 20px rgba(48, 26, 14, .12); text-decoration: none; color: var(--gal-brown); }
.tp-gal-card:focus-visible { outline: 2px solid var(--gal-gold); outline-offset: 2px; }

.tp-gal-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--gal-cream); overflow: hidden; }
.tp-gal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tp-gal-card:hover .tp-gal-cover img { transform: scale(1.04); }

.tp-gal-badge, .tp-gal-zoom { position: absolute; top: 10px; inset-inline-start: 10px; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; }
.tp-gal-zoom { opacity: 0; transition: opacity .15s; }
.tp-gal-card:hover .tp-gal-zoom, .tp-gal-card:focus .tp-gal-zoom { opacity: 1; }
.tp-gal-badge svg, .tp-gal-zoom svg { width: 18px; height: 18px; fill: none; stroke: var(--gal-gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tp-gal-play { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
    background: rgba(48, 26, 14, .72); display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.tp-gal-play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.tp-gal-card:hover .tp-gal-play { background: var(--gal-gold); transform: scale(1.08); }

.tp-gal-body { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex: 1; }
.tp-gal-title { flex: 1; font-size: 14px; font-weight: bold; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-gal-photos .tp-gal-title, .tp-gal-video .tp-gal-title { font-weight: normal; font-size: 13px; }
.tp-gal-arrow { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--gal-cream);
    display: flex; align-items: center; justify-content: center; transition: background .15s; }
.tp-gal-arrow svg { width: 15px; height: 15px; fill: none; stroke: var(--gal-gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tp-gal-card:hover .tp-gal-arrow { background: var(--gal-gold); }
.tp-gal-card:hover .tp-gal-arrow svg { stroke: #fff; }

.tp-gal-empty { text-align: center; padding: 40px 20px; background: var(--gal-cream); border: 1px dashed var(--gal-gold-3);
    border-radius: 12px; color: #5a4636; font-size: 15px; }

.tp-gal-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 22px; }
.tp-gal-pager a, .tp-gal-pager span.page-link { display: inline-block; min-width: 36px; padding: 6px 12px; border: 1px solid var(--gal-line);
    border-radius: 8px; background: #fff; color: var(--gal-gold); text-align: center; text-decoration: none; font-size: 13px; }
.tp-gal-pager a:hover, .tp-gal-pager a:focus { background: var(--gal-gold); border-color: var(--gal-gold); color: #fff; }
.tp-gal-pager .btn-current { background: var(--gal-gold); border-color: var(--gal-gold); color: #fff; }

@media (max-width: 480px) {
    .tp-gal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tp-gal-body { padding: 8px 10px; }
    .tp-gal-title { font-size: 12px; }
    .tp-gal-play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* NewsLetters.aspx: search box, year/month filters and result count */
.tp-nl-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; background: #fff; border: 1px solid var(--nl-line);
    border-radius: 12px; padding: 14px 16px; margin: 0 0 22px; }
.tp-nl-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 140px; }
.tp-nl-search { flex: 1 1 240px; }
.tp-nl-label { font-size: 12px; color: #8a7666; }
.tp-nl-filters input, .tp-nl-filters select { height: 38px; border: 1px solid var(--nl-line); border-radius: 8px; padding: 0 10px;
    font: inherit; font-size: 14px; color: var(--nl-brown); background: #fff; width: 100%; }
.tp-nl-filters input:focus, .tp-nl-filters select:focus { outline: none; border-color: var(--nl-gold-2); box-shadow: 0 0 0 3px rgba(178,139,54,.18); }
.tp-nl-reset { height: 38px; border: 1px solid var(--nl-gold-3); background: #fff; color: var(--nl-gold); border-radius: 8px; padding: 0 16px; cursor: pointer; font: inherit; font-size: 14px; }
.tp-nl-reset:hover, .tp-nl-reset:focus { background: var(--nl-gold); border-color: var(--nl-gold); color: #fff; }
.tp-nl-filters .tp-nl-count { align-self: center; margin-inline-start: auto; }
.tp-nl [hidden] { display: none !important; }
.tp-nl-empty { text-align: center; padding: 30px 12px; color: #8a7666; background: var(--nl-cream); border-radius: 12px; }
@media (max-width: 480px) {
    .tp-nl-field { min-width: 0; flex: 1 1 45%; }
    .tp-nl-filters .tp-nl-count { margin-inline-start: 0; }
}

/* Subscribe.aspx / UnSubscribe.aspx / Activation_subscriber.aspx */
.tp-sub { --sub-gold: #8e7037; --sub-gold-2: #b28b36; --sub-line: #e9d9b3; --sub-cream: #f7f0e1; margin: 6px 0 30px; }
.tp-sub * { box-sizing: border-box; }
.tp-sub-switch { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.tp-sub-link { display: inline-block; border: 1px solid var(--sub-gold-2); color: var(--sub-gold); border-radius: 999px; padding: 6px 18px; font-size: 14px; text-decoration: none; }
.tp-sub-link:hover, .tp-sub-link:focus { background: var(--sub-gold); color: #fff; text-decoration: none; }
.tp-sub-card { background: #fff; border: 1px solid var(--sub-line); border-radius: 14px; padding: 22px 22px 18px; }
.tp-sub-narrow { max-width: 560px; margin: 0 auto; }
.tp-sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.tp-sub-wide { grid-column: 1 / -1; }
.tp-sub .form-group { margin-bottom: 14px; }
.tp-sub .form-group > label { display: block; margin-bottom: 6px; font-size: 14px; color: #5a4636; }
.tp-sub .star { color: #c0392b; }
.tp-sub .form-control { height: 42px; border: 1px solid var(--sub-line); border-radius: 8px; box-shadow: none; }
.tp-sub .form-control:focus { border-color: var(--sub-gold-2); box-shadow: 0 0 0 3px rgba(178,139,54,.18); outline: none; }
.tp-sub-btn { min-width: 180px; background: var(--sub-gold) !important; border-color: var(--sub-gold) !important; color: #fff !important; border-radius: 8px; }
.tp-sub-btn:hover, .tp-sub-btn:focus { background: #6f5527 !important; border-color: #6f5527 !important; }
.tp-sub-msg { border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; font-size: 15px; line-height: 1.8; }
.tp-sub-ok { background: #eef7ee; border: 1px solid #b9dcb9; color: #2e6b2e; }
.tp-sub-error { background: #fbeeee; border: 1px solid #e8bcbc; color: #a33232; }
@media (max-width: 640px) {
    .tp-sub-grid { grid-template-columns: 1fr; }
    .tp-sub-card { padding: 16px 14px; }
    .tp-sub-btn { width: 100%; }
}

/* Header menu: 9 top-level items (المركز الإعلامي was added) no longer fit beside the logo with the theme's spacing,
   so the menu wrapped onto a second row. On desktop it now stays on one line: beside the logo when there is room,
   otherwise on its own full-width row under the logo. */
@media (min-width: 992px) {
    .main-header .header-lower .main-box { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
    .main-header .header-lower .main-box::before, .main-header .header-lower .main-box::after { display: none; }
    .main-header .header-lower .main-box .logo-box { float: none; flex: 0 0 auto; }
    .main-header .header-lower .nav-outer { float: none; flex: 1 1 auto; display: flex; justify-content: flex-end; min-width: 0; }
    .main-header .header-lower .main-menu { float: none; }
    .main-header .header-lower .main-menu .navigation { display: flex; flex-wrap: nowrap; }
    .main-header .header-lower .main-menu .navigation > li { float: none; flex: 0 0 auto; padding: 45px 7px; }
    .main-header .header-lower .main-menu .navigation > li > a { white-space: nowrap; font-size: 13.5px; }
    .main-header .sticky-header .main-menu .navigation > li > a { padding: 20px 7px; font-size: 13px; white-space: nowrap; }
}

/* 992-1199px: the container is 970px, so the 9 menu items need less padding and a smaller font to stay on one row */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-header .header-lower .main-menu .navigation > li { padding-left: 3px; padding-right: 3px; }
    .main-header .header-lower .main-menu .navigation > li > a { font-size: 12px; }
    .main-header .sticky-header .main-menu .navigation > li > a { padding: 20px 3px; font-size: 12px; }
}
