/*
Theme Name: A Place To Be
Theme URI: https://www.aplacetobe.me
Description: Child theme of Twenty Twenty-Five for A Place To Be. Matches the Squarespace design (palette, Poppins body, Bree Serif headings, centred-logo header, Bitcoin/Nostr footer).
Author: A Place To Be
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Text Domain: aptb
License: GNU General Public License v2 or later
*/

/* ---------- Announcement bar ---------- */
.aptb-announcement { padding: 10px 2.5vw; }
.aptb-announcement p { margin: 0; font-size: 0.78rem; line-height: 1.5; letter-spacing: .02em; font-weight: 400; }
.aptb-announcement a { color: #000; text-decoration: none; }
.aptb-announcement a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.aptb-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 1rem; padding: 14px 2.4vw 10px; background: #fff;
}
.aptb-header > * { margin: 0 !important; }
.aptb-header .aptb-nav { justify-self: start; font-size: 0.95rem; font-weight: 300; gap: 1.1rem; }
.aptb-header .aptb-logo { justify-self: center; }
.aptb-header .aptb-logo img { width: 400px; max-width: 100%; height: auto; }
.aptb-header .aptb-join { justify-self: end; }
.aptb-join .wp-block-button__link { padding: .95em 2.2em; font-size: .78rem; }
.aptb-nav .wp-block-navigation-item__content { text-decoration: none; }
.aptb-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 6px; }
.aptb-nav .wp-block-navigation__submenu-container {
  border: 0 !important; box-shadow: 0 6px 24px rgba(0,0,0,.08); padding: .6rem 0; min-width: 270px !important;
}
.aptb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .35rem 1.2rem !important; }
/* JOIN US appears inside the mobile overlay only */
.aptb-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .aptb-nav-join { display: none; }
.aptb-nav .is-menu-open .aptb-nav-join .wp-block-navigation-item__content {
  background: var(--wp--preset--color--accent-3); color: #fff !important; border-radius: 999px;
  padding: .8em 2em !important; font-weight: 500; margin-top: 1rem;
}
.aptb-nav .is-menu-open .wp-block-navigation__container { gap: 1.1rem; font-size: 1.35rem; }
.aptb-nav .is-menu-open .wp-block-navigation__submenu-container { font-size: 1.05rem; box-shadow: none; padding: .4rem 0 0 1rem !important; }
.aptb-nav .wp-block-navigation__responsive-container-open svg,
.aptb-nav .wp-block-navigation__responsive-container-close svg { width: 34px; height: 34px; }

@media (max-width: 599px) {
  .aptb-announcement p { font-size: .72rem; }
  .aptb-header { grid-template-columns: 1fr auto; padding: 14px 6vw; }
  .aptb-header .aptb-logo { order: 1; justify-self: start; }
  .aptb-header .aptb-logo img { width: 270px; }
  .aptb-header .aptb-nav { order: 2; justify-self: end; }
  .aptb-header .aptb-join { display: none; }
}

