/* =====================================================================
   IRONFORGE FITNESS - STYLESHEET (DEMONSTRATION VERSION)
   ---------------------------------------------------------------------
   Contents
   1.  Colour and design variables (change colours HERE only)
   2.  Reset and base styles
   3.  Layout helpers (container, sections, headings)
   4.  Buttons and links
   5.  Navigation bar
   6.  Hero section
   7.  Image frames and missing-image message
   8.  About section
   9.  Facilities section
   10. Membership plans section
   11. Gallery section and lightbox
   12. Testimonials section
   13. Contact section
   14. Footer
   15. Privacy policy page
   16. Responsive rules (tablet and mobile)
   17. Reduced motion
   18. Demo additions: notification, link-style buttons, "Website Demo" label
   ===================================================================== */


/* =====================================================================
   1. COLOUR AND DESIGN VARIABLES
   Every colour used on the site is defined here once. To change a colour
   across the whole website, change it in this block only.
   ===================================================================== */
:root {
  --color-bg: #0B0B0B;            /* Main website background */
  --color-bg-alt: #151515;        /* Secondary background, used on every second section */
  --color-card: #1D1D1D;          /* Background of cards (plans, reviews, image frames) */
  --color-accent: #FF5A1F;        /* Primary accent: buttons, links, key highlights */
  --color-accent-hover: #FF7A45;  /* Lighter accent shown when hovering over accent buttons */
  --color-on-accent: #0B0B0B;     /* Dark text placed on top of orange buttons (readable) */
  --color-text: #FFFFFF;          /* Main text colour */
  --color-text-muted: #A3A3A3;    /* Secondary text colour for descriptions and small print */
  --color-border: #2E2E2E;        /* Thin dividing lines and card outlines */
  --color-hero-overlay: rgba(11, 11, 11, 0.74);  /* Dark layer over the hero photo so white text stays readable */
  --color-backdrop: rgba(0, 0, 0, 0.92);         /* Dark screen behind the gallery lightbox */

  /* Font: system fonts only, so no third-party font requests are made */
  --font-main: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;

  --radius: 6px;          /* Corner rounding for cards, buttons and images (small, not pill-shaped) */
  --header-height: 72px;  /* Height of the sticky navigation bar */
  --page-width: 1160px;   /* Maximum width of page content */
}


/* =====================================================================
   2. RESET AND BASE STYLES
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box; /* Padding and borders stay inside an element's width */
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Smooth scrolling for the navigation links, but only for people who have not
   asked their device to reduce motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);             /* Main text colour */
  background-color: var(--color-bg);    /* Main website background */
}

