/* ============================================================
   RP NEXUS — LAYOUT CSS
   Header · Footer · Hero Base · Split Sections · Page Hero
   ============================================================ */

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition:
    background var(--t-smooth),
    box-shadow var(--t-smooth);
}

.site-header.is-scrolled {
  background: var(--color-obsidian);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

.site-header.header-solid {
  background: var(--color-obsidian);
}

/* WordPress admin bar offset */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  width: 100%;
}

/* Logo */
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  color: var(--color-gold);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}

.site-logo:hover {
  opacity: 0.85;
}

.site-logo span {
  color: var(--color-white);
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

/* wp_nav_menu outputs <ul><li><a> — flatten into the flex row */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  display: block;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.82);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition:
    color var(--t-fast),
    background var(--t-fast);
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: var(--sp-3);
  right: var(--sp-3);
  height: 1.5px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--t-smooth);
  transform-origin: left;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-white);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* WordPress active menu item → same style as .active */
.site-nav .current-menu-item > a,
.site-nav .current-menu-parent > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current-page-ancestor > a,
.site-nav .current_page_item > a,
.site-nav .current_page_parent > a,
.site-nav .current_page_ancestor > a {
  color: var(--color-white);
}

.site-nav .current-menu-item > a::after,
.site-nav .current-menu-parent > a::after,
.site-nav .current-menu-ancestor > a::after,
.site-nav .current-page-ancestor > a::after,
.site-nav .current_page_item > a::after,
.site-nav .current_page_parent > a::after,
.site-nav .current_page_ancestor > a::after {
  transform: scaleX(1);
}

/* Header CTA */
.header-cta {
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--t-smooth);
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100dvh;
  background: var(--color-obsidian);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) var(--sp-6) var(--sp-10);
  transform: translateX(100%);
  transition: transform var(--t-smooth);
  overflow-y: auto;
  border-left: 1px solid rgba(214, 152, 6, 0.12);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-smooth);
}

.drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-10);
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: var(--r-sm);
  color: var(--color-white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--t-fast);
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1;
}

/* wp_nav_menu outputs <ul><li><a> — flatten into the flex column */
.drawer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.drawer-nav li {
  display: block;
}

.drawer-nav a {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: rgba(245, 243, 239, 0.82);
  text-decoration: none;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    background var(--t-fast),
    color var(--t-fast);
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: rgba(214, 152, 6, 0.08);
  color: var(--color-gold);
}

/* WordPress active state in drawer */
.drawer-nav .current-menu-item > a,
.drawer-nav .current-menu-parent > a,
.drawer-nav .current-menu-ancestor > a,
.drawer-nav .current-page-ancestor > a,
.drawer-nav .current_page_item > a,
.drawer-nav .current_page_parent > a,
.drawer-nav .current_page_ancestor > a {
  background: rgba(214, 152, 6, 0.08);
  color: var(--color-gold);
}

.drawer-nav a i {
  font-size: 0.75em;
  opacity: 0.5;
}

.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: var(--sp-4) 0;
}

.drawer-cta {
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ── Header Responsive ────────────────────────────────────── */
@media (max-width: 1100px) {
  .site-nav {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .header-inner {
    gap: var(--sp-3);
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 1.35rem;
  }
  .site-header {
    height: 64px;
  }
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--color-obsidian);
}

.footer-top {
  padding: var(--sp-24) 0 var(--sp-16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-10);
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

.footer-brand-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: var(--sp-4);
  display: block;
}

.footer-brand-desc {
  font-size: var(--fs-sm);
  color: rgba(245, 243, 239, 0.6);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-5);
}

