/* === THEME VARIABLES (adjust to client's taste) === */
:root{
  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-accent: 'Merriweather', Georgia, serif;

  /* Colours */
  --color-primary: #14667B;   /* teal (provided) */
  --color-secondary: #AAEAEE; /* light aqua (provided) */
  --color-neutral-700: #707070; /* grey (provided) */
  --color-neutral-200: #E0E0E0; /* light grey (provided) */
  --color-accent: #0B2242;    /* deep navy (chosen) */

  /* Base */
  --bg: #ffffff;
  --text: #1a1a1a;
  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0,0,0,.08);
  --gap: 1rem;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font-sans);color:var(--text);background:var(--bg);line-height:1.6}

/* Utility */
.container{max-width:var(--maxw);margin-inline:auto;padding:0 1rem}
.section{padding:3rem 0}
h1,h2,h3{
    font-family:var(--font-accent);
    line-height:1.25;
    color:var(--color-accent);
}
h1{font-size:clamp(1.8rem,3vw,2.6rem);margin:0 0 1rem}
h2{font-size:clamp(1.4rem,2.5vw,2rem);margin:0 0 1rem}
h3{font-size:clamp(1.1rem,2vw,1.3rem);margin:.5rem 0}

p{
    margin:.6rem 0;
    color:var(--color-accent);
}

a{color:var(--color-primary);text-decoration:none}
a:hover{text-decoration:underline}
.text-link{font-weight:600}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;background:#fff;padding:.5rem;border:2px solid var(--color-primary)}

/* Nav */
.site-nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border-bottom:1px solid var(--color-neutral-200);position:sticky;top:0;background:#fff;z-index:10}
.site-nav .brand{font-family:var(--font-accent);font-weight:700;font-size:1.25rem;color:var(--color-accent)}
.site-nav .nav-toggle{display:none;border:1px solid var(--color-neutral-200);background:#fff;border-radius:10px;padding:.5rem .75rem}
.site-nav ul{display:flex;gap:1rem;list-style:none;margin:0;padding:0}
.site-nav a{padding:.4rem .6rem;border-radius:6px}
.site-nav a[aria-current="page"]{border-bottom:3px solid var(--color-primary);font-weight:700}
.site-nav a:hover{background:rgba(0,0,0,0.03)}

@media (max-width: 1200px){
/*@media (max-width: 1320px){*/
  .site-nav .nav-toggle{display:inline-block}
  .site-nav ul{display:none;flex-direction:column;gap:.5rem;position:absolute;top:60px;right:1rem;background:#fff;border:1px solid var(--color-neutral-200);border-radius:12px;box-shadow:var(--shadow);padding:.75rem}
  .site-nav ul.open{display:flex}
}

/* Hero */
.hero{
    display:grid;
    grid-template-columns:1.5fr 1.2fr;
    gap:2rem;
    align-items:center;
    padding:2rem 0
}


.hero-content{
    /*color:#fff;
    text-shadow:0 2px 6px rgba(0,0,0,.3)*/
    /*background-color: #fff;*/
    background-color: rgba(255, 255, 255, 0.8);
    border:1px solid var(--color-neutral-200);
    border-radius:var(--radius);
    padding:1rem;
    box-shadow:var(--shadow);
   /* background:#fff;*/
    display:flex;
    flex-direction:column;
}

.hero-media img{width:100%;height:auto;border-radius:var(--radius);box-shadow:var(--shadow)}
.hero-actions{display:flex;gap:.75rem;margin-top:1rem}
.button{display:inline-block;background:var(--color-primary);color:#fff;padding:.7rem 1rem;border-radius:12px;border:0;font-weight:600}
.button:hover{opacity:.95;text-decoration:none}
.button-secondary{background:var(--color-accent)}

@media (max-width: 900px){
  .hero{grid-template-columns:1fr}
}

/* Features */
.feature-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.feature-card{border:1px solid var(--color-neutral-200);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow);background:#fff;display:flex;flex-direction:column}
.feature-card .feature-thumb{width:100%;height:auto;border-radius:10px;margin-bottom:.6rem}
@media (max-width: 900px){
  .feature-cards{grid-template-columns:1fr}
}

/* Media */
.media{margin:1rem 0}
.media img{width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow)}
.media figcaption{font-size:.9rem;color:#555}

/* Inline gallery */
.inline-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin:1rem 0}
.inline-gallery .gallery-img{width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow)}
@media (max-width: 900px){
  .inline-gallery{grid-template-columns:1fr 1fr}
}

/* Content */
.content{padding:2rem 0}
/*.content p{max-width:75ch}*/

/* Inline images */
.inline-img{max-width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow)}
.logo-img{
    max-height:100px;
    width:auto;
    margin-right:.75rem
}

/* Logo strip */
.logo-strip{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:1rem 0}