img {
  display: block;
  max-width: 100%; /* Images never become wider than their container (prevents sideways scrolling) */
  height: auto;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul, dl, dd {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

/* Keyboard focus: a clear outline so people using a keyboard can see where they are */
:focus-visible {
  outline: 3px solid var(--color-accent); /* Orange focus outline */
  outline-offset: 3px;
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background-color: var(--color-accent); /* Orange skip-link background */
  color: var(--color-on-accent);         /* Dark text on orange */
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}


/* =====================================================================
   3. LAYOUT HELPERS
   ===================================================================== */

/* Centres content and keeps it from getting too wide on large screens */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* Every page section shares the same vertical spacing */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  background-color: var(--color-bg); /* Default section background (main) */
  scroll-margin-top: var(--header-height); /* Stops the sticky menu covering the heading after a jump */
}

/* Alternate sections use the secondary background. It sits after .section in the file so it wins */
.section--alt {
  background-color: var(--color-bg-alt); /* Secondary section background */
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  text-transform: uppercase;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head p {
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted intro text under section headings */
}


/* =====================================================================
   4. BUTTONS AND LINKS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem; /* Comfortable tap size on phones */
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Main button: solid orange */
.btn--primary {
  background-color: var(--color-accent); /* Orange button fill */
  border-color: var(--color-accent);     /* Orange button edge */
  color: var(--color-on-accent);         /* Dark text on orange */
}

.btn--primary:hover {
  background-color: var(--color-accent-hover); /* Lighter orange on hover */
  border-color: var(--color-accent-hover);     /* Lighter orange edge on hover */
}

/* Secondary button: outline only */
.btn--outline {
  background-color: transparent;
  border-color: var(--color-text); /* White outline */
  color: var(--color-text);        /* White button text */
}

.btn--outline:hover {
  background-color: var(--color-text); /* White fill on hover */
  color: var(--color-bg);              /* Dark text on the white fill */
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.btn-row--stack {
  flex-direction: column;
  align-items: stretch;
}

/* DEMO CONVERSION: some former links are now buttons (they show the demo notice).
   This class strips the default button look so they match the old link style. */
.link-button {
  padding: 0;
  background-color: transparent; /* No button fill: looks like a text link */
  border: 0;
  color: inherit;                /* Takes the text colour of the place it sits in */
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.text-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--color-accent); /* Orange link text */
  font-weight: 700;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--color-accent-hover); /* Lighter orange on hover */
}


/* =====================================================================
   5. NAVIGATION BAR
   Sticky at the top. On small screens the links collapse into a menu
   opened by the hamburger button (controlled by script.js).
   ===================================================================== */
.site-header {
  position: sticky; /* Stays at the top while scrolling */
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);              /* Navigation bar background */
  border-bottom: 1px solid var(--color-border);   /* Thin line under the bar */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--color-text); /* White logo text */
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list a:not(.btn) {
  padding-block: 0.5rem;
  color: var(--color-text-muted); /* Muted menu link colour */
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:not(.btn):hover {
  color: var(--color-text);                  /* White on hover */
  border-bottom-color: var(--color-accent);  /* Orange underline on hover */
}

/* Hamburger button: hidden on desktop, shown in the mobile rules (section 16) */
.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin: 0.3rem auto;
  background-color: var(--color-text); /* White hamburger lines */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* When the menu is open, the three lines turn into an X to show it can be closed */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}


/* =====================================================================
   6. HERO SECTION
   Full-screen photo with a dark overlay so the white text stays readable.
   ===================================================================== */
.hero {
  position: relative;
  display: flex;
  min-height: calc(100vh - var(--header-height)); /* Fallback for older browsers */
  min-height: calc(100svh - var(--header-height)); /* Accurate height on phones with moving address bars */
  background-color: var(--color-bg-alt); /* Hero background (text-only version) */
  border-bottom: 1px solid var(--color-border); /* Line under the hero */
  overflow: hidden;
  scroll-margin-top: var(--header-height);
}

/* UPDATE (photos): hero photo fills the hero. The overlay below darkens it so white text stays readable */
.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;          /* Photo fills the hero without stretching */
  object-position: 50% 40%;   /* Keeps the lifter in view on tall mobile screens */
}

/* The dark layer that sits on top of the photo */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--color-hero-overlay); /* Dark overlay over the hero photo */
}

.hero-media.is-missing img {
  display: none; /* If the photo ever fails to load, the plain dark hero background shows instead */
}

.hero-inner {
  position: relative; /* Keeps the text above the photo and overlay */
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.hero-content {
  max-width: 48rem;
  /* The only entrance animation on the site: the hero text fades in once on page load */
  animation: hero-in 0.6s ease-out both;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-transform: uppercase;
  line-height: 1;
}

.hero-text {
  max-width: 38rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--color-text); /* White supporting text on the photo */
}

/* Address and phone strip at the bottom of the hero */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-text-muted); /* Thin grey line above the address strip */
  font-size: 0.9375rem;
  color: var(--color-text); /* White address text */
}

.hero-facts a {
  text-decoration: none;
  font-weight: 700;
}

