/*
Theme Name: TomTreyco Understrap Child Modern v43 (Locations content fallback)ns Modal + tt_location + non-ACF)
Theme URI: https://tomtreyco.com
Description: UnderStrap child theme with stable header, Digital Fundraisers template, and guaranteed mobile nav toggler.
Author: ChatGPT
Template: understrap
Version: 43.0.0
Text Domain: tomtreyco-understrap-child
*/

:root{
  --tt-red:#D52B1E;
  --tt-yellow:#F8C51B;
  --tt-ink:#0f172a;
  --tt-muted:#475569;
  --tt-border:#e5e7eb;
  --tt-bg:#ffffff;
  --tt-soft:#f8fafc;
  --tt-cream:#fff7df;
  --tt-radius:18px;
  --tt-shadow:0 10px 26px rgba(2,6,23,.06);
}

body{background:var(--tt-bg);color:var(--tt-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
a{color:var(--tt-red);} a:hover{color:#b92318;}
body.tt-hide-page-title .entry-title, body.tt-hide-page-title .page-title{display:none!important;}

/* Header / Nav base */
#main-nav, .navbar{background:#fff!important;border-bottom:1px solid rgba(15,23,42,.08);}
.navbar{padding-top:.55rem;padding-bottom:.55rem;}
.navbar .navbar-brand img{display:block;height:44px;width:auto;object-fit:contain;}
@media (max-width:991px){.navbar .navbar-brand img{height:40px;}}

.navbar-nav .nav-link{color:var(--tt-ink)!important;font-weight:800;padding:.55rem .75rem;}
.navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus{color:var(--tt-red)!important;}

/* Mobile nav toggler (show only <992px) */
.navbar-toggler{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;
  height:40px;
  padding:0;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.16)!important;
  background:rgba(15,23,42,.03)!important;
}
@media (max-width:991px){.navbar-toggler{display:inline-flex;}}
.navbar-toggler:focus{box-shadow:0 0 0 4px rgba(213,43,30,.15)!important;}
.navbar-toggler-icon{
  width:22px;height:22px;display:block;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%230f172a' d='M4 6.5h16a.75.75 0 1 0 0-1.5H4a.75.75 0 1 0 0 1.5Zm16 5H4a.75.75 0 1 0 0 1.5h16a.75.75 0 1 0 0-1.5Zm0 6H4a.75.75 0 1 0 0 1.5h16a.75.75 0 1 0 0-1.5Z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:center;
  background-size:22px 22px;
}

/* Header CTA buttons */
.tt-header-actions{display:flex;gap:10px;align-items:center;}
.tt-btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:38px;padding:0 14px;border-radius:999px;
  font-weight:900;border:2px solid transparent;text-decoration:none!important;white-space:nowrap;line-height:1;
}
.tt-btn--red{background:var(--tt-red);color:#fff;}
.tt-btn--red:hover{filter:brightness(.95);color:#fff;}
.tt-btn--yellow{background:var(--tt-yellow);color:#111827;}
.tt-btn--yellow:hover{filter:brightness(.98);color:#111827;}

/* Cards */
.tt-card{background:#fff;border:1px solid rgba(15,23,42,.10);border-radius:var(--tt-radius);box-shadow:var(--tt-shadow);}
.btn,button,input[type="submit"]{border-radius:999px;font-weight:900;}
.btn-primary{background:var(--tt-red)!important;border-color:var(--tt-red)!important;}
.btn-warning{background:var(--tt-yellow)!important;border-color:var(--tt-yellow)!important;color:#111827!important;}

/* ===== Digital Fundraisers (same as v30) ===== */
.tt-df-hero{border:1px solid rgba(15,23,42,.10);border-radius:22px;background:linear-gradient(135deg, rgba(255,199,44,.16), rgba(213,43,30,.06) 45%, rgba(15,23,42,.02));box-shadow:var(--tt-shadow);overflow:hidden;}
.tt-df-pill{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  background:rgba(248,197,27,.95);
  color:#111827;
  font-weight:800;
  /* Bigger + more “section-title” presence */
  font-size:clamp(1.15rem, 1vw + 1rem, 1.6rem) !important;
  line-height:1 !important;
  padding:clamp(.5rem, .45vw + .45rem, .75rem) clamp(1.1rem, .8vw + 1rem, 1.6rem) !important;
  border-radius:999px !important;
  box-shadow:0 6px 18px rgba(2,6,23,.08);
}
@media (min-width:992px){.tt-df-pill{font-size:1.4rem;padding:14px 24px;}}
.tt-df-h1{font-size:clamp(2.1rem, 3.7vw, 3.25rem);line-height:1.06;letter-spacing:-.02em;margin:.5rem 0 1rem;}
.tt-df-sub{color:var(--tt-muted);font-size:1.05rem;max-width:52ch;}
.tt-df-actions{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-top:18px;}
.tt-df-img{border-radius:18px;box-shadow:0 16px 36px rgba(2,6,23,.14);width:100%;height:auto;object-fit:cover;}

/* Mobile spacing: keep hero buttons from touching the image */
@media (max-width: 991px){
  .tt-df-actions{margin-bottom:14px;}
  .tt-df-img{margin-top:8px;}
}
.tt-section-title{font-size:2rem;font-weight:950;letter-spacing:-.02em;margin:36px 0 14px;}
.tt-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
@media (max-width:991px){.tt-steps{grid-template-columns:1fr;}}
.tt-step{padding:18px;}
.tt-step h4{font-size:1.25rem;font-weight:950;margin:0 0 6px;}
.tt-step p{margin:0;color:var(--tt-muted);}
.tt-df-form-wrap{display:grid;grid-template-columns:1.6fr .9fr;gap:18px;align-items:start;margin-top:16px;}
@media (max-width:991px){.tt-df-form-wrap{grid-template-columns:1fr;}}
.tt-side-stack{display:flex;flex-direction:column;gap:14px;}
.tt-side-box{padding:16px;}
.tt-side-box h4{margin:0 0 6px;font-size:1.05rem;font-weight:950;}
.tt-side-box p{margin:0 0 10px;color:var(--tt-muted);}
.tt-side-box ol{margin:0;padding-left:18px;}
.tt-bubble-btn{display:flex;align-items:center;justify-content:center;height:42px;border-radius:999px;font-weight:950;background:var(--tt-yellow);color:#111827;text-decoration:none!important;border:2px solid rgba(17,24,39,.08);}
.tt-bubble-btn:hover{filter:brightness(.98);color:#111827;}

/* Details (micro-polish) */
.tt-df-details{margin-top:20px;padding:18px 18px 16px;border-radius:20px;background:var(--tt-cream);border:1px solid rgba(15,23,42,.10);position:relative;overflow:hidden;}
.tt-df-details:before{content:"";position:absolute;left:0;right:0;top:0;height:6px;background:var(--tt-red);}
.tt-df-details h2{margin:0 0 8px;font-size:2rem;font-weight:950;letter-spacing:-.02em;}
.tt-df-details .tt-df-donate{margin:0 0 14px;font-size:1.15rem;line-height:1.15;font-weight:900;color:#111827;}
.tt-df-details .tt-df-donate strong{color:var(--tt-red);font-weight:950;}
.tt-df-details__grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch;}
@media (max-width:991px){.tt-df-details__grid{grid-template-columns:1fr;}}
@media (min-width:992px){
  .tt-df-details__grid > :first-child{position:relative;}
  .tt-df-details__grid > :first-child::after{content:"";position:absolute;top:10px;bottom:10px;right:-7px;width:1px;background:rgba(15,23,42,.10);}
}
.tt-df-mini{background:rgba(255,255,255,.75);border:1px solid rgba(0,0,0,.08);border-radius:16px;padding:14px 14px 12px;}
.tt-df-mini h4{margin:0 0 10px;font-size:14px;font-weight:950;color:#111827;display:flex;align-items:center;gap:8px;}
.tt-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-weight:900;font-size:12px;background:rgba(15,23,42,.06);border:1px solid rgba(15,23,42,.10);white-space:nowrap;}
.tt-df-mini ul{margin:0;padding:0;list-style:none;display:grid;gap:6px;}
.tt-df-mini li{display:flex;gap:8px;align-items:flex-start;font-weight:650;line-height:1.25;color:#111827;}
.tt-df-mini li::before{content:"";width:8px;height:8px;border-radius:999px;margin-top:4px;background:rgba(213,43,30,.95);flex:0 0 8px;box-shadow:0 0 0 3px rgba(213,43,30,.12);}

/* === Gravity Forms submit button: force TomTreyco red on all views === */
.gform_wrapper input[type="submit"],
.gform_wrapper .gform_button,
.gform_wrapper button[type="submit"]{
  background: var(--tt-red) !important;
  border-color: var(--tt-red) !important;
  color:#fff !important;
  font-weight:900;
  border-radius:999px;
}
.gform_wrapper input[type="submit"]:hover,
.gform_wrapper .gform_button:hover,
.gform_wrapper button[type="submit"]:hover{
  filter: brightness(.95);
}

/* === Digital Fundraisers hero label + pill size increase === */
.df-hero .df-eyebrow,
.df-hero .badge,
.df-hero .pill,
.df-hero .section-label {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

@media (min-width: 768px) {
  .df-hero .df-eyebrow,
  .df-hero .badge,
  .df-hero .pill,
  .df-hero .section-label {
    font-size: 1.05rem;
    padding: 0.6rem 1.25rem;
  }
}

/* ===== Locations (CPT) ===== */
.tt-locations-hero{
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  background:linear-gradient(135deg, rgba(255,199,44,.14), rgba(213,43,30,.05) 52%, rgba(15,23,42,.02));
  box-shadow: var(--tt-shadow);
  overflow:hidden;
}
.tt-locations-hero h1{margin:0;font-weight:950;letter-spacing:-.02em;font-size:clamp(2rem,3.4vw,3rem);}
.tt-locations-hero p{margin:.5rem 0 0;color:var(--tt-muted);max-width:70ch;}

.tt-loc-toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin:18px 0 14px;
}
.tt-loc-search{
  flex: 1 1 320px;
  max-width: 520px;
}
.tt-loc-search input{
  width:100%;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.16);
  padding:0 14px;
  font-weight:700;
}
.tt-loc-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.tt-chip-btn{
  height:38px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.16);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}
.tt-chip-btn.is-active{
  border-color: rgba(213,43,30,.45);
  background: rgba(213,43,30,.08);
  color: var(--tt-red);
}

.tt-loc-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}
@media (max-width: 991px){ .tt-loc-grid{grid-template-columns: 1fr;} }
@media (min-width: 992px) and (max-width: 1199px){ .tt-loc-grid{grid-template-columns: repeat(2, 1fr);} }

.tt-loc-card{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  box-shadow: var(--tt-shadow);
  display:flex;
  flex-direction:column;
  min-height: 100%;
}
.tt-loc-thumb{
  aspect-ratio: 16 / 9;
  width:100%;
  background: rgba(15,23,42,.04);
  display:block;
  object-fit: cover;
}
.tt-loc-body{padding:14px 14px 12px;display:flex;flex-direction:column;gap:10px;flex:1;}
.tt-loc-title{
  margin:0;
  font-size:1.05rem;
  font-weight:950;
  line-height:1.15;
}
.tt-loc-meta{
  margin:0;
  color: var(--tt-muted);
  font-weight:650;
  font-size:.95rem;
  line-height:1.25;
}
.tt-loc-actions{margin-top:auto;display:flex;gap:10px;flex-wrap:wrap;}
.tt-loc-actions a{flex:0 0 auto;}
.tt-loc-badge{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;font-weight:950;
  padding:5px 10px;border-radius:999px;
  background: rgba(255,199,44,.40);
  border:1px solid rgba(15,23,42,.10);
  color:#111827;
}

.tt-loc-single{
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  background:#fff;
  box-shadow: var(--tt-shadow);
  overflow:hidden;
}
.tt-loc-single__grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:0;
}
@media (max-width: 991px){ .tt-loc-single__grid{grid-template-columns:1fr;} }
.tt-loc-single__media{
  background: rgba(15,23,42,.04);
  min-height: 260px;
}
.tt-loc-single__media img{width:100%;height:100%;object-fit:cover;display:block;}
.tt-loc-single__content{padding:18px 18px 16px;}
.tt-loc-single__h1{margin:0 0 6px;font-size:2rem;font-weight:950;letter-spacing:-.02em;}
.tt-loc-single__sub{margin:0 0 14px;color:var(--tt-muted);font-weight:650;}
.tt-kv{display:grid;grid-template-columns: 140px 1fr;gap:8px 12px;margin:0;}
@media (max-width: 480px){ .tt-kv{grid-template-columns: 1fr; gap:6px;} }
.tt-kv dt{font-weight:950;color:#111827;}
.tt-kv dd{margin:0;color:var(--tt-muted);font-weight:650;}
.tt-divider{height:1px;background:rgba(15,23,42,.10);margin:14px 0;}
.tt-note{background:rgba(255,199,44,.25);border:1px solid rgba(15,23,42,.10);border-radius:16px;padding:12px 12px;font-weight:700;color:#111827;}

/* ===== Locations Modal (best-of-both) ===== */
.tt-modal-backdrop{position:fixed; inset:0; background:rgba(2,6,23,.55); display:none; z-index:9998;}
.tt-modal{position:fixed; inset:0; display:none; z-index:9999; padding:18px; overflow:auto;}
.tt-modal.is-open, .tt-modal-backdrop.is-open{display:block;}
.tt-modal__panel{max-width:980px; margin:36px auto; background:#fff; border-radius:22px; border:1px solid rgba(15,23,42,.12);
  box-shadow:0 30px 70px rgba(2,6,23,.22); overflow:hidden;}
.tt-modal__grid{display:grid; grid-template-columns:1.15fr 1fr;}
@media (max-width:991px){.tt-modal__grid{grid-template-columns:1fr;} .tt-modal__panel{margin:18px auto;}}
.tt-modal__media{background:rgba(15,23,42,.04); min-height:240px;}
.tt-modal__media img{width:100%;height:100%;object-fit:cover;display:block;}
.tt-modal__body{padding:16px 16px 14px;}
.tt-modal__top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.tt-modal__title{margin:0;font-size:1.65rem;font-weight:950;letter-spacing:-.02em;line-height:1.1;}
.tt-modal__close{width:42px;height:42px;border-radius:12px;border:1px solid rgba(15,23,42,.16);background:rgba(15,23,42,.03);
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.tt-modal__close:focus{outline:none;box-shadow:0 0 0 4px rgba(213,43,30,.15);}
.tt-modal__sub{margin:6px 0 12px;color:var(--tt-muted);font-weight:650;}
.tt-modal__kv{display:grid;grid-template-columns:120px 1fr;gap:8px 12px;margin:0;}
@media (max-width:480px){.tt-modal__kv{grid-template-columns:1fr;gap:6px;}}
.tt-modal__kv dt{font-weight:950;}
.tt-modal__kv dd{margin:0;color:var(--tt-muted);font-weight:650;}
.tt-modal__actions{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap;}
.tt-modal__actions a{height:40px;}
.tt-loc-card a.tt-loc-open{text-decoration:none;color:inherit;}
.tt-loc-card a.tt-loc-open:focus{outline:none;box-shadow:0 0 0 4px rgba(213,43,30,.15);border-radius:14px;}
