/* Styling for every page */
:root {
  --font-body: 'Atkinson Hyperlegible', 'Inter', Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', Arial, sans-serif;

  --color-text: #111;              /* high contrast */
  --color-background: #e0e0e0fa;        /* clean white background */
  --color-accent: #005FCC;         /* brand accent (adjust as needed) */

  --font-size-base: 16px;
  --line-height-base: 1.6;
  --max-line-length: 75ch;         /* line length control for readability */
}

*:focus {
  outline: 2px solid #005fcc;
  outline-offset: 3px;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  /* max-width: var(--max-line-length); */
  /* margin-inline: auto; */
  /* padding: 2rem; */
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* Buttons */
button, .button {
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

button:hover, .button:hover {
  background-color: #0048a3;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: underline;
}
a:hover {
  text-decoration: none;
}

/* Accessibility extras */
:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
}

.center {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: center;
}
.menu {
	width: 100%;
	height: fit-content;
	box-sizing: border-box;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
}
.nav-home {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding-left: 1rem;
  padding-right: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: 0.3s;
}
.nav-toggle,
.nav-toggle-label {
  display: none;
}
.logo {
	width: fit-content;
	font-family: poppins;
	font-size: 32px;
	color: white;
	font-weight: 600;
	padding: 15px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo label {
	display: none;
}

.item {
	width: 120px;
	padding: 10px 18px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 5mm;
	font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
	color: black;
	text-decoration: none;
	transition: transform 0.1s ease, box-shadow 0.1s ease;

}
.item:active{
	box-shadow: 0 0 20px rgba(255, 87, 34, 0.6);
}
.item:hover {
	transform: scale(1.1);
	background: #34baf9f9;
}

.paks-logo{
  max-height: 70px;
}
.footer {
	  background-color: rgb(226, 59, 59);
	  color: white;
	  text-align: center;
	  border-top: 1px solid #ddd;
	padding: 5px;
	margin-top: 2rem;
	box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
	border-radius: 12px 12px 0 0;
}

.CQC-container{
	display: flex;
	justify-content: center;
	margin-left: auto;
	margin-right: auto;
}
.CQC{
	max-width: 50%;
}

.home-content-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1550px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #e0e0e0fa;
}
.home-content{
  display: flex;
  gap: 2rem;
  align-items: stretch;      
  background: #fff;
  border-radius: 12px;
  overflow: hidden;          /* ensure images respect border radius */
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-content p{
	padding: 5px;
}

.home-content h1{
	padding: 5px;
}

.home-content:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.home-content.reverse {
  flex-direction: row-reverse;
}

.home-content img {
  flex: 1 1 auto;          /* fill available flex space */
  width: 100%;
  height: 100%;
  object-fit: cover;       /* crops if needed */
  border-radius: inherit;  /* match container curves */
  display: block;
}

.home-content img.portrait {
	object-fit: contain;
}

.contact-button{
	background-color: rgb(226, 59, 59);
	margin-left: auto;
	margin-right: auto;
	width: fit-content;
	padding: 10px ;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 5mm;
	font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
	color: white;
	text-decoration: none;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.contact-button:hover{
	transform: scale(1.1);
}

/* Styling for Contact Us */

.page-content{
	text-align: center;
}

.contact-icon{
  display: flex;
	align-self: center;
	background-color: #dc4351;
	max-width: 48px;
	border-radius: 64px;
	padding: 8px;
}
.contact-content-container{
	text-align: center;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.org-chart {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  overflow-x: auto;
}

/* Root UL */
.org-chart > ul {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
}

.org-chart ul ul.children {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 60px;
}

/* Vertical line from parent to horizontal line */
.org-chart ul ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 60px;  /* matches padding-top */
  background: #555;
  z-index: 0;
}

/* Horizontal line connecting children */
/* Horizontal line spans only children container */
.org-chart ul ul.children::after {
  content: "";
  position: absolute;
  top: 60px;        /* vertical offset from parent card */
  left: 0;
  right: 0;         /* span full width of children */
  height: 2px;
  background: #555;
  z-index: 0;
}

.org-chart ul ul > li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px; /* gap between horizontal line and top of card */
}

/* Vertical line from horizontal line to each child */
.org-chart ul ul.children > li::before {
  content: "";
  position: absolute;
  top: 0;            /* starts at top of LI (after padding-top) */
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;      /* gap from horizontal line to card top */
  background: #555;
  z-index: 0;
}

/* LI layout */
.org-chart li {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Person card */
.person {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  max-width: 200px;
  z-index: 1;
  transition: transform .18s ease, box-shadow .18s ease;
}

/* Headshot images */
.person img {
  width: 300px;          /* normal headshot size */
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Name label */
.person span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Hover effect */
.person:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border-color: #666;
}

.contact-page {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
  text-align: center;
}

.contact-page h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.contact-page::before {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: rgb(226, 59, 59);
  margin: 0 auto 1.5rem;
  border-radius: 4px;
}


.contact-info-card,
.contact-extra,
.visit-box {
  margin-bottom: 3.5rem;
}

.contact-subtext {
  color: #555;
  margin-bottom: 3rem;
}

/* Main Contact Card */
.contact-info-card {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-bottom: 3rem;
}

/* Google Map */
.contact-map iframe {
  width: 500px;
  height: 300px;
  border: 0;
  border-radius: 12px;
}

.contact-details {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Extra info box */
.contact-extra {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: left;
  line-height: 1.7;
}

.contact-extra h2 {
  margin-bottom: 1rem;
}

.visit-box {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
}

.skip-to-content {
  position: fixed;
  left: 20px;
  bottom: 100px;
  background: #00853e;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  z-index: 9999;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.skip-to-content:hover,
.skip-to-content:focus {
  opacity: 1;
  transform: scale(1.05);
  outline: 3px solid #ffea00; /* visible keyboard outline */
}

body.accessibility-mode {
  background: #ffffff !important;
  color: #000000 !important;
  font-family: Arial, sans-serif !important;
  line-height: 1.6 !important;
  letter-spacing: 0.5px !important;
}

/* Ensure headings are readable */
body.accessibility-mode h1,
body.accessibility-mode h2,
body.accessibility-mode h3,
body.accessibility-mode h4 {
  color: #000 !important;
}

/* Ensure links are always visible and obvious */
body.accessibility-mode a {
  color: #005fcc !important;
  text-decoration: underline !important;
}

/* Fix images in accessibility mode (remove filters) */
body.accessibility-mode img {
  filter: none !important;
}

body.accessibility-mode .skip-to-content {
  color: white !important;
}

body.accessibility-mode .home-content-section {
  background-color: white;
}

body.high-contrast {
  background: #000 !important;
  color: #ff0 !important;
}

body.high-contrast *,
body.high-contrast p,
body.high-contrast span,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast li {
  color: #ff0 !important;
  opacity: 1 !important;
}

body.high-contrast .cqc-widget,
body.high-contrast .cqc-widget * {
  background-color: #000 !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
  fill: #ff0 !important;
  stroke: #ff0 !important;
}

body.high-contrast [class*="requires"],
body.high-contrast [class*="requires"] * {
  background-color: #000 !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
}

body.high-contrast a {
  color: #ff0 !important;  /* yellow for visibility */
  text-decoration: underline !important;
}

body.high-contrast nav * {
  color: #ff0 !important;
}

/* Buttons in high contrast */
body.high-contrast button,
body.high-contrast .access-btn,
body.high-contrast .contrast-btn,
body.high-contrast .skip-to-content,
body.high-contrast .skip-btn {
  background: #222 !important;
  color: #ff0 !important;
  border: 2px solid #ff0 !important;
}

body.high-contrast img {
  filter: grayscale(100%) contrast(150%) !important;
}

body.high-contrast .home-content-section {
  background: #000 !important;
}

body.high-contrast .home-content {
  background: #000 !important;
  border: 2px solid #ff0 !important;
  box-shadow: none !important;
}

body.high-contrast .person {
  background: #000 !important;
  border: 2px solid #ff0 !important;
  box-shadow: none !important;
}

/* Force all text inside the cards to remain visible */
body.high-contrast .home-content *,
body.high-contrast .home-content-section * {
  color: #ff0 !important;
}

/* Fix headings inside sections so they stay visible */
body.high-contrast .home-content h2,
body.high-contrast .home-content h3,
body.high-contrast .home-content h4 {
  color: #ff0 !important;
}

/* Optional: make images grayscale for clarity */
body.high-contrast .home-content img {
  filter: grayscale(100%) contrast(140%) !important;
}

body.high-contrast .nav-home {
  background: #000 !important;
}

body.high-contrast .nav {
  background: #000 !important;
}

body.high-contrast .contact-info-card,
body.high-contrast .contact-extra,
body.high-contrast .visit-box {
  background: #000 !important;
  border: 2px solid #ff0 !important;
  color: #ff0 !important;
  box-shadow: none !important;
}

#cqc-widget-accessible { display: none; }

body.high-contrast .cqc-widget,
body.high-contrast .CQC { display: none !important; }

body.high-contrast #cqc-widget-accessible {
	display: block;
	background: #000;
	border: 3px solid #ff0;
	color: #ff0;
	padding: 20px;
	margin-top: 30px;
	font-family: Arial, sans-serif;
	border-radius: 12px;
}

body.high-contrast .nav-menu {
  background-color: #000;
}

body.high-contrast .contact-info-card,
body.high-contrast .contact-extra,
body.high-contrast .visit-box {
  border: 2px solid #ff0 !important;
  margin-bottom: 3.5rem;
}

body.high-contrast .contact-details {
  border-color: #ff0;
}

.cqc-access-item {
	padding: 14px 0;
	border-bottom: 2px solid #ff0;
  justify-content: left;
}
.cqc-access-item:last-child {
	border-bottom: none;
}

.cqc-access-item .rating-badge {
	display: inline-block;
	padding: 6px 14px;
	border: 2px solid #ff0;
	border-radius: 6px;
	font-weight: bold;
	margin-bottom: 8px;
}

#cqc-widget-accessible a {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 14px;
	background: #ff0 !important;
	color: #000 !important;
	border-radius: 4px;
	text-decoration: none;
	font-weight: bold;
}

.access-btn,
.contrast-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  background: #005fcc;
  color: white;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 9999;
  font-size: 14px;
  opacity: 0.9;
  transition: transform 0.2s, opacity 0.2s;
}

/* Space the second button above the first */
.contrast-btn {
  bottom: 60px;
}

.access-btn:hover,
.contrast-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.skip-btn {
  order: -1;
}

.footer a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

@media (max-width: 768px) {
  .home-content {
    flex-direction: column;
  }
  .home-content img {
    width: 100%;
  }
  img.house-photo {
	  width: 100%;
	  height: auto;
	  display: block;
  }
  
  .home-content.reverse {
	  flex-direction: column;
  }

  .CQC-container{
	flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem; 
  }

  .CQC {
    max-width: 90%;
    width: 100%;
    margin: 0 auto;
    display: block;
  }

  .footer {
	flex-direction: column;
    text-align: center;
  }

  .nav-toggle-label {
    display: block;
    font-size: 2rem;
    cursor: pointer;
  }

  .nav-menu {
    position: absolute;
    top: 70%;
    left: 0;
    background: #fff;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    display: none;
  }

  .nav-menu li {
    text-align: left;
    padding: 0.8rem 0;
  }

  .nav-menu li a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.8rem 1.5rem
  }

  .nav-toggle:checked + .nav-toggle-label + .nav-menu {
    display: flex;
  }

  .nav-toggle-label img {
    height: 35px;
    width: auto;
    object-fit: contain;
  }

 .org-chart,
  .org-chart ul,
  .org-chart ul ul,
  .org-chart ul ul.children {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 20px;
    padding: 0;
  }

  /* Remove all horizontal and vertical lines */
  .org-chart ul ul::before,
  .org-chart ul ul::after,
  .org-chart ul ul > li::before {
    display: none;
  }

  /* Person card adjustments for mobile */
  .person {
    width: 400px;  /* smaller for mobile */
    height: 400px;
    margin: 0;
  }

  .person img {
    width: 300px;
    height: 300px;
  }

  .contact-page {
    text-align: center;
    padding: 2.5rem 1rem;
  }

  .contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;   /* center everything */
    gap: 1.5rem;
    width: 100%;
    padding: 0;
  }

  .contact-map,
  .contact-info {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0;
  }

  /* Map sizing */
  .contact-map iframe,
  .contact-map img {
    width: 100% !important;
    height: 220px;          /* smaller map */
    border-radius: 12px;
    display: block;
  }

  /* Text block reset so it no longer overflows */
  .contact-info {
    text-align: center;
    padding: 0 1rem;        /* spacing so it doesn’t touch edges */
    box-sizing: border-box;
  }

  .contact-info p,
  .contact-info h2,
  .contact-info h3 {
    margin: 0 auto;
    max-width: 400px;      /* ensures clean readable width */
  }

  .contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
  }
}