.hero-facts a:hover {
  color: var(--color-accent); /* Orange phone number on hover */
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =====================================================================
   7. IMAGE FRAMES AND MISSING-IMAGE MESSAGE
   Each photo sits in a frame with a fixed shape (so the page does not jump while
   photos load). If a photo file ever fails to load, script.js adds the class
   "is-missing" and the frame shows a short note instead of a broken-image icon.
   ===================================================================== */
.media {
  position: relative;
  overflow: hidden;
  background-color: var(--color-card);        /* Frame colour behind photos */
  border: 1px solid var(--color-border);      /* Thin frame outline */
  border-radius: var(--radius);
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--landscape { aspect-ratio: 3 / 2; }
.media--portrait  { aspect-ratio: 4 / 5; }

/* Missing-photo state, shared by image frames and gallery tiles */
.is-missing img {
  display: none;
}

.media.is-missing::after,
.gallery-item.is-missing::after {
  content: attr(data-label); /* Text comes from the data-label attribute in the HTML */
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted); /* Muted note text */
}


/* =====================================================================
   8. ABOUT SECTION
   Text on the left, photo on the right (stacked on mobile).
   ===================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center; /* Text and photo are centred against each other */
}

.about-text > p {
  margin-top: 1.5rem;
  max-width: 38rem;
  color: var(--color-text-muted); /* Muted body text */
}

.point-list {
  margin-block: 2rem;
  max-width: 38rem;
  border-top: 1px solid var(--color-border); /* Line above the first point */
}

.point-list li {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--color-border); /* Line between points */
  color: var(--color-text-muted);              /* Muted description text */
}

.point-list strong {
  color: var(--color-text); /* White bold lead-in for each point */
}


/* =====================================================================
   9. FACILITIES SECTION
   Two columns of photo cards on desktop, one column on mobile.
   ===================================================================== */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

.facility .media {
  margin-bottom: 1.25rem; /* Space between each facility photo and its title */
}

.facility {
  padding-top: 1.5rem;
  border-top: 3px solid var(--color-accent); /* Orange line above each facility */
}

.facility h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.facility p {
  margin-top: 0.5rem;
  max-width: 30rem;
  color: var(--color-text-muted); /* Muted card description */
}


/* =====================================================================
   10. MEMBERSHIP PLANS SECTION
   ===================================================================== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background-color: var(--color-card);       /* Plan card background */
  border: 1px solid var(--color-border);     /* Plan card outline */
  border-radius: var(--radius);
}

.plan h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.plan-term {
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--color-accent); /* Orange membership length */
}

.plan-desc {
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted plan description */
}

.plan-price {
  margin-block: 1.5rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--color-border); /* Lines above and below the price */
  font-size: 1.5rem;
  font-weight: 800;
}

.plan-list {
  flex-grow: 1; /* Pushes the button to the bottom so all three buttons line up */
  margin-bottom: 1.75rem;
}

.plan-list li {
  padding-block: 0.4rem;
  color: var(--color-text-muted); /* Muted benefit text */
}

.plan-note {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted); /* Muted small print */
}


/* =====================================================================
   11. GALLERY SECTION AND LIGHTBOX
   Four photos in a three-column grid. On desktop:
     row 1-2: large feature photo (2 columns) + tall photo (1 column)
     row 3:   wide photo (2 columns) + one small photo (1 column)
   The tablet and mobile layouts are in the media queries at the end of this section.
   ===================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(11rem, 20vw, 15rem);
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-card);       /* Tile colour behind photos */
  border: 1px solid var(--color-border);     /* Tile outline */
  border-radius: var(--radius);
  cursor: pointer;
}

.gallery-item--feature {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease; /* Gentle zoom on hover, shows the tile is clickable */
}

