/* Estcourt Vets block theme: the bridge between core blocks and the static design.
   site.css is the static concept's stylesheet, unchanged. Core blocks wrap a few things
   differently (buttons, images, lists, the navigation), so this file maps them onto the
   same look. "body" in front of a selector makes it win over WordPress's own block CSS. */

/* ---------- icons from a CSS class (fa-* on a paragraph or list item) ---------- */
.ico::before,
.quick-grid li::before,
.facility-list li::before,
.plan-vidivet .plan-body::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; font-style: normal;
  -webkit-font-smoothing: antialiased; display: inline-block; line-height: 1;
}

/* ---------- buttons (core Button block = the static .btn) ---------- */
body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
body .wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: 1.125rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center;
  background: var(--green); color: var(--white);
  transition: background-color .2s, color .2s, border-color .2s;
}
body .wp-block-button .wp-block-button__link:hover { background: var(--olive); color: var(--white); }
body .wp-block-button.is-style-gold .wp-block-button__link { background: var(--gold-light); color: var(--green); }
body .wp-block-button.is-style-gold .wp-block-button__link:hover { background: var(--white); }
body .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border-color: var(--green); color: var(--green); }
body .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--green); color: var(--white); }
body .wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
body .wp-block-button.is-style-outline-light .wp-block-button__link:hover { background: var(--white); color: var(--green); border-color: var(--white); }
.plan-body .wp-block-buttons { margin-top: auto; }
.header-book .wp-block-button__link { white-space: nowrap; }
/* same breakpoints as the static header: no Book button in the header below 1220px */
@media (max-width: 1220px) { body .header-book { display: none; } }
@media (min-width: 1101px) and (max-width: 1340px) {
  body .header-book .wp-block-button__link { padding: 12px 18px; }
}
@media (max-width: 640px) {
  .hero .btn-row .wp-block-button, .cta-register .btn-row .wp-block-button { width: 100%; }
  body .hero .btn-row .wp-block-button__link, body .cta-register .btn-row .wp-block-button__link { width: 100%; }
}

/* ---------- "More about us" style text links ---------- */
.more-link { margin: 0; }
.more-link a {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.125rem; color: var(--green);
  text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.more-link a::after {
  content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .9em;
  transition: transform .2s;
}
.more-link a:hover::after { transform: translateX(4px); }

/* ---------- images that fill their frame ---------- */
body .hero-photo img,
body .arch-frame img,
body .about-team img,
body .plan-photo img { width: 100%; height: 100%; object-fit: cover; }
body .hero-photo img { object-position: 30% 40%; }

/* ---------- header ---------- */
/* logged in, the WordPress toolbar sits on top; keep the sticky header below it */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.topbar .ico::before { color: var(--gold-light); margin-right: 8px; }
.topbar-links { display: flex; align-items: center; gap: 28px; }
.topbar-links a[href^="tel:"] { font-size: 1.125rem; font-weight: 700; }
.topbar-links a[href^="tel:"]::before {
  content: "\f095"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: var(--gold-light); margin-right: 8px;
}
.header-phone { position: relative; margin: 0; }
.header-phone::before { color: var(--gold); }
.header-phone a { color: inherit; text-decoration: none; }

/* core Navigation block = the static menu */
.site-nav { margin-left: auto; flex: none; }
body .site-nav .wp-block-navigation__container { gap: 2px; flex-wrap: nowrap; }
body .site-nav .wp-block-navigation-item__content {
  display: block; padding: 10px 11px; border-radius: 8px; white-space: nowrap;
  font-size: 1.125rem; font-weight: 600; text-decoration: none; color: var(--green);
}
body .site-nav .wp-block-navigation-item__content:hover { background: var(--sage-tint); }

/* the Menu button, as on the static site */
body .site-nav .wp-block-navigation__responsive-container-open {
  align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--green); background: var(--white); color: var(--green);
  font: 700 1.125rem/1 var(--font-body); cursor: pointer;
}
body .site-nav .wp-block-navigation__responsive-container-open::after { content: "Menu"; }

