/* --- Base / reset --- */
* { box-sizing: border-box; }
.site-nav { --bg:#111; --bg-sub:#1b1b1b; --fg:#fff; --fg-dim:#ddd; --accent:#4da3ff; --gap:1rem; }
.site-nav a { color: var(--fg); text-decoration: none; }
.site-nav a:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* --- Container --- */
.site-nav {
  background: var(--bg);
  position: relative;
  z-index: 100;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* --- Mobile toggle (hidden on desktop) --- */
.nav-toggle { display: none; }
.hamburger {
  display: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
}
.hamburger span {
  display: block;
  width: 28px; height: 3px;
  background: var(--fg);
  margin: 6px 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* --- Menu layout (desktop) --- */
.menu {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  margin: 0;
  padding: 0 1rem;
}
.menu > .menu-item > a {
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
  height: 3.25rem;
  line-height: 1;
  color: var(--fg-dim);
}
.menu > .menu-item > a:hover,
.menu > .menu-item > a:focus {
  color: var(--fg);
}

/* --- Submenus --- */
.has-submenu { position: relative; }
.submenu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 240px;
  background: var(--bg-sub);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  display: none;           /* hidden by default */
}
.submenu li a {
  display: block;
  padding: 0.6rem 0.9rem;
  color: var(--fg-dim);
  white-space: nowrap;
}
.submenu li a:hover,
.submenu li a:focus {
  color: var(--fg);
  background: rgba(255,255,255,.06);
}

/* Show submenu on hover and keyboard focus */
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  display: block;
}

/* --- Responsive (mobile / tablet) --- */
@media (max-width: 900px) {
  .hamburger { display: inline-block; }
  .menu {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  /* Toggle the whole menu with the checkbox */
  .nav-toggle:checked ~ .menu { display: flex; }

  /* Make the header row for the hamburger */
  .site-nav { padding: 0; }
  .hamburger {
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: var(--bg);
  }

  .menu > .menu-item > a {
    height: auto;
    padding: 0.9rem 1rem;
    width: 100%;
    color: var(--fg);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  /* Submenus stack and are full-width on mobile */
  .has-submenu { position: static; }
  .submenu {
    position: static;
    border: 0;
    border-radius: 0;
    background: #0f0f0f;
    padding: 0;
    display: none;
  }

  /* Open submenus on focus-within (keyboard) or hover (pointer) */
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: block;
  }

  .submenu li a {
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  /* Animate hamburger into X when open */
  .nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* --- Optional: subtle underline for current page --- */
.menu a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 6px;
}




body {
	font-family : arial, helvetica, sans-serif;
	font-size : 1em;
	line-height : 1.5;
	background-color : #eee;
}
#header {
	background-color : #fff;
	border: 2px solid #a37424;
	padding : 10px;
}

#terries-logo {
	max-width: 100%; 
	height: auto; 
	display: block; 
	margin: 10px auto;
	border:none;
}

#header h2 {
	color : #333;
	font-size : 26px;
	padding : 16px 0;
	border-bottom : 2px solid #a37424;
	text-align : center;
}
#menu {
	text-align:left;
}
#menu a {
	color : #333;
	text-decoration:underline;
	padding : 5px;
}
#menu a:hover {
	text-decoration:none;
}
.main {
	color:black;
	background-color:#ffffcc;
	border: 5px solid #a37424;
	border-radius : 15px;
	line-height:150%;
	padding:20px;
	font-size: 1em;
	max-width : 860px;
	margin : 0 auto;
}
.main a {
	color : #333;
	text-decoration:underline;
}
.main a:hover {
	color : #000;
	text-decoration:none;
}
#footer {
	text-align:center;
	font-size : 10px;
	margin-top : 10px;
	padding : 10px 0;
	border-top : 1px solid #a37424;
}
#footer a {
	color : #333;
	text-decoration:underline;
	font-size : 9px;
}
#footer a:hover {
	text-decoration:none;
}
#footer-menu {
	clear : both;
	text-align:center;
	font-size : 10px;
	margin-top : 10px;
	padding : 10px 0;
	border-top : 1px solid #a37424;
}
#footer-menu a {
	color : #333;
	text-decoration:underline;
	font-size : 9px;
}
#footer-menu a:hover {
	text-decoration:none;
}
p.update {
	text-align:center;
	color : #333;
	font-size : 9px;
}

/* Separate touch control keeps the Essex Businesses link available. */
.submenu-toggle { display: none; }
@media (max-width: 900px) {
  .menu > .has-submenu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
  }
  .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.2);
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: var(--bg-sub);
    color: var(--fg);
    font: 1.5rem/1 Arial, sans-serif;
    cursor: pointer;
  }
  .submenu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
  }
  .submenu-toggle span::before { content: '+'; }
  .submenu-toggle[aria-expanded="true"] span::before { content: '\2212'; }
  .has-submenu > .submenu {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu { display: none; }
  .has-submenu > .submenu-toggle[aria-expanded="true"] + .submenu { display: block; }
  .submenu li a { white-space: normal; }
}
/* Keep images within their content area without distorting them. */
.main img {
  max-width: 100%;
  height: auto;
}
@media (max-width: 900px) {
  .main img {
    /* Override inline spacing and sizing that can overflow narrow screens. */
    max-width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
  }
}