/* Forms */
.form{margin-top:1rem;border:1px solid var(--color-neutral-200);border-radius:var(--radius);padding:1rem;background:#fff;box-shadow:var(--shadow)}
.form-row{display:flex;flex-direction:column;margin:.5rem 0}
label{font-weight:600}
input,textarea{padding:.6rem;border:1px solid var(--color-neutral-200);border-radius:10px;font:inherit}
.form-hint{font-size:.9rem;color:var(--color-neutral-700)}

/* Testimonials */
.testimonials-grid{display:grid;gap:1rem}
.testimonials-vertical{grid-template-columns:1fr}
.testimonial-card{display:grid;grid-template-columns:80px 1fr;gap:1rem;border:1px solid var(--color-neutral-200);border-radius:var(--radius);padding:1rem;background:#fff;box-shadow:var(--shadow);align-items:center}
.testimonial-card .avatar{border-radius:50%;display:block}
.testimonial-card blockquote{margin:0}
.testimonial-card footer{color:#555;margin-top:.25rem}

/* Read more toggle */
.rm-toggle{background:none;border:0;padding:0;margin-left:.25rem;cursor:pointer;color:var(--color-primary);font:inherit;font-weight:600}
.rm-toggle:hover{text-decoration:underline}
.rm-rest[hidden]{display:none}

/* Carousel */
.testimonials-carousel{position:relative;border:1px solid var(--color-neutral-200);border-radius:var(--radius);padding:1.25rem;box-shadow:var(--shadow);background:#fff}
.carousel-viewport{position:relative;min-height:180px;display:flex;align-items:center}
.carousel-slide{display:grid;grid-template-columns:80px 1fr;gap:1rem;opacity:0;transition:opacity .4s;align-items:center}
.carousel-slide.is-active{opacity:1}
.carousel-controls{position:absolute;inset-block:0;inset-inline:0;pointer-events:none}
.carousel-prev,.carousel-next{position:absolute;top:50%;transform:translateY(-50%);pointer-events:auto;border:1px solid var(--color-neutral-200);background:#fff;border-radius:999px;padding:.3rem .7rem}
.carousel-prev{left:.5rem}
.carousel-next{right:.5rem}

/* Posts grid */
.posts-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;padding:2rem 0}
.post-card{display:grid;grid-template-columns:160px 1fr;gap:1rem;border:1px solid var(--color-neutral-200);border-radius:var(--radius);padding:1rem;background:#fff;box-shadow:var(--shadow)}
.post-thumb img{width:100%;height:auto;border-radius:12px}
@media (max-width: 900px){
  .posts-grid{grid-template-columns:1fr}
  .post-card{grid-template-columns:1fr}
}

/* Footer */
.site-footer{
    margin-top:2rem;
    border-top:1px solid var(--color-neutral-200);
    background:#fff;
}


.footer-bar{display:flex;gap:1rem;align-items:center;justify-content:space-between;padding:1rem 0;flex-wrap:wrap}
.footer-middle a{color:#333}
.footer-middle .sep{margin:0 .5rem;color:#999}
.social a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--color-neutral-200);border-radius:999px;margin-left:.25rem}
.social a:hover{background:var(--color-secondary)}

/* Fractional two-abreast */
.fractional-sections{display:grid;gap:1rem}
@media (min-width: 1100px){
  .fractional-sections{grid-template-columns:1fr 1fr}
  .fractional-sections .section{break-inside:avoid}
}

/* Consistent, cropped feature images */
.feature-card .feature-thumb{
    display:block;
    width:100%;
    height:180px;          /* adjust to taste */
    object-fit:cover;      /* crop rather than distort */
    object-position:center;/* default focal point */
  }
  
  @media (max-width: 900px){
    .feature-card .feature-thumb{ height:160px; }
  }
  
  /* Optional focal helpers (CSS-only) */
  .feature-thumb.crop-top{ object-position:center top; }
  .feature-thumb.crop-bottom{ object-position:center bottom; }
  .feature-thumb.crop-left{ object-position:left center; }
  .feature-thumb.crop-right{ object-position:right center; }

  /* Iconify icons inherit link colour and align nicely */
.social a iconify-icon{ display:block; color: currentColor; }

/* 1) Keep menu items on a single line (no wrapping) */
.site-nav{ flex-wrap: nowrap; }
.site-nav ul{ flex-wrap: nowrap; white-space: nowrap; }
.site-nav a{ white-space: nowrap; }

/* 2) Keep the footer permanently visible at the bottom */
:root{ --footer-height: 72px; } /* adjust if your footer is taller/shorter */
.site-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin-top: 0;              /* override any top margin so it sits flush */
  z-index: 40;                /* above content */
}
.site-footer .footer-bar{ min-height: var(--footer-height); }

/* Prevent content being hidden behind the fixed footer */
body{ padding-bottom: calc(var(--footer-height) + 12px); }

.bold_colour {
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* in your core.css */

/* Make sizing predictable */
*, *::before, *::after { box-sizing: border-box; }

/* Media should never overflow */
img, video, svg { max-width: 100%; height: auto; display: block; }

/* Grids and flex should shrink long content instead of pushing wider than the viewport */
.grid, [class*="grid"] { min-width: 0; }
.flex, [class*="flex"] { min-width: 0; }

/* Break very long words/URLs */
body { overflow-wrap: anywhere; word-break: break-word; }
pre, code { white-space: pre-wrap; }

/* Avoid 100vw for full-width sections – use 100% */
.full-width { width: 100%; /* not 100vw */ }

/* Last resort to squash any stray overflow (use sparingly) */
html, body { overflow-x: hidden; }

/* Responsive edge padding for the fixed footer */
.site-footer .container{
    /* Increase padding as screens get smaller, but cap it on large screens.
       Also respect device safe areas (e.g. iPhone notch/home bar). */
    padding-left:  max(clamp(16px, 5vw, 32px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 5vw, 32px), env(safe-area-inset-right));
  }
  
  /* Optional: tiny breathing room for the icon group if needed */
  .site-footer .social{ gap: .5rem; }
  
  /* Stack testimonial avatar above text on narrow screens */
@media (max-width: 640px){
    /* Cards */
    .testimonial-card{
      grid-template-columns: 1fr;          /* was 80px 1fr */
      grid-template-rows: auto auto;
      align-items: start;
    }
    .testimonial-card .avatar{
      justify-self: center;
      margin: 0 0 .6rem 0;
      width: clamp(72px, 24vw, 96px);
      height: clamp(72px, 24vw, 96px);
    }
    .testimonial-card blockquote{ text-align: left; }
  
    /* Carousel slide */
    .carousel-slide{
      grid-template-columns: 1fr;          /* was 80px 1fr */
      grid-template-rows: auto auto;
      align-items: start;
    }
    .carousel-slide .avatar{
      justify-self: center;
      margin: 0 0 .6rem 0;
      width: clamp(72px, 24vw, 96px);
      height: clamp(72px, 24vw, 96px);
    }
    .carousel-slide blockquote{ text-align: left; }
  }

:root{ --footer-height: 80px; } /* safe default */
body{
  /* ensure content is never hidden behind the fixed footer */
  padding-bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px));
}

/* (optional) if your main container needs the space instead of body: */
main.container{ padding-bottom: calc(var(--footer-height) + 12px); }
/* Stop any footer-size feedback loops */
.site-footer .footer-bar{ min-height: auto !important; }

/* If you previously added body padding via --footer-height, neutralise it */
body{ padding-bottom: 0 !important; }

/* Create scroll space equal to the footer's real height */
main.container::after{
  content: "";
  display: block;
  height: calc(var(--footer-spacer, 0px) + env(safe-area-inset-bottom, 0px));
}

/* Full-bleed background for hero without pushing content */
.hero.has-bleed-bg{
    position: relative;
    isolation: isolate;           /* keeps the pseudo-element under the content */
  }
  
  /* Full-width background that extends to the viewport edges */
  .hero.has-bleed-bg::before{
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
  
    /* Make the background extend beyond the centred container to the browser edges */
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
  
    /* Image + sizing */
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
  }
  
  /* Optional: a subtle overlay to keep text readable */
  /*.hero.has-bleed-bg::after{
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background: linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.15));
  }*/
  
  /* Safety: avoid any horizontal push on narrow devices */
  .hero, .hero * { min-width: 0; }
  /* Centre the About picture on tablets/phones */
@media (max-width: 768px){
    /* Works whether .about_picture is the <img> or a wrapper */
    .about_picture,
    .about-picture{
      float: none !important;               /* kill any float from larger breakpoints */
      position: static !important;          /* avoid offset positioning */
      display: block;
      max-width: min(100%, 420px);          /* optional: tame oversize images */
      margin-left: auto !important;         /* centre in normal flow */
      margin-right: auto !important;
      align-self: center !important;        /* if parent is flex */
      justify-self: center !important;      /* if parent is grid */
      text-align: center;                   /* if it wraps an inline image */
    }
  
    /* If .about_picture is a wrapper around an <img> */
    .about_picture img,
    .about-picture img{
      display: block;
      max-width: 100%;
      height: auto;
      margin-inline: auto;
    }
  }
  
  .about_section {
    display: flex;
    align-items: flex-start;
    gap: 2rem;             
  }


  @media (min-width: 769px) {
      .about_text {
          flex: 2 1 0;           
          max-width: 66.666%;
      }

      .about_picture {
          flex: 1 1 0;          
          max-width: 33.333%;
      }
  }

  @media (max-width: 768px) {
      .about_section {
          flex-direction: column;
      }

      .about_picture img {
          display: block;
          margin-left: auto;
          margin-right: auto;  
          max-width: 100%;
          height: auto;
          justify-content: center;
      }
  }

@media (min-width: 1425px) {
    #full_link {
        display: inline;
    }
    #abbreviated_link {
        display: none;
    }
}

@media (max-width: 1425px) {
    #full_link {
        display: none;
    }
    #abbreviated_link {
        /*display: block;
        text-align: right;*/
        display: inline;
    }
}