/**
 * layout.css — الهيدر والفوتر والتخطيط العام
 */

/* ─── HEADER ─── */
header {
  background: var(--gradient-header); color: #fff;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
header.header-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}
.header-content {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-section { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logo-img {
  width: 52px; height: 52px; background: #fff; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); transition: transform .3s;
}
.logo-img:hover { transform: rotate(-5deg) scale(1.05); }
.logo-svg { width: 40px; height: 40px; }
.logo-text h1 { font-size: 19px; font-weight: 800; }
.logo-text p { font-size: 11px; opacity: .7; font-family: var(--font-heading); }

/* Navigation */
nav#mainNav { display: flex; align-items: center; gap: 4px; }
nav#mainNav a {
  color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600; transition: all .25s;
}
nav#mainNav a:hover, nav#mainNav a.active { background: rgba(255,255,255,.15); }

/* Theme toggle */
.theme-toggle {
  background: none; border: 2px solid rgba(255,255,255,.3); color: #fff;
  font-size: 18px; cursor: pointer; padding: 6px 10px; border-radius: 8px;
  transition: all .2s; line-height: 1;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); }

/* Mobile menu */
.menu-toggle {
  display: none; background: none; border: 2px solid rgba(255,255,255,.3);
  color: #fff; font-size: 22px; cursor: pointer; padding: 6px 10px;
  border-radius: 8px; transition: all .2s;
}
.menu-toggle:hover { background: rgba(255,255,255,.1); }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  nav#mainNav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--gradient-header); flex-direction: column; padding: 16px; gap: 4px;
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
  }
  nav#mainNav.open { display: flex; }
  nav#mainNav a { padding: 12px 16px; text-align: center; border-radius: 10px; font-size: 14px; }
}

/* ─── FOOTER ─── */
footer {
  background: var(--gradient-header); color: #fff;
  padding: 48px 24px; position: relative;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
}
.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-logo { width: 48px; height: 48px; margin: 0 auto 18px; }
.footer-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.footer-year { opacity: .7; font-size: 14px; }
.footer-links {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin: 20px 0 8px;
}
.footer-links a {
  color: rgba(255,255,255,.7); text-decoration: none; font-size: 13px;
  font-weight: 600; transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-whatsapp { margin-top: 14px; }
.footer-whatsapp a {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; padding: 10px 24px; border-radius: 10px;
  text-decoration: none; font-size: 13px; font-weight: 700;
  transition: all .25s; box-shadow: 0 4px 12px rgba(37,211,102,.3);
}
.footer-whatsapp a:hover { background: #1ebe5d; transform: translateY(-2px); }
.footer-copy {
  margin-top: 24px; font-size: 12px; opacity: .5;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
}

/* ─── BOTTOM NAV (mobile) ─── */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  /* Add padding to body so footer content isn't hidden behind bottom nav */
  body { padding-bottom: 64px; }
  footer { padding-bottom: 80px; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 1001; background: var(--surface);
    border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    justify-content: space-around; align-items: center;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }
  .bottom-nav-item {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text-muted);
    font-size: 10px; font-weight: 600; gap: 2px;
    padding: 4px 8px; border-radius: 8px; transition: color .2s;
    min-width: 56px;
  }
  .bottom-nav-item.active { color: var(--green-dark); }
  .bottom-nav-icon { font-size: 20px; line-height: 1; }
  .bottom-nav-label { font-size: 10px; }
}
