/* Floating support button, floating/top menus, modals and PDF download buttons. */
/* زر الدعم العائم الخارجي (اليسار) */
.support-btn {
  position: fixed; bottom: 30px; left: 30px; z-index: 999;
  background: rgba(240, 98, 146, 0.14);
  color: var(--teal-dark);
  border: 1px solid rgba(240, 98, 146, 0.28);
  border-radius: 28px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(240, 98, 146, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.support-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 32px rgba(240, 98, 146, 0.22);
  background: rgba(240, 98, 146, 0.22);
  border-color: rgba(240, 98, 146, 0.38);
}
.support-btn span.text {
  font-size: 14px;
  font-weight: 900;
  display: block;
  text-align: center;
  letter-spacing: 0.25px;
}
.support-btn span.icon {
  font-size: 20px;
  line-height: 1;
}

/* القائمة العائمة */
/* القائمة العلوية (Hamburger Menu) */
.top-menu-wrap {
  position: relative;
  z-index: 998;
}
.hamburger-btn {
  background: transparent;
  border: none;
  color: var(--teal-deeper);
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  padding: 0 5px;
}
.hamburger-btn:hover { transform: scale(1.1); }
.top-menu-content {
  position: fixed;
  z-index: 1001;
  top: 68px;
  left: 0; /* تفتح لليسار */
  bottom: 0;
  background: var(--white);
  border-radius: 0 16px 16px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  max-height: 80vh;
  opacity: 1;
  pointer-events: none;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  width: min(320px, 86vw);
  max-height: calc(100vh - 68px);
  border: 1px solid var(--border);
}
.top-menu-content.is-open {
  pointer-events: auto;
  transform: translateX(0);
}
.top-menu-backdrop {
  position: fixed;
  inset: 68px 0 0;
  z-index: 997;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.top-menu-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
html.top-menu-open,
html.top-menu-open body { overflow: hidden; }
html.dark-mode .top-menu-content { background: #2a2a2a; border-color: #444; }
.top-menu-content a, .top-menu-content button.theme-item {
  padding: 14px 20px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--teal-pale);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
}
html.dark-mode .top-menu-content a, html.dark-mode .top-menu-content button.theme-item { color: #e0e0e0; border-bottom-color: #444; }
.top-menu-content a:hover, .top-menu-content button.theme-item:hover {
  background: var(--teal-pale);
  color: var(--teal-deeper);
}
html.dark-mode .top-menu-content a:hover, html.dark-mode .top-menu-content button.theme-item:hover { background: #3a3a3a; }
.top-menu-content a:last-child { border-bottom: none; }
/* تنسيقات النوافذ المنبثقة (Modals) */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000; opacity: 0; pointer-events: none; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--white); border-radius: 20px; width: 90%; max-width: 450px;
  overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: translateY(20px) scale(0.95); transition: all 0.3s ease;
  position: relative;
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }
.modal-img { width: 100%; height: 200px; object-fit: cover; flex-shrink: 0; }
.modal-content { padding: 24px; text-align: center; overflow-y: auto; }
.modal-title { font-size: 22px; font-weight: 900; color: var(--teal-deeper); margin-bottom: 10px; }
.modal-text { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.modal-close {
  background: var(--teal-pale); color: var(--teal-dark); border: none;
  padding: 12px 28px; border-radius: 12px; font-family: 'Tajawal', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; width: 100%;
  flex-shrink: 0; margin-top: 10px;
}
.modal-close:hover { background: var(--teal); color: white; }

.kofi-link {
  display: block; background: #29abe0; color: white !important;
  text-decoration: none; padding: 14px; border-radius: 12px;
  font-weight: 800; font-size: 15px; margin-bottom: 16px; transition: 0.2s;
  border: 1px solid rgba(0,0,0,0.1);
}
.kofi-link:hover { background: #1b8ebf; transform: translateY(-2px); }
.cliq-box {
  background: rgba(255,255,255,0.6); border: 1px dashed var(--teal);
  padding: 14px; border-radius: 12px; text-align: center; margin-bottom: 20px;
}
.cliq-box p { font-size: 14px; color: var(--teal-deeper); font-weight: 700; margin-bottom: 8px; }
.cliq-alias {
  background: var(--white); padding: 10px; border-radius: 8px;
  font-size: 18px; font-weight: 900; color: var(--teal-dark); letter-spacing: 1px;
  border: 1px solid var(--border);
}

@media (max-width:768px) {
nav { padding:0 16px; justify-content: space-between; }
.logo-wrapper { gap: 8px; }
  .nav-logo { font-size: 18px; }
  .nav-logo-img { width: 38px; height: 38px; }
.ask-btn { padding: 4px 10px; font-size: 12px; }
.nav-links { display:none; }
.stats-inner { grid-template-columns:repeat(2,1fr); }
.sec { padding:52px 20px; }
.floating-menu { bottom: 20px; right: 20px; }
.support-btn { bottom: 20px; left: 20px; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
  background: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

/* Unified PDF download buttons (5 sections) */
.sec-dl-wrap{grid-column:1 / -1;display:flex;justify-content:center;align-items:center;width:100%;padding:0 12px;box-sizing:border-box;}
.sec-dl-wrap .btn{
  width:340px;max-width:100%;min-height:56px;box-sizing:border-box;
  justify-content:center;text-align:center;
  padding:10px 20px;font-size:15px;line-height:1.4;
  white-space:normal;overflow-wrap:anywhere;
}
@media (max-width:600px){
  .sec-dl-wrap .btn{width:100%;max-width:320px;min-height:52px;font-size:14px;padding:10px 16px;}
}

.about-section {
  background: linear-gradient(135deg, var(--teal-pale) 0%, var(--amber-pale) 100%);
}
.about-header {
  max-width: 720px;
  margin: 0 auto 38px;
  text-align: center;
}
.about-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 18px;
}
.about-header h2 {
  color: var(--navy);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  margin-bottom: 10px;
}
.about-header p {
  color: var(--muted);
  font-size: 16px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.team-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(240,98,146,0.18);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(240,98,146,0.1);
  transition: transform .25s, box-shadow .25s;
}
.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(240,98,146,0.18);
}
.team-avatar {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  font-size: 26px;
}
.team-card h3 {
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 7px;
}
.team-role {
  min-height: 44px;
  color: var(--teal-deeper);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}
.team-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 14px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #0a66c2;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.team-linkedin:hover {
  background: #004182;
  color: white;
  transform: translateY(-2px);
}
.team-linkedin strong {
  font-size: 15px;
  line-height: 1;
}
.about-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
@media (max-width: 1000px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .team-card { padding: 18px 12px; }
  .team-card h3 { font-size: 15px; }
  .team-role { font-size: 12px; }
}
