/* ==========================================================================
   Additions on top of the original site stylesheet:
   top bar (social icons / email / language), news section & pages.
   ========================================================================== */

:root { --topbar-h: 44px; }

/* Top bar sits inside the fixed <nav>, above the logo row */
.topbar {
  background: var(--navy);
  color: white;
  margin: -0.8rem 0 0.8rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
/* The upper strip contains only the language control. */
.topbar-inner { display: flex; justify-content: flex-end; align-items: center; width: 100%; }
.topbar-contact { display: flex; align-items: center; }

/* Fixed contact dock stays at the physical left in both reading directions. */
.social-dock {
  position: fixed;
  top: max(125px, calc(var(--site-header-height, 170px) + 10px));
  left: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-dock a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(226,193,88,0.45);
  background: var(--navy);
  color: var(--gold-light);
  box-shadow: 0 3px 10px rgba(11,19,43,0.2);
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .social-dock a:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(11,19,43,0.3); }
}
.social-dock a.dock-email { background: #fff; border-color: #fff; }
.social-dock a.dock-facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.social-dock a.dock-tiktok { background: #15171b; border: 2px solid #FE2C55; }
.social-dock svg { width: 23px; height: 23px; display: block; }
/* Reserve a clear edge for the dock beside the welcome text. */
#hero .hero-content { padding-inline: 76px; }
.social-dock a:active { transform: scale(0.94); }
.social-dock a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.topbar .lang-switch { padding: 0.3rem 0.85rem; font-size: 0.85rem; background: var(--blue-light); }
.topbar .lang-switch:hover { background: var(--gold); color: var(--navy); }
.topbar .lang-switch span { white-space: nowrap; }

/* Push page content down by the extra top bar height */
#hero, .page-band { margin-top: calc(70px + var(--topbar-h)); }

@media (max-width: 768px) {
  .nav-links { top: 100%; }
}
@media (max-width: 520px) {
  .topbar-inner { padding: 0 0.75rem; gap: 0.5rem; }
  .topbar-contact { gap: 0.4rem; }
  .topbar .lang-switch { padding: 0.25rem 0.55rem; font-size: 0.75rem; }
  .topbar .lang-switch i { display: none; }
}

/* ==========================================================================
   News
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.news-card { padding: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.news-card .news-thumb { aspect-ratio: 16 / 10; background: var(--gray-100) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--gray-600); font-size: 2.5rem; }
.news-card .news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .news-body { padding: 1.3rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.news-card h3 { font-size: 1.15rem; color: var(--navy); }
.news-card p { color: var(--gray-600); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { color: var(--gold); font-weight: 700; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.news-more { margin-top: auto; color: var(--blue); font-weight: 700; font-size: 0.9rem; }
.news-empty, .news-loading { text-align: center; color: var(--gray-600); padding: 2rem 0; grid-column: 1 / -1; }
.news-actions { text-align: center; margin-top: 3rem; }
.news-actions .btn { background: var(--blue); border-color: var(--blue); color: white; }
.news-actions .btn:hover { background: transparent; color: var(--blue); }

.news-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: -1.5rem 0 2.5rem; }
.news-filter button { border: 1px solid #e2e8f0; background: white; color: var(--gray-600); padding: 0.4rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; transition: var(--transition); }
.news-filter button.active, .news-filter button:hover { background: var(--navy); color: white; border-color: var(--navy); }

.article { max-width: 860px; margin: 0 auto; }
.article-cover { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; max-height: 520px; object-fit: cover; }
.article-text { font-size: 1.08rem; color: var(--gray-800); white-space: pre-line; margin-top: 1.5rem; }
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem; }
.article-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: zoom-in; box-shadow: var(--shadow); }
.lightbox { position: fixed; inset: 0; background: rgba(11,19,43,0.92); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 2rem; cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Misrata identity and editorial gallery */
.logo { text-decoration: none; }
.logo img { object-fit: contain; border-radius: 12px; background: #fff; }
.footer-col .logo { display: flex; }
.gallery-card { font: inherit; text-align: start; border: 1px solid #e2e8f0; cursor: pointer; overflow: hidden; }
.gallery-card .news-thumb { overflow: hidden; }
.gallery-card img { transition: transform 0.35s ease; }
.gallery-card:hover img { transform: scale(1.04); }
.gallery-card:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.lightbox figure { max-width: 1100px; max-height: 90vh; text-align: center; color: white; }
.lightbox figure img { max-height: 78vh; object-fit: contain; }
.lightbox figcaption { padding: 0.8rem; }
.lightbox-close { position: absolute; top: 1rem; inset-inline-end: 1rem; width: 44px; height: 44px; background: white; color: var(--navy); border: 0; border-radius: 50%; font-size: 2rem; cursor: pointer; }
#about .about-grid-profile { grid-template-columns: minmax(0, 1fr); max-width: 960px; margin-inline: auto; }
@media (max-width: 520px) {
  .logo { font-size: 0.95rem; }
  .logo img { width: 64px !important; height: 64px !important; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Bilingual contact directory; telephone numbers retain their reading order. */
.contact-phones { margin-block: 1.2rem; border-block: 1px solid rgba(255,255,255,0.16); }
.contact-phone-row { padding-block: 0.8rem; }
.contact-phone-row + .contact-phone-row { border-block-start: 1px solid rgba(255,255,255,0.1); }
.contact-phone-label { color: rgba(255,255,255,0.85); font-weight: 600; margin-block-end: 0.3rem; }
.contact-phone-numbers { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.footer-col .contact-phone-numbers a { margin: 0; min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-light); font-weight: 700; letter-spacing: 0.03em; }
.footer-col .contact-phone-numbers a:hover { padding-inline-start: 0; text-decoration: underline; }
.footer-col .contact-location { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.contact-location i { color: var(--gold); flex-shrink: 0; }
