/* Shared: header 3-line fix, footer developer link, responsive helpers */

/* ── Default site scale 100% ── */
html {
  zoom: 1;
}
@supports not (zoom: 1) {
  html {
    font-size: 100%;
  }
}

/* ── Header brand — exactly 3 lines on all pages ── */
.logo-link .header-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 320px;
  overflow: visible;
}
.header-text h1,
.header-ministry-title {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  line-height: 1.18 !important;
  margin: 0 !important;
  font-size: clamp(0.74rem, 1.08vw, 0.98rem) !important;
  font-weight: 800 !important;
}
.header-line-1,
.header-line-2 {
  font-weight: 800 !important;
}
.header-line-1 {
  display: block !important;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.18 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.header-line-2 {
  display: block !important;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.18 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-header-flag-wrap .header-text h1,
.site-header-flag-wrap .header-text p,
.site-header-flag-wrap .header-line-1,
.site-header-flag-wrap .header-line-2 {
  color: #ffffff !important;
  text-shadow: none !important;
}
.header-text p {
  display: block;
  margin-top: 2px !important;
  line-height: 1.15 !important;
  font-size: clamp(0.64rem, 0.88vw, 0.82rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.9px !important;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Protect header from page CSS (e.g. Tailwind preflight on /news) */
.site-header-flag-wrap .header-text h1,
.site-header-flag-wrap .header-ministry-title,
.site-header-flag-wrap .header-line-1,
.site-header-flag-wrap .header-line-2 {
  font-size: clamp(0.74rem, 1.08vw, 0.98rem) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}
.site-header-flag-wrap .header-text p {
  font-size: clamp(0.64rem, 0.88vw, 0.82rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.9px !important;
  text-transform: uppercase;
  margin-top: 2px !important;
  line-height: 1.15 !important;
}

@media (max-width: 1200px) {
  .logo-link .header-text { max-width: 300px; }
  .header-text h1 { font-size: 0.82rem !important; }
  .header-text p { font-size: 0.62rem !important; }
}

@media (max-width: 992px) {
  .logo-link .header-text { max-width: 240px; }
  .header-line-1, .header-line-2 { white-space: normal; }
}

@media (max-width: 480px) {
  .logo-link .header-text { max-width: calc(100vw - 120px); }
  .header-text h1 { font-size: 0.62rem !important; }
  .header-text p { font-size: 0.5rem !important; white-space: normal; }
}

/* ── Footer developer link ── */
.footer__developed {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
}
.footer__developer-link {
  color: #fff;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: color 0.25s ease, transform 0.25s ease;
}
.footer__developer-link:hover {
  color: #ffd54f;
  transform: translateY(-1px);
}
.mobile-menu-copyright .footer__developer-link {
  color: rgba(255, 255, 255, 0.85);
}

/* ── Unified site footer layout (colors: flag-footer-premium.css) ── */
.footer {
  color: #fff;
  padding: 90px 0 0;
  position: relative;
  overflow: hidden;
  margin-top: auto;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 50px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 6%;
  position: relative;
  z-index: 2;
}
.footer__brand-section img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 26px;
  border: 4px solid rgba(255, 255, 255, 0.45);
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.footer__desc {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 26px;
  font-weight: 500;
}
.footer__contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
}
.footer__contact-info i {
  color: #ffd54f;
  margin-top: 3px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.footer__column h4 {
  color: #fff;
  margin-bottom: 30px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding-bottom: 14px;
}
.footer__column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #3266b5, #fff);
  border-radius: 2px;
}
.footer__column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__column ul li {
  margin-bottom: 14px;
}
.footer__column ul li a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease, padding 0.3s ease;
}
.footer__column ul li a:hover {
  color: #fff;
  padding-left: 4px;
}
.footer__subscribe-form {
  display: flex;
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.footer__subscribe-form input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.97);
  color: #1a2e1b;
  font-weight: 500;
}
.footer__subscribe-form button {
  background: linear-gradient(135deg, #427cd0, #3266b5);
  color: #fff;
  border: none;
  padding: 0 30px;
  font-weight: 800;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.3s ease;
}
.footer__subscribe-form button:hover {
  background: linear-gradient(135deg, #2855a0, #1f4080);
}
.footer__column--subscribe .footer__desc {
  margin-bottom: 14px;
}
.footer__social {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px !important;
  margin-top: 30px;
}
.footer__social a {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  font-size: 16px !important;
  text-decoration: none !important;
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}
.footer__social a:hover {
  background: #427cd0 !important;
  color: #fff !important;
  transform: translateY(-5px) rotate(-6deg);
  box-shadow: 0 12px 30px rgba(66, 124, 208, 0.5);
  border-color: #427cd0 !important;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 32px 0;
  margin-top: 60px;
  position: relative;
  z-index: 2;
}
.footer__bottom-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__bottom-inner p {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.8;
  font-weight: 500;
}
.footer__bottom-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  margin-left: 28px;
  font-size: 13px;
  font-weight: 500;
}
.footer__bottom-links a:hover { color: #fff; }
@media (max-width: 1024px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ── Back to top (shared via site-footer partial) ── */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #427cd0, #3266b5);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 10px 30px rgba(66, 124, 208, 0.4);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 14px 36px rgba(66, 124, 208, 0.55);
}
@media (max-width: 768px) {
  .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}

/* ── Language-aware bilingual labels (site-wide) ── */
.lang-en .bi-label__so,
.lang-ar .bi-label__so { display: none !important; }
.lang-so .bi-label__en { display: none !important; }

.lang-en .hero-subtitle-so,
.lang-ar .hero-subtitle-so { display: none !important; }
.lang-so .hero-subtitle-en { display: none !important; }

.lang-en .status-so,
.lang-ar .status-so { display: none !important; }
.lang-so .status-en { display: none !important; }

.lang-en .category-tag__so,
.lang-ar .category-tag__so { display: none !important; }
.lang-so .category-tag__en { display: none !important; }

.lang-en .project-title--so:not(.project-title-block--single .project-title--so),
.lang-ar .project-title--so:not(.project-title-block--single .project-title--so) { display: none !important; }
.lang-so .project-title-en { display: none !important; }
.lang-en .project-desc--so:not(:only-child),
.lang-ar .project-desc--so:not(:only-child) { display: none !important; }
.lang-so .project-desc-en { display: none !important; }
