/* =============================================================
   LAPI RESEARCH GROUP — Header & Footer Styles
   ============================================================= */

/* ---- HEADER ---- */
.lapi-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #1a5632;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.22);
}

/* Admin bar offset */
.admin-bar .lapi-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .lapi-header { top: 46px; } }

/* ---- BRAND ---- */
.lapi-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.lapi-logo-badge {
  width: 32px;
  height: 32px;
  background: #D4840A;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 15px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.lapi-brand-text { display: flex; flex-direction: column; }
.lapi-brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 13px;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
}
.lapi-brand-sub {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 1px;
}

/* ---- NAV MENU ---- */
.lapi-nav { display: flex; align-items: center; }

.lapi-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
}

.lapi-nav-list li { position: relative; }

.lapi-nav-list li a {
  display: block;
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
  font-family: system-ui, sans-serif;
  line-height: 1.4;
}

.lapi-nav-list li a:hover,
.lapi-nav-list li.current-menu-item > a,
.lapi-nav-list li.current-page-ancestor > a,
.lapi-nav-list li.current_page_item > a {
  color: #F0A020;
  background: rgba(255,255,255,0.10);
}

/* ---- MOBILE TOGGLE BUTTON ---- */
.lapi-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.lapi-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.lapi-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* Animated X when open */
.lapi-nav-toggle[aria-expanded="true"] .lapi-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.lapi-nav-toggle[aria-expanded="true"] .lapi-burger span:nth-child(2) {
  opacity: 0;
}
.lapi-nav-toggle[aria-expanded="true"] .lapi-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- MOBILE NAV ---- */
@media (max-width: 960px) {
  .lapi-nav-toggle { display: flex; }

  .lapi-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #133f25;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.28);
    /* Stack below header */
    z-index: 9998;
  }
  /* When open */
  .lapi-nav.is-open {
    max-height: 600px;
    padding: 8px 0 12px;
  }

  .lapi-nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .lapi-nav-list li a {
    padding: 10px 20px;
    border-radius: 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .lapi-nav-list li:last-child a { border-bottom: none; }

  /* Keep header in flow when open */
  .lapi-header { position: sticky; flex-wrap: wrap; height: auto; min-height: 56px; }
}

@media (max-width: 400px) {
  .lapi-brand-sub { display: none; }
  .lapi-brand-name { font-size: 12px; }
}

/* ---- PAGE CONTENT WRAPPER ---- */
.lapi-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   FOOTER
   ============================================================ */
.lapi-footer {
  background: #133f25;
  flex-shrink: 0;
}
.lapi-footer-inner {
  padding: 2.25rem 2.5rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.lapi-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1rem;
}

/* Brand col */
.lapi-footer-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 15px;
  color: #fff;
  display: block;
  margin-bottom: 8px;
}
.lapi-footer-brand p {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  max-width: 260px;
  margin: 0;
}

/* Footer columns */
.lapi-footer-col h5 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 10px;
  font-family: system-ui, sans-serif;
}

/* Footer nav links */
.lapi-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lapi-footer-links li a,
.lapi-footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color .15s;
  display: block;
}
.lapi-footer-links li a:hover,
.lapi-footer-links a:hover { color: rgba(255,255,255,0.75); }

.lapi-footer-address {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.7;
  margin-top: 8px;
  font-style: normal;
}

/* Footer bottom bar */
.lapi-footer-bottom {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.lapi-footer-bottom a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
}
.lapi-footer-bottom a:hover { color: rgba(255,255,255,0.6); }

/* Footer responsive */
@media (max-width: 768px) {
  .lapi-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lapi-footer-brand {
    grid-column: 1 / -1;
  }
  .lapi-footer-inner { padding: 1.75rem 1.25rem 1.25rem; }
}
@media (max-width: 480px) {
  .lapi-footer-grid { grid-template-columns: 1fr; }
  .lapi-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   ENSURE CONTENT FILLS BETWEEN HEADER & FOOTER
   ============================================================ */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.lapi-content { flex: 1 0 auto; }

/* Elementor sections inside content */
.elementor-section,
.e-con { width: 100% !important; }

/* Prevent Elementor from overflowing under sticky header */
.elementor-sticky { top: 56px !important; }
.admin-bar .elementor-sticky { top: 88px !important; }