.gallery-item--tall img {
  object-position: 50% 62%; /* Keeps the hands and dumbbells in view in the cropped tile */
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item.is-missing {
  cursor: default;
}

/* Lightbox: the native <dialog> element draws itself above the page */
.lightbox {
  max-width: min(94vw, 1200px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--color-text); /* White text for the Close button */
  overflow: visible;
}

.lightbox::backdrop {
  background-color: var(--color-backdrop); /* Dark screen behind the enlarged photo */
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(94vh - 4rem);
  margin-inline: auto;
  border-radius: var(--radius);
}

.lightbox-close {
  display: block;
  margin: 0 0 0.75rem auto;
  padding: 0.5rem 1rem;
  background-color: var(--color-text);   /* White Close button */
  color: var(--color-bg);                /* Dark text on the white button */
  border: 0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-close:hover {
  background-color: var(--color-accent); /* Orange Close button on hover */
}

/* Stops the page scrolling behind the open lightbox (class is added by script.js) */
body.no-scroll {
  overflow: hidden;
}

/* Gallery on tablets (up to 900px wide): two columns.
   "dense" lets the small tiles fill gaps so the grid has no empty spaces */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
  }

  .gallery-item--tall {
    grid-row: span 1; /* Tall photo becomes a normal tile, side by side with the small photo */
  }
}

/* Gallery on phones (up to 600px wide): one column, the tall photo keeps extra height */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 14rem;
  }

  .gallery-item--feature,
  .gallery-item--wide {
    grid-column: span 1;
  }

  .gallery-item--feature {
    grid-row: span 1;
  }

  .gallery-item--tall {
    grid-row: span 2;
  }
}


/* =====================================================================
   12. TESTIMONIALS SECTION
   ===================================================================== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review {
  margin: 0;
  padding: 1.75rem 0 0;
  border-top: 3px solid var(--color-accent); /* Orange line above each review */
}

.review blockquote {
  margin: 0;
}

.review blockquote p {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.review figcaption {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
}

.review-name {
  font-weight: 700;
}

.review-source {
  font-size: 0.9375rem;
  color: var(--color-text-muted); /* Muted "Google review" label */
}


/* =====================================================================
   13. CONTACT SECTION
   ===================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-list {
  margin-top: 2rem;
  border-top: 1px solid var(--color-border); /* Line above the first contact row */
}

.contact-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--color-border); /* Line between contact rows */
}

.contact-row dt {
  font-weight: 700;
  color: var(--color-text-muted); /* Muted row label */
}

.contact-row a,
.contact-row .link-button {
  color: var(--color-accent); /* Orange phone and Instagram links */
  font-weight: 700;
  text-underline-offset: 4px;
}

.contact-row a:hover,
.contact-row .link-button:hover {
  color: var(--color-accent-hover); /* Lighter orange on hover */
}

.contact-actions {
  padding: clamp(1.5rem, 3vw, 2rem);
  background-color: var(--color-card);       /* Action panel background */
  border: 1px solid var(--color-border);     /* Action panel outline */
  border-radius: var(--radius);
}

.contact-actions h3 {
  font-size: 1.5rem;
}

.contact-actions p {
  margin-block: 0.75rem 1.5rem;
  color: var(--color-text-muted); /* Muted panel text */
}


/* =====================================================================
   14. FOOTER
   ===================================================================== */
.site-footer {
  padding-top: clamp(3rem, 7vw, 4.5rem);
  background-color: var(--color-bg);             /* Footer background */
  border-top: 1px solid var(--color-border);     /* Line above the footer */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 2.5rem;
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted footer description */
}

.footer-title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.footer-list li {
  padding-block: 0.25rem;
  color: var(--color-text-muted); /* Muted footer text */
}

.footer-list a,
.footer-bottom a {
  text-decoration: none;
}

.footer-list a:hover,
.footer-list .link-button:hover,
.footer-bottom a:hover {
  color: var(--color-accent); /* Orange footer links on hover */
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--color-border); /* Line above the copyright row */
  font-size: 0.9375rem;
  color: var(--color-text-muted);            /* Muted copyright text */
}


/* =====================================================================
   15. PRIVACY POLICY PAGE
   ===================================================================== */
.legal-inner {
  max-width: 46rem; /* Narrow column keeps long text easy to read */
}

