/* ============================================================
   GoGiftings V27 — Spacing Fix
   Eliminates excess top gap (below nav) and footer top gap
   Load LAST in <head>, after all other CSS files
   ============================================================ */

/* ─── 1. KILL TOP GAP: main / page-pad ─────────────────────
   styles.min.css sets padding-top on main / .page-pad.
   We zero it unconditionally here, for every page.          */
main,
main.page-pad,
.page-pad {
  padding-top: 0 !important;
  margin-top:  0 !important;
}

/* ─── 2. HERO — no extra top margin ─────────────────────────
   Various selectors in older CSS add margin-top to the hero  */
.hero-grid,
.hero-grid-refined,
.hero-card,
.hero-copy-image,
.hero-section,
.hero {
  margin-top: 0 !important;
}

/* First visible element directly inside main ─ no top breathing room
   (sections get their own internal padding — no double spacing)    */
main > *:first-child,
main > .container:first-child,
main > section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ─── 3. STAT-STRIP gap ─────────────────────────────────── */
.stat-strip,
.stats-strip,
.hero-stats {
  margin-top: 0 !important;
}

/* ─── 4. BODY / HTML top margin guard ───────────────────── */
html, body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ─── 5. KILL FOOTER TOP GAP ────────────────────────────────
   styles.min.css and gogiftings-modern.css both add padding-top
   to <footer>. We collapse it here.                         */
footer,
.site-footer,
.premium-footer {
  padding-top:  0 !important;
  margin-top:   0 !important;
}

/* ─── 6. FOOTER RIBBON CARD — tighten top padding ────────── */
.footer-ribbon {
  padding-top: 40px !important;
}
.footer-ribbon-card {
  margin-top:    0 !important;
  padding-top:   32px !important;
  padding-bottom: 32px !important;
}

/* ─── 7. LAST SECTION BEFORE FOOTER — no excess bottom ─────
   Prevents a double-gap when the last <section> has
   padding-bottom AND the footer has padding-top             */
main > section:last-child,
main > div:last-child {
  margin-bottom: 0 !important;
}

/* ─── 8. FOOTER MAIN GRID — balanced spacing ─────────────── */
.footer-main-grid {
  padding-top:    36px !important;
  padding-bottom: 36px !important;
}

/* ─── 9. FOOTER LEGAL / BOTTOM — compact ────────────────── */
.footer-legal-seo {
  padding-top:    12px !important;
  padding-bottom: 12px !important;
  border-top: 1px solid rgba(246,39,128,.10) !important;
}
.footer-bottom,
.refined-footer-bottom {
  padding-top:    14px !important;
  padding-bottom: 14px !important;
  border-top: 1px solid rgba(246,39,128,.08) !important;
}

/* ─── 10. MOBILE ADJUSTMENTS ──────────────────────────────── */
@media (max-width: 768px) {
  .footer-ribbon {
    padding-top: 24px !important;
  }
  .footer-ribbon-card {
    padding: 20px !important;
  }
  .footer-main-grid {
    padding-top:    24px !important;
    padding-bottom: 24px !important;
  }
}
