/* =========================================================
   PHMS v2 – Minimal CSS Scaffold
   Purpose: layout + readability, not branding
   ========================================================= 
   
 Theme Name: Twenty Twenty-Four Child
 Theme URI: https://example.com/
 Description: Child theme of Twenty Twenty-Four
 Author: PDH
 Template: twentytwentyfour
 Version: 1.0.1
 Updated 11 January 2026
*/

/* ---- Base Reset (light) ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
  margin: 0 auto;
}

main {
  padding: 2rem 0;
}

section {
  margin: 2.5rem 0;
}

hr {
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 3rem 0;
}

/* ---- Typography ---- */
h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.75rem 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

p {
  margin: 0 0 1rem 0;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* ---- Buttons ---- */
.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: transparent;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.button:hover {
  background: #f2f2f2;
}

.button-primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.button-primary:hover {
  background: #000;
}

/* ---- Meta / Badges ---- */
.guide-meta,
.gallery-meta,
.card-meta {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.meta-item {
  margin-right: 0.5rem;
}

/* ---- Cards & Grids ---- */
.card-grid,
.guide-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card,
.guide-card,
.gallery-card {
  border: 1px solid #e0e0e0;
  padding: 1rem;
  background: #fff;
}

.card-title,
.guide-card-title,
.gallery-card-title {
  margin-top: 0.75rem;
}

.card-thumb,
.gallery-thumb {
  margin-bottom: 0.75rem;
}

/* ---- Archive Headers ---- */
.archive-header {
  margin-bottom: 2rem;
}

.archive-header p {
  max-width: 720px;
}

/* ---- Filters ---- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.filter-group {
  font-size: 0.9rem;
}

.filter-group a {
  margin-right: 0.5rem;
  text-decoration: none;
}

.filter-group a.is-active {
  font-weight: 600;
  text-decoration: underline;
}

/* ---- Search Forms ---- */
.guide-search,
.gallery-search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

input[type="search"],
input[type="text"],
textarea {
  padding: 0.45rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* ---- Single Content ---- */
.guide-content,
.gallery-content {
  max-width: 800px;
}

.guide-hero,
.gallery-hero {
  margin: 1.5rem 0;
}

/* ---- Pagination ---- */
.pagination ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.4rem 0.7rem;
  border: 1px solid #ccc;
  text-decoration: none;
  font-size: 0.85rem;
}

.pagination .current {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  main {
    padding: 1.5rem 0;
  }
}

/* HERO */
.home-hero { padding: 3rem 0; }
.home-hero-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}

.home-hero-figure { margin: 0; }
.home-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-hero-caption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Mobile */
@media (max-width: 860px) {
  .home-hero-inner { grid-template-columns: 1fr; }
  .home-hero { padding: 2rem 0; }
}


.placeholder-media {
  border: 1px dashed #bbb;
  padding: 2rem;
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
}

.lead {
  font-size: 1.1rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
  }
}

/* ---- Header ---- */
.phms-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.phms-header__inner {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
}

.phms-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.phms-logo__text {
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Center block: slightly left aligned + stacked name/tagline */
.phms-header__center{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.15rem;

  /* key change: align slightly left (not centred in the middle column) */
  justify-self: start;
  text-align: left;
  margin-left: -0.25rem; /* subtle nudge left */
}

.phms-business-name{
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.phms-positioning {
  font-size: 0.90rem;
  opacity: 0.70; /* small + muted */
  color: #333;
}

.phms-header__right {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
}

.phms-phone {
  text-decoration: none;
  padding: 0.55rem 0.4rem;
  border-radius: 4px;
}

.phms-phone:hover {
  background: #f2f2f2;
}

/* Desktop vs Mobile phone CTA */
.phms-phone--mobile { display: none; }
.phms-phone--desktop { display: inline-flex; }

/* ---- Footer ---- */
.phms-footer {
  border-top: 1px solid #e0e0e0;
  padding: 2.5rem 0;
  margin-top: 3rem;
  background: #fff;
}

.phms-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.phms-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phms-footer__list li {
  margin: 0 0 0.5rem 0;
}

.phms-footer__list a {
  text-decoration: none;
}

.phms-footer__list a:hover {
  text-decoration: underline;
}

.phms-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f0f0f0;
  color: #555;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .phms-header__inner {
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto auto;
  }

  .phms-header__center {
    grid-column: 1 / -1;
  }

  .phms-footer__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .phms-header__inner {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .phms-header__center {
    display: none; /* keep header compact on small screens */
  }

  .phms-header__right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .phms-positioning {display:none; }
  .phms-phone--desktop { display: none; }
  .phms-phone--mobile { display: inline-block; }
}

/* TROUBLESHOOTING STICKY HEADER */

/* Sticky header (force) */ 
.phms-header.wp-block-group,
.phms-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}