@media (max-width: 1100px) {
  /* WordPress switches to the mobile menu at 600px; this design switches at 1100px */
  body .site-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; }
  body .site-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
  .site-nav { order: 3; margin-left: 0; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 430px) {
  body .site-nav .wp-block-navigation__responsive-container-open { width: 48px; height: 48px; padding: 0; justify-content: center; }
  body .site-nav .wp-block-navigation__responsive-container-open::after { content: none; }
}

/* the open mobile menu: full-screen green panel with large serif links */
body .site-nav.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--green); color: var(--white);
  padding: 24px var(--gut) 40px;
}
body .site-nav.wp-block-navigation .is-menu-open .wp-block-navigation__container { gap: 0; }
body .site-nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
  color: var(--white); font-family: var(--font-head); font-weight: 500;
  font-size: 1.75rem; padding: 14px 0; border-radius: 0;
}
body .site-nav .is-menu-open .wp-block-navigation-item__content:hover { background: none; color: var(--gold-light); }
body .site-nav .wp-block-navigation__responsive-container-close { color: var(--white); }

@media (max-width: 900px) {
  .header-phone a { position: absolute; inset: 0; font-size: 0; }
}

/* ---------- hero ---------- */
.hero-emergency::before { color: var(--gold-light); }

/* ---------- quick links (a List block; the tile is the list item) ---------- */
.quick-grid li {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; height: 100%;
  padding: 20px 18px; border-radius: 16px; background: var(--white);
  color: var(--green); font-weight: 700; font-size: 1.125rem; line-height: 1.3;
  transition: background-color .2s, color .2s;
}
.quick-grid li::before { font-size: 1.5rem; color: var(--gold-ink); transition: color .2s; }
.quick-grid li a {
  display: inline; height: auto; padding: 0; border-radius: 0; background: none;
  color: inherit; text-decoration: none;
}
.quick-grid li a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.quick-grid li:hover { background: var(--green); color: var(--white); }
.quick-grid li:hover::before { color: var(--gold-light); }
.quick-grid li a:hover { background: none; color: inherit; }
.quick-grid li:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 640px) {
  .quick-grid li { padding: 16px 14px; font-size: 1.0625rem; }
}

/* ---------- facilities ---------- */
.facility-list li::before {
  color: var(--gold-light); font-size: 1.2rem; width: 1.5em; flex: none; margin-top: 3px; text-align: center;
}

/* ---------- services: the card is a Group; its link covers the whole card ---------- */
.service-card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 2px solid var(--sage-200);
  transition: border-color .2s;
}
.service-card:hover { border-color: var(--gold); }
.service-card .wp-block-image { overflow: hidden; }
.service-card:hover img { transform: scale(1.04); }
.service-card .service-name { margin: 0; }
.service-card .service-name a {
  /* undo the static .service-card a card styles: here the Group is the card */
  display: inline; height: auto; border: 0; border-radius: 0; overflow: visible; background: none;
  color: var(--green); text-decoration: none;
}
.service-card .service-name a::before { content: ""; position: absolute; inset: 0; }

/* ---------- health plan and Vidivet ---------- */
.plan-vidivet .plan-body::before {
  content: "\f3cd";
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px;
  border-radius: 50%; background: rgba(255,255,255,.12); color: var(--gold-light); font-size: 1.6rem;
}

/* ---------- testimonials (core Quote block) ---------- */
body .quote { margin: 0; border: 0; }
.quote p {
  font-family: var(--font-head); font-size: 1.3rem; line-height: 1.45; color: var(--green);
  margin: 0 0 20px;
}
.quote cite { margin-top: auto; font-style: normal; font-weight: 700; color: var(--gold-ink); }

/* ---------- footer ---------- */
.footer-bottom p { margin: 0; }
body .footer-social { display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
body .footer-social .wp-social-link { background: rgba(255,255,255,.1); color: var(--white); border-radius: 50%; margin: 0; }
body .footer-social .wp-social-link a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--white); background: none; }
body .footer-social .wp-social-link a:hover { color: var(--gold-light); }
body .footer-social .wp-social-link svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- other pages (page.html), until they get their own patterns ---------- */
.page-head { padding-top: clamp(40px, 6vw, 80px); }
.page-content { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) var(--section); }
