/* ==========================================================
   GIFT FLOW LEGAL PAGE
   Purpose: Premium legal page layout matching homepage style
   Scope: .gf-legal-page only
========================================================== */

.gf-legal-page,
.gf-legal-page *{
  box-sizing:border-box;
}

.gf-legal-page{
  width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  background:#fff;
  color:#151020;
  overflow:hidden;
}

/* ==========================================================
   HERO
========================================================== */

.gf-legal-hero{
  position:relative;
  padding:72px 24px 64px;
  background:
    radial-gradient(circle at 78% 42%, rgba(138,77,255,.22), transparent 30%),
    radial-gradient(circle at 18% 20%, rgba(255,79,163,.10), transparent 28%),
    linear-gradient(135deg,#ffffff 0%,#f5ecff 100%);
  border-bottom:1px solid rgba(139,92,246,.14);
}

.gf-legal-hero__inner{
  width:min(1160px, calc(100% - 48px));
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr 340px;
  gap:48px;
  align-items:center;
}

.gf-legal-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  min-height:30px;
  padding:7px 14px;
  border-radius:999px;
  background:#f1e3ff;
  color:#8a4dff;
  font-size:13px;
  font-weight:850;
  line-height:1;
}

.gf-legal-hero h1{
  margin:22px 0 0;
  color:#111;
  font-size:clamp(42px, 5vw, 64px);
  line-height:1.02;
  font-weight:950;
  letter-spacing:-.03em;
}

.gf-legal-hero p{
  max-width:640px;
  margin:22px 0 0;
  color:#5f566d;
  font-size:18px;
  line-height:1.58;
}

.gf-legal-hero__visual{
  position:relative;
  min-height:220px;
}

.gf-legal-paper{
  position:absolute;
  right:0;
  top:12px;
  width:190px;
  height:210px;
  border-radius:24px;
  background:rgba(255,255,255,.78);
  box-shadow:0 28px 80px rgba(27,12,64,.18);
  transform:rotate(2deg);
}

.gf-legal-paper i{
  display:block;
  width:110px;
  height:12px;
  margin:26px auto 0;
  border-radius:999px;
  background:#d9ccff;
}

.gf-legal-paper i:nth-child(2){
  width:130px;
}

.gf-legal-paper i:nth-child(3){
  width:92px;
}

