/*
Theme Name: Resolution Assurance Code Theme
Template: twentytwentyfive
Version: 2.4.2
Description: Child theme styles for Resolution Assurance. (Cleaned + consolidated header/nav)
*/

/* =========================================================
   0) GLOBAL BACKGROUND + OVERLAY (BLOCK THEME SAFE)
   ========================================================= */

html, body, .wp-site-blocks {
  background-color: #0f172a !important;
  background-image: url('https://resolutionassurance.com.au/wp-content/uploads/2026/01/FULL-HOMEPAGE.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

@media (max-width: 768px) {
  html, body, .wp-site-blocks { background-attachment: scroll !important; }
}

.wp-site-blocks {
  position: relative !important;
  min-height: 100vh !important;
  z-index: 0 !important;
}

/* Slightly lighter than before to avoid “everything looks too dark” */
.wp-site-blocks::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.40) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.wp-site-blocks > * {
  position: relative !important;
  z-index: 1 !important;
}

/* =========================================================
   0B) GLOBAL WIDTH + WRAP FIXES (STOP “PERMANENTLY NARROW”)
   ========================================================= */

:root {
  --wp--style--global--content-size: 1100px;
  --wp--style--global--wide-size: 1280px;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--wp--style--global--content-size) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.alignwide {
  max-width: var(--wp--style--global--wide-size) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

body { overflow-x: hidden; }

:where(p, li, h1, h2, h3, h4, h5, h6, a, span) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

:where(.wp-site-blocks, header, main, footer) * { min-width: 0; }

/* =========================================================
   1) FOOTER CLEANUP
   ========================================================= */
.ra-footer { display: none !important; }

/* =========================================================
   2) PAGE TITLE HIDERS (KEEP HERO H1 SAFE)
   ========================================================= */

body .entry-header .wp-block-post-title,
body h1.wp-block-post-title,
body .wp-block-post-title {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ra-hero h1 {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
}

/* =========================================================
   3) MODERN UI KIT (Reusable Classes)
   ========================================================= */

.ra-hero {
  background: rgba(15, 23, 42, 0.60);
  color: #fff;
  padding: 54px 22px;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.10);
}

.ra-hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0,0,0,.28);
}

.ra-hero p {
  color: rgba(255,255,255,.82);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem auto;
  text-shadow: 0 2px 14px rgba(0,0,0,.22);
}

.ra-btn {
  background: #0b5cff;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
}

.ra-btn:hover {
  background: #004ad7;
  transform: translateY(-1px);
}

.ra-btn-outline {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
  margin-left: 10px;
}

.ra-btn-outline:hover {
  background: rgba(255,255,255,0.10);
}

.ra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.ra-card {
  background: rgba(255,255,255,0.96);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ra-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.10);
}

.ra-card h3 {
  color: #0f172a;
  margin-top: 0;
  font-weight: 800;
}

/* =========================================================
   4) HEADER + NAV (CLEAN + CONSOLIDATED)
   Goal: Transparent header, readable labels, reliable dropdowns
   ========================================================= */

/* Header “glass” (lighter than before) */
header.wp-block-template-part,
header.wp-block-template-part > .wp-block-group,
.wp-site-blocks > header {
  background: rgba(15, 23, 42, 0.28) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  position: relative !important;
  z-index: 9999 !important;
}

/* Logo sizing (prevents giant white box dominating header) */
.wp-block-site-logo img {
  max-height: 56px;
  width: auto;
}