.footer-contact-line {
  font-size: var(--fs-sm);
  color: rgba(245, 243, 239, 0.6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-contact-line a {
  color: rgba(245, 243, 239, 0.7);
  text-decoration: none;
  transition: color var(--t-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-contact-line a i {
  color: var(--color-gold);
  width: 14px;
}

.footer-contact-line a:hover {
  color: var(--color-gold);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  color: var(--color-gold);
  margin-bottom: var(--sp-5);
  letter-spacing: 0.02em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-nav a {
  font-size: var(--fs-sm);
  color: rgba(245, 243, 239, 0.6);
  text-decoration: none;
  transition:
    color var(--t-fast),
    padding-left var(--t-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-nav a i {
  font-size: 0.65em;
  color: var(--color-gold);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.footer-nav a:hover {
  color: var(--color-porcelain);
  padding-left: var(--sp-2);
}

.footer-nav a:hover i {
  opacity: 1;
}

.footer-social {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 243, 239, 0.6);
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    border-color var(--t-fast);
}

.footer-social a:hover {
  background: var(--color-gold);
  color: var(--color-obsidian);
  border-color: var(--color-gold);
}

.footer-bottom {
  padding: var(--sp-5) 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: var(--fs-xs);
  color: rgba(245, 243, 239, 0.4);
}

.footer-trust {
  font-size: var(--fs-xs);
  color: rgba(214, 152, 6, 0.6);
  font-style: italic;
  letter-spacing: var(--ls-wide);
}

@media (max-width: 600px) {
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Hero Base ────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero--short {
  min-height: 55vh;
}
.hero--medium {
  min-height: 72vh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 13, 16, 0.82) 0%,
    rgba(11, 13, 16, 0.55) 60%,
    rgba(11, 13, 16, 0.4) 100%
  );
  z-index: 1;
}

.hero__overlay--deep {
  background: linear-gradient(
    160deg,
    rgba(11, 13, 16, 0.9) 0%,
    rgba(11, 13, 16, 0.7) 100%
  );
}

.hero__overlay--center {
  background: rgba(11, 13, 16, 0.65);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-block: var(--sp-20);
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--sp-4);
}

.hero__tag::before {
  content: "";
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-gold);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-white);
  margin-bottom: var(--sp-6);
  max-width: 800px;
}

.hero__title--center {
  text-align: center;
  margin-inline: auto;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: rgba(245, 243, 239, 0.8);
  max-width: 560px;
  margin-bottom: var(--sp-8);
}

.hero__subtitle--center {
  text-align: center;
  margin-inline: auto;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}

.hero__actions--center {
  justify-content: center;
}

/* ── Split Section ────────────────────────────────────────── */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.split-section--reversed {
  direction: rtl;
}

.split-section--reversed > * {
  direction: ltr;
}

.split__img {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.split__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.8s ease;
}

.split-section:hover .split__img img {
  transform: scale(1.03);
}

.split__content {
  padding: var(--sp-20) var(--sp-16);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 1024px) {
  .split__content {
    padding: var(--sp-16) var(--sp-10);
  }
}

@media (max-width: 768px) {
  .split-section,
  .split-section--reversed {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .split__img {
    min-height: 320px;
  }
  .split__content {
    padding: var(--sp-10) var(--sp-5);
  }
}

/* ── Page Hero (non-home pages) ───────────────────────────── */
.page-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.admin-bar .page-hero,
.admin-bar .hero {
  padding-top: calc(var(--header-h) + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .page-hero,
  .admin-bar .hero {
    padding-top: calc(var(--header-h) + 46px);
  }
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-deep);
  z-index: 1;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  padding-block: var(--sp-16);
  text-align: center;
  width: 100%;
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.55);
  margin-bottom: var(--sp-4);
}

.page-hero__breadcrumb a {
  color: rgba(245, 243, 239, 0.55);
  text-decoration: none;
  transition: color var(--t-fast);
}

.page-hero__breadcrumb a:hover {
  color: var(--color-gold);
}

.page-hero__breadcrumb i {
  font-size: 0.6em;
  color: var(--color-gold);
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: var(--fw-semi);
  color: var(--color-white);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-4);
}

.page-hero__desc {
  font-size: var(--fs-md);
  color: rgba(245, 243, 239, 0.72);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
}