/* If sticky still fails, it's often due to an overflow parent */
html, body { overflow-x: visible; }
.wp-site-blocks { overflow: visible; } 


/* Diagnostic only: if this works, CSS is loading but sticky is blocked */
/* .phms-header { position: fixed; left: 0; right: 0; top: 0; }
/* .phms-site, main { padding-top: 86px; } /* adjust if header height differs */

.phms-enquiry-form input,
.phms-enquiry-form textarea {
  width: 100%;
  max-width: 48rem;
}

/* SERVICES GRID */
.service-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .service-grid { grid-template-columns: 1fr; }
}

.service-card { overflow: hidden; }
.service-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-card-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 0.9rem;
  background: rgba(0,0,0,0.04);
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card-placeholder {
  width: 100%;
  height: 100%;
}

.service-card .card-title { margin: 0 0 0.35rem; }
.service-card p { margin: 0; opacity: 0.85; }

/* SERVICES: polish patch (equal heights + hover) */
.service-card {
  height: 100%;
}

.service-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-card-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

/* make text stack fill card height nicely */
.service-card .card-title { margin: 0 0 0.35rem; }
.service-card p { margin: 0; }
.service-card p { margin-top: auto; } /* pushes description to bottom if titles wrap */

/* hover + focus */
.service-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}
.service-card-link:focus-visible {
  outline: 3px solid rgba(31,120,180,0.45);
  outline-offset: 4px;
  border-radius: 16px;
}

/* subtle image zoom on hover */
.service-card-media img {
  transition: transform 220ms ease;
}
.service-card:hover .service-card-media img {
  transform: scale(1.035);
}


/* Service Area Styles*/

.phms-service-areas {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.phms-service-areas__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.phms-card {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 16px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.phms-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin: 1rem 0;
}

.phms-subtitle {
  opacity: .85;
}

.phms-suburb-groups {
  display: grid;
  gap: 1rem;
}

.phms-suburb-groups ul {
  margin: 0;
  padding-left: 1.2rem;
  column-count: 2;
}

.phms-footnote {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 1100px) {
  .phms-service-areas__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .phms-service-areas__grid {
    grid-template-columns: 1fr;
  }

  .phms-suburb-groups ul {
    column-count: 1;
  }
}

/* Service Map Lightbox */
/* ===== PHMS Lightbox ===== */
.phms-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,.85);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0ms linear 180ms;
}

.phms-lightbox.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease, visibility 0ms;
}

.phms-lightbox__content{
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  text-align: center;
}

.phms-lightbox__content img{
  max-width: 92vw;
  max-height: 78vh;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.phms-lightbox__caption{
  margin: 0.9rem 0 0;
  color: #fff;
  opacity: .92;
  font-size: 1rem;
  letter-spacing: .2px;
  text-align: center;
}

.phms-lightbox__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.phms-lightbox__close:hover{
  background: rgba(0,0,0,.65);
}

/* Hover cue for clickable maps */
.phms-zoomable{
  cursor: zoom-in;
  transition: transform 240ms ease, box-shadow 240ms ease;
  transform-origin: center;
}

.phms-zoomable:hover,
.phms-zoomable:focus-visible{
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