.gf-legal-shield{
  position:absolute;
  right:128px;
  top:72px;
  z-index:2;
  width:118px;
  height:132px;
  display:grid;
  place-items:center;
  border-radius:34px 34px 42px 42px;
  background:linear-gradient(135deg,#8a4dff,#6d45ff);
  box-shadow:0 24px 60px rgba(90,55,220,.34);
}

.gf-legal-shield span{
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#fff;
  color:#7b4dff;
  font-size:34px;
  font-weight:950;
}

/* ==========================================================
   MAIN LAYOUT
========================================================== */

.gf-legal-main{
  padding:56px 24px 80px;
  background:#fff;
}

.gf-legal-main__inner{
  width:min(1160px, calc(100% - 48px));
  margin:0 auto;
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:44px;
  align-items:start;
}

/* ==========================================================
   SIDEBAR
========================================================== */

.gf-legal-sidebar{
  position:sticky;
  top:24px;
  display:grid;
  gap:18px;
}

.gf-legal-nav{
  padding:14px;
  border:1px solid rgba(139,92,246,.15);
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 48px rgba(123,61,205,.08);
}

.gf-legal-nav__item{
  display:grid;
  grid-template-columns:26px 1fr;
  gap:10px;
  align-items:center;
  min-height:48px;
  padding:10px 12px;
  border-radius:13px;
  color:#151020;
  font-size:14px;
  font-weight:750;
  text-decoration:none;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

.gf-legal-nav__item span{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
}

.gf-legal-nav__item:hover,
.gf-legal-nav__item.is-active{
  color:#7b35ff;
  background:linear-gradient(135deg,#f6edff,#efe7ff);
}

.gf-legal-help{
  padding:20px;
  border:1px solid rgba(139,92,246,.14);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#faf6ff);
  box-shadow:0 18px 48px rgba(123,61,205,.08);
}

.gf-legal-help strong{
  display:block;
  color:#151020;
  font-size:15px;
}

.gf-legal-help p{
  margin:8px 0 12px;
  color:#5f566d;
  font-size:13px;
  line-height:1.45;
}

.gf-legal-help a{
  color:#8a4dff;
  font-size:13px;
  font-weight:850;
  text-decoration:none;
}

/* ==========================================================
   CARD / CONTENT
========================================================== */

.gf-legal-card{
  min-width:0;
  padding:34px;
  border:1px solid rgba(139,92,246,.13);
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(27,12,64,.12);
}

.gf-legal-card__header{
  padding-bottom:20px;
  margin-bottom:22px;
  border-bottom:1px solid rgba(139,92,246,.16);
}

.gf-legal-card__header h2{
  margin:0;
  color:#111;
  font-size:32px;
  line-height:1.12;
  font-weight:950;
  letter-spacing:-.02em;
}

.gf-legal-card__header p{
  margin:8px 0 0;
  color:#7a7288;
  font-size:14px;
}

/* ==========================================================
   WORDPRESS CONTENT
========================================================== */

.gf-legal-content{
  color:#2a2438;
  font-size:15px;
  line-height:1.72;
}

.gf-legal-content h1,
.gf-legal-content h2,
.gf-legal-content h3{
  color:#111;
  line-height:1.18;
  font-weight:900;
}

.gf-legal-content h1{
  font-size:34px;
}

.gf-legal-content h2{
  margin:30px 0 12px;
  font-size:24px;
}

.gf-legal-content h3{
  margin:24px 0 10px;
  font-size:19px;
}

.gf-legal-content p{
  margin:0 0 16px;
}

.gf-legal-content ul,
.gf-legal-content ol{
  margin:0 0 20px 22px;
  padding:0;
}

.gf-legal-content li{
  margin:7px 0;
}

.gf-legal-content hr{
  height:1px;
  margin:28px 0;
  border:0;
  background:rgba(139,92,246,.16);
}

/* Details blocks become premium accordions */
.gf-legal-content details{
  overflow:hidden;
  margin:0 0 12px;
  border:1px solid rgba(139,92,246,.16);
  border-radius:14px;
  background:#fff;
}

.gf-legal-content summary{
  cursor:pointer;
  padding:17px 20px;
  list-style:none;
  background:linear-gradient(180deg,#fff,#faf7ff);
  color:#151020;
  font-weight:850;
}

.gf-legal-content summary::-webkit-details-marker{
  display:none;
}

.gf-legal-content summary::after{
  content:"⌄";
  float:right;
  color:#8a4dff;
  font-weight:900;
}

.gf-legal-content details[open] summary{
  background:linear-gradient(135deg,#f6edff,#efe7ff);
  border-bottom:1px solid rgba(139,92,246,.16);
}

.gf-legal-content details[open] summary::after{
  content:"⌃";
}

.gf-legal-content details > *:not(summary){
  padding:20px 22px;
}

/* Plain English Summary box if added as a group/block */
.gf-legal-content .gf-plain-summary{
  display:grid;
  grid-template-columns:46px 1fr;
  gap:16px;
  margin-top:26px;
  padding:22px;
  border:1px solid rgba(139,92,246,.16);
  border-radius:18px;
  background:linear-gradient(135deg,#f7f0ff,#fff);
}

.gf-legal-content .gf-plain-summary::before{
  content:"i";
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,#8a4dff,#ff4fa3);
  font-weight:950;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:1060px){
  .gf-legal-hero__inner,
  .gf-legal-main__inner{
    grid-template-columns:1fr;
  }

  .gf-legal-hero__visual{
    display:none;
  }

  .gf-legal-sidebar{
    position:relative;
    top:auto;
  }

  .gf-legal-nav{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:10px;
    scrollbar-width:none;
  }

  .gf-legal-nav::-webkit-scrollbar{
    display:none;
  }

  .gf-legal-nav__item{
    min-width:max-content;
    grid-template-columns:auto 1fr;
    white-space:nowrap;
  }

  .gf-legal-help{
    display:none;
  }
}

@media (max-width:720px){
  .gf-legal-hero{
    padding:44px 0 38px;
  }

  .gf-legal-hero__inner,
  .gf-legal-main__inner{
    width:min(100% - 28px, 1160px);
  }

  .gf-legal-hero h1{
    font-size:40px;
  }

  .gf-legal-hero p{
    font-size:16px;
  }

  .gf-legal-main{
    padding:28px 0 56px;
  }

  .gf-legal-card{
    padding:22px;
    border-radius:20px;
  }

  .gf-legal-card__header h2{
    font-size:26px;
  }

  .gf-legal-content{
    font-size:14px;
  }

  .gf-legal-content h1{
    font-size:28px;
  }

  .gf-legal-content h2{
    font-size:21px;
  }

  .gf-legal-content details > *:not(summary){
    padding:18px;
  }
}

.gf-legal-content details{
  overflow:hidden;
}

/* ==========================================================
   LEGAL ACCORDION CONTENT FIX
========================================================== */

.gf-legal-content details > *:not(summary){
  padding:22px;
}

/* Tight paragraph rhythm */
.gf-legal-content details p{
  margin:0 0 10px;
  line-height:1.6;
}

/* Remove empty WP paragraphs */
.gf-legal-content details p:empty{
  display:none;
}

/* Headings */
.gf-legal-content details h1,
.gf-legal-content details h2,
.gf-legal-content details h3,
.gf-legal-content details h4{
  margin:20px 0 10px;
  line-height:1.2;
}

/* First heading spacing */
.gf-legal-content details h1:first-child,
.gf-legal-content details h2:first-child,
.gf-legal-content details h3:first-child,
.gf-legal-content details h4:first-child{
  margin-top:0;
}

/* Lists */
.gf-legal-content details ul,
.gf-legal-content details ol{
  margin:0 0 12px 20px;
}

.gf-legal-content details li{
  margin:4px 0;
  line-height:1.55;
}

/* Remove Gutenberg wrappers */
.gf-legal-content details .wp-block-group,
.gf-legal-content details .wp-block-columns{
  margin:0;
  padding:0;
  background:none;
  border:0;
  box-shadow:none;
}

/* Prevent weird spacing */
.gf-legal-content details .wp-block-spacer{
  display:none;
}