.legal h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-transform: uppercase;
}

.legal-updated {
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted); /* Muted "last updated" date */
}

.legal h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  line-height: 1.25;
}

.legal p,
.legal li {
  color: var(--color-text-muted); /* Muted policy body text */
}

.legal ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li {
  padding-block: 0.25rem;
}

.legal a {
  color: var(--color-accent); /* Orange links inside the policy */
  text-underline-offset: 4px;
}


/* =====================================================================
   18. DEMO ADDITIONS (added for the demonstration version)
   - Notification shown by the enquiry and location buttons
   - "Website Demo" label in the footer
   ===================================================================== */

/* Keeps the underline that the old links had */
.text-link.link-button,
.contact-row .link-button {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The notification: fixed to the bottom of the screen, hidden until script.js adds "is-visible" */
.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 300; /* Above the sticky menu */
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: min(34rem, calc(100% - 2.5rem));
  padding: 1rem 1.25rem;
  background-color: var(--color-card);            /* Notification background */
  border: 1px solid var(--color-border);          /* Notification outline */
  border-left: 4px solid var(--color-accent);     /* Orange bar on the left edge */
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);     /* Soft dark shadow lifting it off the page */
  color: var(--color-text);                       /* White notification text */
  opacity: 0;
  visibility: hidden;                             /* Hidden and not focusable until shown */
  transform: translate(-50%, 16px);
  /* Slides up and fades in. This only happens after a click, and is switched off for reduced motion (section 17) */
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.demo-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.demo-toast-text {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Short second line explaining what is not connected in this demo */
.demo-toast-detail {
  display: block;
  margin-top: 0.35rem;
  color: var(--color-text-muted); /* Muted detail text */
}

.demo-toast-close {
  flex-shrink: 0;
  padding: 0.25rem 0;
  background-color: transparent;
  border: 0;
  color: var(--color-text-muted); /* Muted Dismiss text */
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.demo-toast-close:hover {
  color: var(--color-text); /* White on hover */
}

/* Small outlined tag in the footer: "Website Demo" */
.demo-label {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--color-border); /* Thin outline around the label */
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--color-text-muted);        /* Muted label text */
}


/* =====================================================================
   16. RESPONSIVE RULES
   Rules below only apply when the screen is narrower than the stated width.
   ===================================================================== */

/* ---- Tablet and smaller (up to 900px wide) ---- */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr; /* Stack text and image/panel */
  }

  .about-grid .media {
    max-width: 30rem; /* Keeps the portrait photo a sensible size when stacked under the text */
  }

  .plan-grid,
  .review-grid {
    grid-template-columns: 1fr; /* One card per row */
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* Mobile navigation: show the hamburger, turn the links into a dropdown panel */
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none; /* Hidden until the hamburger is pressed */
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
    background-color: var(--color-bg);             /* Dropdown panel background */
    border-bottom: 1px solid var(--color-border);  /* Line under the dropdown panel */
  }

  .site-nav.is-open {
    display: block; /* script.js adds "is-open" when the hamburger is pressed */
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li a:not(.btn) {
    display: block;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--color-border); /* Line between menu items */
  }

  .nav-cta {
    margin-top: 1rem;
  }

  .nav-cta .btn {
    width: 100%; /* Join Now button spans the full width of the mobile menu */
  }
}

/* ---- Mobile (up to 600px wide) ---- */
@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .facility-grid {
    grid-template-columns: 1fr; /* One facility per row */
  }

  .hero {
    min-height: calc(100svh - var(--header-height) - 2rem); /* Slightly shorter hero so the next section peeks in */
  }

  .btn-row:not(.btn-row--stack) .btn {
    width: 100%; /* Full-width buttons are easier to tap */
  }

  .contact-row {
    grid-template-columns: 1fr; /* Label above value */
    gap: 0.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   17. REDUCED MOTION
   Anyone who has asked their device to reduce motion gets no animation.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
