/*
Theme Name: Astra Child — Reality Rewind USA
Template: astra
Version: 1.1
Description: Child theme for Reality Rewind USA.
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --g:   #1C3A2E;   /* Forest green  */
  --gd:  #142b22;   /* Forest green dark */
  --gl:  #2a5040;   /* Forest green light */
  --au:  #C9933A;   /* Vintage gold   */
  --aul: #e8af5a;   /* Gold lighter   */
  --cr:  #F5EFE0;   /* Warm cream     */
  --cr2: #FBF7EE;   /* Cream 2        */
  --ink: #111827;   /* Near black     */
  --mu:  #6B7280;   /* Muted grey     */
  --bdr: rgba(28,58,46,.12);
  --hh:  64px;      /* Header height  */
  --sw:  360px;     /* Slide-out width */
}

/* ============================================================
   GOOGLE FONTS LOAD
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   HEADER SHELL
   ============================================================ */
#rr-header {
  background: #fff;
  border-bottom: 1px solid var(--bdr);
  height: var(--hh);
  width: 100%;
  position: relative;
  z-index: 500;
}

.rr-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ============================================================
   BRAND / LOGO
   ============================================================ */
.rr-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.rr-brand-link {
  text-decoration: none !important;
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.rr-brand-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.4px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

/* USA pill button */
.rr-usa-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px 2px 4px;
  margin-left: 1px;
  border-radius: 4px;
  transition: background .15s;
  line-height: 1;
  vertical-align: baseline;
}

.rr-usa-pill:hover,
.rr-usa-pill[aria-expanded="true"] {
  background: rgba(201,147,58,.1);
}

.rr-usa-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.4px;
  color: var(--au);
  line-height: 1;
}

.rr-usa-caret {
  width: 10px;
  height: 6px;
  color: var(--au);
  flex-shrink: 0;
  transition: transform .2s ease;
  margin-top: 1px;
}

.rr-usa-pill[aria-expanded="true"] .rr-usa-caret {
  transform: rotate(180deg);
}

/* ============================================================
   STATES MEGA DROPDOWN
   ============================================================ */
.rr-states-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: -24px;
  width: 580px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid var(--bdr);
  border-top: 3px solid var(--au);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 32px rgba(17,24,39,.12), 0 2px 8px rgba(17,24,39,.06);
  z-index: 10001;
  overflow: hidden;
  animation: rrDropIn .18s ease;
}

.rr-states-panel[hidden] { display: none; }

@keyframes rrDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rr-sp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--bdr);
}

.rr-sp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mu);
}

.rr-sp-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--mu);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color .15s, background .15s;
}

.rr-sp-close:hover {
  color: var(--ink);
  background: var(--cr);
}

.rr-sp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  padding: 12px 16px 16px;
}

a.rr-sl {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink) !important;
  text-decoration: none !important;
  padding: 6px 8px;
  border-radius: 3px;
  display: block;
  transition: background .1s, color .1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: none !important;
}

a.rr-sl:hover {
  background: var(--au) !important;
  color: #fff !important;
}

/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.rr-hbg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
  flex-shrink: 0;
  align-items: flex-end;
}

.rr-hbg:hover {
  background: rgba(28,58,46,.07);
}

.rr-hbg-line {
  display: block;
  height: 2px;
  background: var(--g);
  border-radius: 2px;
  transition: transform .24s ease, opacity .18s ease, width .2s ease;
  transform-origin: center;
}

.rr-hbg-top { width: 22px; }
.rr-hbg-mid { width: 16px; }
.rr-hbg-bot { width: 22px; }

.rr-hbg.open .rr-hbg-top {
  width: 20px;
  transform: translateY(7px) rotate(45deg);
}
.rr-hbg.open .rr-hbg-mid {
  opacity: 0;
  width: 0;
}
.rr-hbg.open .rr-hbg-bot {
  width: 20px;
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   XPRO OVERRIDES (keep sticky + remove unwanted padding)
   ============================================================ */
.xpro-theme-builder-header {
  background: #fff !important;
  border-bottom: 1px solid var(--bdr) !important;
}
.xpro-theme-builder-header.xtb-header-sticky {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  box-shadow: 0 1px 0 var(--bdr) !important;
}
.xpro-theme-builder-header .elementor-section,
.xpro-theme-builder-header .elementor-container,
.xpro-theme-builder-header .elementor-widget-wrap {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.xpro-theme-builder-header .elementor-widget-text-editor .elementor-widget-container {
  padding: 0 !important;
}

/* ============================================================
   SLIDE-OUT PANEL BACKDROP
   ============================================================ */
#rr-bd {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.5);
  z-index: 10002;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: rrFdIn .24s ease;
}
#rr-bd.open { display: block; }

@keyframes rrFdIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   SLIDE-OUT PANEL
   ============================================================ */
#rr-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sw);
  max-width: 100vw;
  height: 100dvh;
  background: var(--g);
  z-index: 10003;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 40px rgba(0,0,0,.22);
  overscroll-behavior: contain;
}