/* FORCE ALL nav link states to readable white */
.wp-block-navigation a,
.wp-block-navigation a:visited,
.wp-block-navigation a:hover,
.wp-block-navigation a:focus,
.wp-block-navigation a:active,
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current-menu-ancestor > a,
.wp-block-navigation .current_page_item > a,
.wp-block-navigation .current_page_ancestor > a,
.wp-block-navigation .wp-block-navigation-item__content {
  color: #ffffff !important;
  opacity: 1 !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Submenu toggle chevrons */
.wp-block-navigation__submenu-icon,
.wp-block-navigation__submenu-icon svg {
  fill: #ffffff !important;
  color: #ffffff !important;
}

/* Desktop header layout */
@media (min-width: 981px) {
  header .wp-block-group.is-layout-flex {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }

  /* Desktop: don't add a “second row line” under the logo */
  .wp-block-navigation {
    width: auto !important;
    border-top: 0 !important;
    padding-top: 0 !important;
  }

  header .wp-block-navigation__container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 14px !important;
    white-space: nowrap !important;
  }

  /* Allow dropdowns to escape */
  header, header *,
  .wp-block-navigation,
  .wp-block-navigation__container,
  .wp-block-navigation__responsive-container,
  .wp-block-navigation__responsive-container-content {
    overflow: visible !important;
  }

  /* Dropdown look */
  .wp-block-navigation .wp-block-navigation-item.has-child { position: relative !important; }

  .wp-block-navigation .wp-block-navigation__submenu-container {
    display: none;
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    min-width: 240px !important;
    z-index: 999999 !important;

    background: rgba(2, 6, 23, 0.96) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    border-radius: 12px !important;
    padding: 10px 0 !important;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Open on hover/focus (reliable across browsers) */
  .wp-block-navigation .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
  .wp-block-navigation .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container {
    display: block !important;
  }

  .wp-block-navigation .wp-block-navigation__submenu-container a {
    color: #ffffff !important;
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
  }

  .wp-block-navigation .wp-block-navigation__submenu-container a:hover {
    background: rgba(255,255,255,0.10);
  }
}

/* Mobile header layout + overlay */
@media (max-width: 980px) {
  header .wp-block-group.is-layout-flex {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .wp-block-navigation {
    width: 100% !important;
    display: block !important;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 10px;
  }

  /* Respect WP open/closed state */
  .wp-block-navigation__responsive-container[aria-hidden="true"] { display: none !important; }

  .wp-block-navigation__responsive-container[aria-hidden="false"] {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 999999;
    padding: 18px;
    overflow: auto;
    background: rgba(2, 6, 23, 0.96) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .wp-block-navigation__responsive-container[aria-hidden="false"] a {
    color: #ffffff !important;
    text-shadow: none;
  }

  /* Mobile submenu containers should flow (no absolute dropdown) */
  .wp-block-navigation__responsive-container[aria-hidden="false"] .wp-block-navigation__submenu-container {
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 6px 0 6px 16px !important;
  }
}

/* =========================================================
   5) READABILITY SURFACES (OPT-IN)
   ========================================================= */

.wp-site-blocks main {
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 2;
}

.ra-surface {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  margin: 2.5rem auto;
  max-width: 1100px;
}

.ra-surface-strong {
  background: rgba(15, 23, 42, 0.78) !important;
  border: 1px solid rgba(255,255,255,0.10);
}

.ra-surface :where(h1,h2,h3,h4,h5,h6) { color: #ffffff !important; }
.ra-surface :where(p,li) { color: rgba(255,255,255,0.92) !important; }

/* =========================================================
   6) CARD / TILE TYPOGRAPHY (DARK TEXT ON LIGHT CARDS)
   ========================================================= */

.ra-card { color: #0f172a !important; }

.ra-card :where(h1,h2,h3,h4,h5,h6) { color: #0f172a !important; }
.ra-card :where(p) { color: #64748b !important; }
.ra-card :where(ul, li) { color: #475569 !important; }
.ra-card :where(a) { color: #0b5cff !important; }

a.ra-btn,
button.ra-btn,
.wp-block-button__link { color: #ffffff !important; }
a.ra-btn *, .wp-block-button__link * { color: inherit !important; }

/* =========================================================
   7) LOGGED-OUT MENU VISIBILITY (OPTIONAL)
   ========================================================= */

body.ra-logged-out header .wp-block-navigation a[href*="/verification"],
body.ra-logged-out header .wp-block-navigation a[href*="/verify"],
body.ra-logged-out header .wp-block-navigation a[href*="/partners"],
body.ra-logged-out header .wp-block-navigation a[href*="/pricing"] {
  display: none !important;
}

/* =========================================================
   Triangle Watch (Market Relationship Tile)
   ========================================================= */

.ra-triangle-watch {
  background: rgba(255,255,255,0.96);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  max-width: 520px;
}

.ra-triangle-watch strong { color: #0f172a; }
.ra-triangle-watch small { color: #64748b; }

.ra-triangle-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.ra-triangle-price { text-align: center; }

.ra-triangle-price-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.ra-triangle-price-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.ra-triangle-move {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #334155;
}

.ra-triangle-attrib { margin-top: 6px; }

.ra-triangle-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(15,23,42,0.10);
}

.ra-triangle-bar-gold { background: linear-gradient(90deg, #facc15, #eab308); }
.ra-triangle-bar-fx   { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }

.ra-triangle-attrib-text {
  font-size: 0.82rem;
  margin-top: 6px;
  color: #475569;
}

.ra-triangle-ppv {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #334155;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.ra-triangle-disclaimer {
  margin-top: 12px;
  font-size: 0.72rem;
  color: #64748b;
}

/* =========================================================
   LIGHTERS PAGE – DISPOSABLE vs REFILLABLE FLOWCHART
   ========================================================= */

.ra-lighters-flow { margin-top: 2rem; }

.ra-lighters-flow .ra-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148,163,184,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ra-flowchart {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 900px) {
  .ra-flowchart {
    grid-template-columns: 1fr auto 1fr;
    gap: 22px;
    align-items: start;
  }
}

.ra-flowchart .ra-flow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-flow-divider span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #0f172a;
  background: rgba(226,232,240,0.85);
  border: 1px solid rgba(148,163,184,0.35);
}

@media (max-width: 899px) {
  .ra-flowchart .ra-flow-divider { justify-content: flex-start; }
}

.ra-flow-box h3 { margin: 0 0 0.75rem 0; }

.ra-flow-meta {
  font-size: 0.95rem;
  color: #334155;
  margin: 0 0 1rem 0;
}

.ra-flow-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ra-flow-steps li {
  position: relative;
  padding: 0.6rem 0.85rem 0.6rem 2.2rem;
  border-radius: 10px;
  background: rgba(241,245,249,0.85);
  border: 1px solid rgba(148,163,184,0.25);
  color: #0f172a;
  line-height: 1.35;
}

.ra-flow-steps li + li { margin-top: 10px; }

.ra-flow-steps li::before {
  content: "→";
  position: absolute;
  left: 0.85rem;
  top: 0.55rem;
  font-weight: 900;
  color: #0b5cff;
}

.ra-flow-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(219,234,254,0.55);
  border: 1px solid rgba(59,130,246,0.25);
  color: #0f172a;
  font-size: 0.95rem;
}

.ra-flow-note strong { font-weight: 900; }

/* =========================================================
   REGISTRY TABLE (PODomains + similar)
   Goal: No header collisions, no clipped right-side action button,
   avoid horizontal scrolling on desktop while staying responsive.
   ========================================================= */

.ra-registry-table{
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  box-sizing: border-box;
}

.ra-registry-table th,
.ra-registry-table td{
  box-sizing: border-box;
}

/* Keep headers readable */
.ra-registry-table th{
  white-space: nowrap;
}

/* Base cell behaviour */
.ra-registry-table td{
  vertical-align: top;
}

/* Column sizing (gentle caps, not hard fixed layout) */
.ra-registry-table th:nth-child(1),
.ra-registry-table td:nth-child(1){
  width: 24%;
  max-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ra-registry-table th:nth-child(2),
.ra-registry-table td:nth-child(2){
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ra-registry-table th:nth-child(3),
.ra-registry-table td:nth-child(3){
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ra-registry-table th:nth-child(4),
.ra-registry-table td:nth-child(4){
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ra-registry-table th:nth-child(5),
.ra-registry-table td:nth-child(5){
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ra-registry-table th:nth-child(6),
.ra-registry-table td:nth-child(6){
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rightmost action column: reserve space AND add inner padding so buttons never clip */
.ra-registry-table th:last-child,
.ra-registry-table td:last-child{
  width: 160px;
  min-width: 160px;
  white-space: nowrap;
  text-align: right;
  padding-right: 14px; /* critical: prevents visual clipping against card edge */
}

/* Ensure buttons don’t expand cells */
.ra-registry-table .ra-btn,
.ra-registry-table .ra-actions .ra-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Keep pills tidy inside the Record column */
.ra-registry-table td:nth-child(1) .ra-pill{
  white-space: nowrap;
}

/* =========================================================
   BLOG SINGLE POST: Readable card while keeping background image
   (Scoped to .single-post only — will NOT affect header elsewhere)
   ========================================================= */

/* Keep existing background image + overlay, but soften overlay a touch on posts */
.single-post .wp-site-blocks::before{
  background: rgba(15, 23, 42, 0.30) !important;
}

/* Layout spacing */
.single-post main{
  padding-top: 2.5rem !important;
  padding-bottom: 4rem !important;
}

/* Title: centered, readable over image, reduce wrapping on desktop */
.single-post h1.wp-block-post-title,
.single-post .wp-block-post-title{
  display: block !important;
  visibility: visible !important;
  height: auto !important;

  width: min(1200px, calc(100% - 40px)) !important;
  margin: 0 auto 1rem auto !important;
  text-align: center !important;

  color: #ffffff !important;
  font-size: clamp(2.0rem, 3vw, 2.7rem) !important;
  line-height: 1.15 !important;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45) !important;

  text-wrap: balance;
}

@media (min-width: 1100px){
  .single-post h1.wp-block-post-title,
  .single-post .wp-block-post-title{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Meta: centered, compact */
.single-post .wp-block-post-author,
.single-post .wp-block-post-date,
.single-post .wp-block-post-terms{
  display: inline-block !important;
  width: auto !important;
  margin: 0 10px 1.25rem 10px !important;
  text-align: center !important;
  color: rgba(255,255,255,0.82) !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45) !important;
}

/* Article container centered */
.single-post main article,
.single-post main .wp-block-post{
  width: min(920px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Card applied to content */
.single-post main .wp-block-post-content,
.single-post main article .entry-content,
.single-post main .entry-content{
  padding: 2.75rem 2.5rem !important;
  background: rgba(255,255,255,0.97) !important;
  border: 1px solid rgba(148,163,184,0.40) !important;
  border-radius: 18px !important;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 18px 45px rgba(0,0,0,0.18) !important;
}

/* Reading comfort */
.single-post .wp-block-post-content,
.single-post .wp-block-post-content *{
  opacity: 1 !important;
}

.single-post .wp-block-post-content :where(p,li,blockquote){
  color: #0f172a !important;
  text-shadow: none !important;
  font-size: 1.08rem !important;
  line-height: 1.9 !important;
}

.single-post .wp-block-post-content :where(h2,h3,h4,h5,h6){
  color: #0b1220 !important;
  margin-top: 2.2rem !important;
}

.single-post .wp-block-post-content a{
  color: #0b5cff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
