/* =========================================================
   SHARED SHELL CSS (NAV + FOOTER + RESPONSIVE)
   Works with: /includes/nav.php and /includes/footer.php
   ========================================================= */

:root{
  --max: 1120px;

  --dark: #0b1220;
  --darker: #020617;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;

  --brand-1: #2563eb;
  --brand-2: #60a5fa;
  --brand-soft: #93c5fd;

  --nav-grad: linear-gradient(135deg, #081a3a, #0b3a6f, #020617);

  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-nav: 0 10px 30px rgba(0,0,0,.45);
  --shadow-soft: 0 10px 25px rgba(0,0,0,.08);
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

html, body{
  margin: 0;
  padding: 0;
}

body{
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: #f8fafc;
  line-height: 1.6;
}

a{
  color: inherit;
  text-decoration: none;
}

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

.container{
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

body.menu-open{
  overflow: hidden;
}

/* ================= NAV ================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--nav-grad);
  box-shadow: var(--shadow-nav);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-inner{
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-weight: 900;
  letter-spacing: .4px;
  font-size: 1.05rem;
  color: #fff;
}

.brand:hover,
.brand:focus-visible{
  color: #fff;
}

.brand-badge{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-1));
  box-shadow: 0 10px 25px rgba(37,99,235,.35);
  flex-shrink: 0;
}

.brand span{
  color: var(--brand-soft);
}

.links{
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.links a{
  position: relative;
  padding: 10px 2px;
  color: #fff;
  opacity: .96;
  transition: opacity .2s ease;
}

.links a:hover{
  opacity: 1;
}

.links a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width .22s ease;
}

.links a:hover::after,
.links a[aria-current="page"]::after{
  width: 100%;
}

.hamburger{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hamburger > div{
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span{
  width: 18px;
  height: 2px;
  background: #fff;
  display: block;
}

.hamburger:focus-visible,
.links a:focus-visible,
.brand:focus-visible,
#closeBtn:focus-visible,
.mLink:focus-visible,
.footer-links a:focus-visible{
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.offcanvas{
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.offcanvas-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
}

.offcanvas-panel{
  position: absolute;
  top: 0;
  right: -340px;
  width: min(84vw, 320px);
  height: 100dvh;
  background: linear-gradient(160deg, #081a3a, #020617);
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  transition: right .34s ease;
}

.offcanvas.active{
  pointer-events: auto;
}

.offcanvas.active .offcanvas-backdrop{
  opacity: 1;
}

.offcanvas.active .offcanvas-panel{
  right: 0;
}

.offcanvas-close{
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

#closeBtn{
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1;
}

.mLink{
  display: block;
  color: #fff;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  font-weight: 600;
  font-size: 14px;
  transition: background .2s ease, transform .2s ease;
}

.mLink:hover{
  background: rgba(255,255,255,.12);
  transform: translateX(2px);
}

/* ================= FOOTER ================= */
.site-footer{
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 26px 0;
  margin-top: 28px;
}

.footer-inner{
  text-align: center;
  max-width: 980px;
}

.footer-brand{
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-links{
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.footer-links a{
  font-size: 13px;
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note{
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 920px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px){
  .links{
    display: none;
  }

  .hamburger{
    display: inline-flex;
  }

  .nav-inner{
    height: 68px;
  }

  .brand{
    font-size: 1rem;
  }
}

@media (max-width: 640px){
  .container{
    width: calc(100% - 20px);
  }

  .brand{
    gap: 8px;
    font-size: .96rem;
  }

  .brand-badge{
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .footer-links{
    gap: 12px;
  }

  .footer-note{
    font-size: 12px;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