#rr-panel.open {
  transform: translateX(0);
}

/* Panel header row */
.rr-ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  height: var(--hh);
  border-bottom: 1px solid rgba(245,239,224,.1);
  flex-shrink: 0;
}

.rr-ph-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.3px;
  color: #fff;
  text-decoration: none !important;
  line-height: 1;
}

.rr-ph-logo .au { color: var(--au); }

.rr-ph-close {
  background: none;
  border: 1px solid rgba(245,239,224,.18);
  color: rgba(245,239,224,.65);
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  letter-spacing: .5px;
  padding: 6px 14px;
  border-radius: 3px;
  transition: all .15s;
  line-height: 1;
}

.rr-ph-close:hover {
  background: rgba(245,239,224,.08);
  color: #fff;
  border-color: rgba(245,239,224,.35);
}

/* Panel body */
.rr-pb {
  padding: 28px 26px 40px;
  flex: 1;
}

/* Section labels */
.rr-sec-lbl {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(245,239,224,.3);
  margin-bottom: 14px;
}

/* Category links */
.rr-pillar-nav a {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -.3px;
  color: rgba(245,239,224,.84) !important;
  text-decoration: none !important;
  padding: 9px 0;
  border-bottom: 1px solid rgba(245,239,224,.07);
  border-left: none !important;
  transition: color .15s, padding-left .18s;
  line-height: 1.1;
}

.rr-pillar-nav a:last-child {
  border-bottom: none;
}

.rr-pillar-nav a:hover {
  color: var(--au) !important;
  padding-left: 6px;
}

/* Divider */
.rr-div {
  height: 1px;
  background: rgba(245,239,224,.1);
  margin: 22px 0;
}

/* United States toggle button */
.rr-us-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  border-radius: 0;
}

.rr-us-btn .rr-sec-lbl {
  margin-bottom: 0;
  color: rgba(245,239,224,.5);
  font-size: 10px;
  cursor: pointer;
  transition: color .15s;
}

.rr-us-btn:hover .rr-sec-lbl {
  color: rgba(245,239,224,.8);
}

.rr-us-arrow {
  font-size: 10px;
  color: var(--au);
  transition: transform .22s ease;
  display: inline-block;
  line-height: 1;
}

.rr-us-btn.open .rr-us-arrow {
  transform: rotate(90deg);
}

/* States grid inside panel */
#rr-us-states {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  padding: 8px 0 2px;
}

#rr-us-states[hidden] { display: none; }

#rr-us-states a {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(245,239,224,.52) !important;
  text-decoration: none !important;
  padding: 5px 4px;
  border-radius: 3px;
  display: block;
  transition: color .12s, background .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: none !important;
}

#rr-us-states a:hover {
  color: var(--au) !important;
  background: rgba(201,147,58,.1);
}

/* Secondary nav */
.rr-sec-nav a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(245,239,224,.46) !important;
  text-decoration: none !important;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245,239,224,.06);
  transition: color .14s, padding-left .15s;
  border-left: none !important;
}

.rr-sec-nav a:last-child { border-bottom: none; }

.rr-sec-nav a:hover {
  color: rgba(245,239,224,.92) !important;
  padding-left: 4px;
}

/* ============================================================
   FOOTER SHELL
   ============================================================ */
.xpro-theme-builder-footer {
  background: var(--g) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  :root { --hh: 58px; }
  .rr-header-inner { padding: 0 18px; }
  .rr-brand-text, .rr-usa-text { font-size: 19px; }
  .rr-states-panel {
    width: calc(100vw - 20px);
    left: -8px;
    top: calc(100% + 10px);
  }
  .rr-sp-grid { grid-template-columns: repeat(3,1fr); padding: 10px 12px 14px; }
  #rr-panel { width: 100vw; }
  .rr-pb { padding: 22px 20px 36px; }
  .rr-ph { padding: 0 20px; }
}

@media (max-width: 400px) {
  .rr-sp-grid { grid-template-columns: repeat(2,1fr); }
  .rr-brand-text, .rr-usa-text { font-size: 17px; }
}