/* ---------- Homepage sections ---------- */
.aptb-section { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); padding-left: 4vw; padding-right: 4vw; }
.aptb-hero { padding-top: 2.2rem; }
.aptb-hero .wp-block-columns { gap: 4vw; }
.aptb-hero .wp-block-embed { max-width: 480px; margin-left: auto; margin-right: auto; }
.aptb-intro h2 { max-width: 820px; margin-left: auto; margin-right: auto; }
.aptb-glow { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.aptb-glow .wp-block-embed { max-width: 300px; margin: 0 auto; }
.aptb-glow p { line-height: 2; }
.aptb-glow strong { font-weight: 600; }
.aptb-offer .aptb-stagger { height: 190px; }
.aptb-offer .wp-block-columns { gap: 7vw; }
.aptb-offer .has-small-font-size { line-height: 1.85; }
.aptb-offer strong { font-weight: 600; }
@media (max-width: 781px) {
  /* Mobile order as on live: heading + intro, then families block, then parents block */
  .aptb-offer .wp-block-columns { flex-direction: column; gap: 0; }
  .aptb-offer .wp-block-column { display: contents; }
  .aptb-offer .wp-block-column:first-child > * { order: 2; }
  .aptb-offer .wp-block-column:last-child > * { order: 3; }
  .aptb-offer .wp-block-column > .aptb-o1 { order: 1; }
  .aptb-offer .aptb-stagger, .aptb-offer .aptb-stagger-2 { display: none; }
  .aptb-offer .wp-block-image { margin-top: 1.5rem; }
  .aptb-offer .wp-block-image img { aspect-ratio: 3/4 !important; width: 100%; }
  .aptb-offer .wp-block-column:first-child > :last-child { margin-bottom: 2.5rem; }
}

/* Newsletter form (posts straight to the existing ActiveCampaign form) */
.aptb-newsletter { max-width: 250px; margin: 0 auto; font-family: Arial, Helvetica, sans-serif; }
.aptb-newsletter label { display: block; font-size: .8rem; font-weight: 700; margin: .9rem 0 .35rem; }
.aptb-newsletter .aptb-req { color: #ff0000; }
.aptb-newsletter input[type=text], .aptb-newsletter input[type=email] {
  width: 100%; box-sizing: border-box; border: 1px solid #979797; border-radius: 0; padding: 6px 7px; font-size: .78rem; font-family: inherit;
}
.aptb-newsletter button {
  margin-top: 1.1rem; background: #FFAA00; color: #fff; border: 0; border-radius: 4px; padding: 10px 11px;
  font-size: .78rem; cursor: pointer; font-family: inherit;
}
.aptb-newsletter button:hover { filter: brightness(.95); }
@media (max-width: 781px) { .aptb-newsletter { max-width: 100%; } }

/* ---------- Footer ---------- */
.aptb-footer { padding: 3rem 3vw 3.5rem; border-top: 0; }
.aptb-footer .wp-block-columns { gap: 2.5vw; align-items: center; }
.aptb-footer h4 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 .7rem; }
.aptb-footer p { margin: 0; font-size: .95rem; line-height: 1.6; }
.aptb-footer strong { font-weight: 600; }
.aptb-footer__btc { gap: 12px; align-items: flex-start; }
.aptb-footer__btc figure { flex: 0 0 auto; margin: 0; }
.aptb-footer__cta { border-radius: 40px; padding: 1.8rem 1rem; max-width: 300px; margin-left: auto !important; margin-right: auto !important; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.aptb-footer__cta p { font-size: 1.35rem; line-height: 1.6; color: #000; }
.aptb-footer__cta a { color: #000; }
.aptb-footer__nostr { gap: 10px; align-items: flex-start; flex-wrap: nowrap !important; }
.aptb-footer__nostr figure { flex: 0 0 auto; margin: 0; }
.aptb-npub { word-break: break-all; }
.aptb-footer a { color: #000; }

/* ---------- Blog ---------- */
.aptb-blog { padding: 2.5rem 2.4vw 4rem; }
.aptb-blog .wp-block-post-template.is-layout-grid { column-gap: 8vw; row-gap: 5rem; }
.aptb-blog .wp-block-post-featured-image img { width: 100%; height: auto; }
.aptb-blog .wp-block-post-date { font-size: .9rem; margin-top: 1.2rem; }
.aptb-blog .wp-block-post-title { margin-top: .6rem; }
.aptb-blog .wp-block-post-title a { text-decoration: none; }
.aptb-blog .wp-block-post-excerpt { font-size: .85rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.aptb-blog .wp-block-post-excerpt__more-link { display: inline-block; margin-top: .4rem; font-size: .8rem; text-decoration: underline; text-underline-offset: 6px; }
.aptb-blog .wp-block-query-pagination { margin-top: 4rem; font-size: 1rem; }

.aptb-single { padding: 2rem 4vw 4rem; }
.aptb-single .aptb-byline { font-size: .9rem; gap: .5em; margin-bottom: 1.2rem; font-weight: 400; }
.aptb-single .aptb-byline > * { margin: 0; }
.aptb-single .wp-block-post-title { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.3; margin-bottom: 3rem; }
.aptb-single .wp-block-post-content { font-size: .95rem; line-height: 1.8; }
.aptb-single .wp-block-post-content h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.aptb-single .wp-block-post-content img { height: auto; max-width: 100%; }

.aptb-updates .aptb-update { gap: 4vw; align-items: center; }
.aptb-updates .wp-block-post-featured-image { flex: 0 0 45%; margin: 0; }
.aptb-updates .wp-block-post-template > li { margin-bottom: 4rem; }
@media (max-width: 781px) {
  .aptb-updates .aptb-update { flex-direction: column; align-items: stretch; }
  .aptb-blog .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; }
}

/* footer column balance (matches live: wide left/right, CTA centre) */
@media (min-width: 782px) {
  .aptb-footer .wp-block-column:nth-child(1) { flex-basis: 37% !important; flex-grow: 0; }
  .aptb-footer .wp-block-column:nth-child(2) { flex-basis: 26% !important; flex-grow: 0; }
  .aptb-footer .wp-block-column:nth-child(3) { flex-basis: 37% !important; flex-grow: 0; }
}
.aptb-footer__btc p { font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 781px) {
  .aptb-footer .wp-block-column { flex-basis: 100% !important; }
  .aptb-footer .wp-block-columns { gap: 2.2rem; }
}
@media (min-width: 600px) { .aptb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { white-space: nowrap; } }
@media (max-width: 599px) { .aptb-blog { padding-left: 6vw; padding-right: 6vw; } .aptb-section { padding-left: 6vw; padding-right: 6vw; } }

/* =====================================================================
   Phase 2: inner pages rebuilt from Squarespace 7.1 sections
   ===================================================================== */
.aptb-page .wp-block-post-content > * { margin-top: 0; margin-bottom: 0; }
.aptb-page .wp-block-post-content { margin-top: 0; }
.aptb-psec { padding: clamp(2rem, 4.2vw, 3.6rem) 3vw; box-sizing: border-box; }
.aptb-psec.wp-block-cover { padding: clamp(2.5rem, 6vw, 5rem) 3vw; min-height: 0; }
.aptb-psec.aptb-h-medium { min-height: 0; }
.aptb-psec > * , .aptb-psec .wp-block-cover__inner-container > * { margin-top: 0; }
.aptb-psec .wp-block-cover__inner-container { width: 100%; max-width: 1240px; }

/* Live type scale (Squarespace: heading-2 2.8, heading-3 2.2, heading-4 1.6, large 1.5) */
.aptb-psec h1 { font-size: min(calc(3 * 1.2vw + 1rem), 4rem); }
.aptb-psec h2 { font-size: min(calc(1.8 * 1.2vw + 1rem), 46.2px); line-height: 1.3; }
.aptb-psec h3 { font-size: min(calc(1.2 * 1.2vw + 1rem), 36.2px); line-height: 1.35; }
.aptb-psec h4 { font-size: min(calc(.6 * 1.2vw + 1rem), 26px); line-height: 1.38; }
.aptb-psec .has-large-font-size { font-size: min(calc(.5 * 1.2vw + 1rem), 24.4px) !important; line-height: 1.8; }
.aptb-psec .has-small-font-size { font-size: .9rem !important; }
.aptb-psec p, .aptb-psec li { font-size: 1rem; line-height: 1.8; }
.aptb-psec h1, .aptb-psec h2, .aptb-psec h3, .aptb-psec h4 { margin-top: 0; margin-bottom: .6em; }
.aptb-psec p { margin-top: 0; margin-bottom: 1em; }
.aptb-psec .wp-block-list { margin-top: 0; padding-left: 1.4em; }
@media (max-width: 767px) {
  .aptb-psec h1 { font-size: calc(3 * min(1.2vh, 10.8px) + 1rem); }
  .aptb-psec h2 { font-size: calc(1.8 * min(1.2vh, 10.8px) + 1rem); }
  .aptb-psec h3 { font-size: calc(1.2 * min(1.2vh, 10.8px) + 1rem); }
  .aptb-psec h4 { font-size: calc(.6 * min(1.2vh, 10.8px) + 1rem); }
  .aptb-psec .has-large-font-size { font-size: calc(.5 * min(1.2vh, 10.8px) + 1rem) !important; }
  .aptb-psec { padding-left: 6vw; padding-right: 6vw; }
}

/* Section colour themes (Squarespace section themes) */
.aptb-t-white { background: #fff; color: #000; }
.aptb-t-light { background: #F6EAEB; color: #000; }
.aptb-t-black { background: #000; color: #fff; }
.aptb-t-black :is(h1,h2,h3,h4) { color: #fff; }
.aptb-t-black a { color: #7BB5B4; }
.aptb-t-bright-inverse { background: #000; color: #7BB5B4; }
.aptb-t-bright-inverse :is(h1,h2,h3,h4) { color: #7BB5B4; }
.aptb-t-bright-inverse a { color: #7BB5B4; }
.aptb-t-dark { background: #041FFE; color: #fff; }
.aptb-t-dark :is(h1,h2,h3,h4) { color: #fff; }
.wp-block-cover.aptb-psec, .wp-block-cover.aptb-psec :is(h1,h2,h3,h4,p) { color: #fff; }
/* header ("hero") sections: black band with centred title, as on live */
.aptb-t-bright-inverse.aptb-h-medium { padding-top: clamp(4rem, 13vw, 10.5rem); padding-bottom: clamp(4rem, 13vw, 10.5rem); }

/* Fluid-engine rows rebuilt as columns */
.aptb-cols { margin-bottom: 0 !important; gap: 0 !important; align-items: flex-start; }
.aptb-cols > .wp-block-column { padding: 0 11px; box-sizing: border-box; }
.aptb-cols > .wp-block-column > :first-child { margin-top: 0; }
.aptb-narrow { padding: 0 11px; }
@media (min-width: 782px) { .aptb-cols.aptb-rev { flex-direction: row-reverse; } }
@media (max-width: 781px) {
  .aptb-cols { flex-wrap: wrap !important; }
  .aptb-cols > .wp-block-column { flex-basis: 100% !important; padding: 0; }
  .aptb-cols > .wp-block-column + .wp-block-column { margin-top: 1.6rem; }
  .aptb-cols > .aptb-gap { display: none; }
  .aptb-vgap { max-height: 24px; }
  .aptb-narrow { padding: 0; }
}
.aptb-psec .wp-block-image { margin: 0 0 1rem; }
.aptb-psec .wp-block-image img { width: 100%; height: auto; display: block; }
.aptb-psec .wp-block-embed { margin: 0 0 1rem; }
.aptb-card { padding: 1.6rem 1.8rem; margin-bottom: 1rem; }
.aptb-card, .aptb-card :is(h1,h2,h3,h4,p) { color: inherit; }
.aptb-card[style*="#000000"], .aptb-card[style*="#000000"] :is(h1,h2,h3,h4) { color: #fff; }
.aptb-card[style*="#000000"] a { color: #7BB5B4; }
.aptb-embed iframe { max-width: 100%; display: block; margin: 0 auto; }
.aptb-code iframe { width: 100%; max-width: 640px; }

/* Buttons on inner pages: live uses black square "secondary" buttons */
.aptb-psec .wp-block-button__link { background: #000; color: #fff; border-radius: 0; padding: 1.1em 2.6em; text-transform: none; font-size: .95rem; letter-spacing: .02em; }
.aptb-psec .wp-block-button__link:hover { background: #222; color: #fff; }
.aptb-psec .aptb-btn-dark .wp-block-button__link { border-radius: 999px; padding: 1em 1.9em; }

/* Quote block */
.aptb-psec .aptb-quote { border: 0; padding: 6%; margin: 0; font-family: "Bree Serif", Georgia, serif; }
.aptb-psec .aptb-quote p { font-family: "Bree Serif", Georgia, serif; font-size: 1.6rem; line-height: 1.4; }
.aptb-psec .aptb-quote cite { font-style: normal; font-size: 1rem; font-family: Poppins, sans-serif; }

/* Carousel (What we offer) */
.aptb-carousel { overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px !important; padding: 0 3vw 1rem; scrollbar-width: thin; }
.aptb-carousel > .aptb-slide { flex: 0 0 calc((100% - 40px) / 3.2); scroll-snap-align: start; margin: 0 !important; }
.aptb-slide h2 { font-size: min(calc(1.8 * 1.2vw + 1rem), 46.2px); margin: .3em 0 .4em; }
.aptb-slide p { font-size: 1rem; }
.aptb-carousel-wrap { position: relative; }
.aptb-carousel-nav { position: absolute; top: 18%; width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 28px; line-height: 60px; cursor: pointer; z-index: 2; }
.aptb-carousel-nav.prev { left: 3.5vw; } .aptb-carousel-nav.next { right: 3.5vw; }
@media (max-width: 781px) { .aptb-carousel > .aptb-slide { flex-basis: 82%; } .aptb-carousel { padding: 0 6vw 1rem; } .aptb-carousel-nav { display: none; } }

/* Card grid (Accommodation) */
.aptb-cardgrid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px !important; }
.aptb-card-item { background: #fff; color: #000; padding: 10%; }
.aptb-card-item :is(h2,p) { color: #000 !important; }
.aptb-card-item h2 { font-size: min(calc(.6 * 1.2vw + 1rem), 26px); margin: .6em 0; }
.aptb-card-item p { font-size: .95rem; }
.aptb-circle img { border-radius: 50%; }
@media (max-width: 1099px) { .aptb-cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 575px) { .aptb-cardgrid { grid-template-columns: 1fr !important; } }

/* nothing on inner pages may cause sideways scroll */
.aptb-page { overflow-x: clip; }
.aptb-page :is(p,li,h1,h2,h3,h4) { overflow-wrap: break-word; }

/* ---------- Cookie notice (matches live: black bottom bar, teal pill "Accept") ---------- */
.aptb-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 14px 3vw; box-shadow: 0 -2px 10px rgba(0,0,0,.15); }
.aptb-cookie[hidden] { display: none; }
.aptb-cookie__text { margin: 0; font-size: .78rem; line-height: 1.5; font-weight: 300; color: #fff; }
.aptb-cookie__accept { flex: 0 0 auto; background: #7BB5B4; color: #000; border: 0; border-radius: 999px; padding: .75em 1.4em;
  font-family: Poppins, sans-serif; font-weight: 500; font-size: .78rem; cursor: pointer; }
.aptb-cookie__accept:hover, .aptb-cookie__accept:focus-visible { background: #69a3a2; outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 599px) {
  .aptb-cookie { flex-direction: column; align-items: stretch; text-align: left; gap: .8rem; padding: 14px 6vw 18px; }
  .aptb-cookie__accept { align-self: flex-start; }
}
.aptb-carousel { scroll-padding: 0 3vw; }
@media (max-width: 781px) { .aptb-carousel { scroll-padding: 0 6vw; } }
.aptb-psec .aptb-imgtext { padding: 2rem; margin-bottom: 1rem; }
.aptb-psec .aptb-imgtext .wp-block-cover__inner-container { max-width: 100%; }
/* Squarespace section heights = vertical padding (small 3.3vmax, medium 6.6vmax, large 10vmax) */
.aptb-psec.aptb-h-small { padding-top: 3.3vmax; padding-bottom: 3.3vmax; }
.aptb-psec.aptb-h-medium, .aptb-psec.wp-block-cover.aptb-h-medium { padding-top: 6.6vmax; padding-bottom: 6.6vmax; }
.aptb-psec.aptb-h-large { padding-top: 10vmax; padding-bottom: 10vmax; }
.aptb-t-bright-inverse.aptb-h-medium { padding-top: clamp(4rem, 13vw, 10.5rem); padding-bottom: clamp(4rem, 13vw, 10.5rem); }
.aptb-card { border-radius: 24px; }
.aptb-card:not([style*="#000000"]) a { color: #000; }
.aptb-card[style*="rgba(0,0,0"], .aptb-card[style*="rgba(0,0,0"] :is(h1,h2,h3,h4) { color: #fff; }
.aptb-textbg p:last-child { margin-bottom: 0; }
.aptb-psec .aptb-quote p { font-family: Poppins, sans-serif; font-weight: 400; font-size: min(calc(.5 * 1.2vw + 1rem), 24.4px); line-height: 1.6; }
.aptb-psec .aptb-quote cite { text-align: right; display: block; font-size: .85rem; }
@media (max-width: 781px) { .aptb-cols .wp-block-image img { aspect-ratio: auto !important; } }
.aptb-psec .aptb-list-center { text-align: center; list-style-position: inside; padding-left: 0; }
.aptb-psec .has-large-font-size li { font-size: inherit; }
