/* =========================================================
   GLOBAL VARIABLES & BASE STYLES
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f4f7;
  --color-text: #111111;
  --color-accent: #004b8d;
  --color-accent-dark: #003463;
  --color-focus: #ffbf47;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
}

p {
   margin: 0;
}

/* =========================================================
   SKIP LINK
   ========================================================= */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* =========================================================
   LAYOUT CONTAINERS
   ========================================================= */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header layout: left group + right logo */
.header-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-logo {
  flex-shrink: 1;
  min-width: 0;
}

.logo-image {
  height: auto;
  max-width: 100%;
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */

.site-header {
  background-color: var(--color-accent);
  color: #ffffff;
}

.site-title {
  margin: 0;
  font-size: 1.8rem;
}

.site-tagline {
  margin: 0.25rem 0 1rem;
  font-size: 1rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus {
  text-decoration: underline;
}

/* =========================================================
   THEME TOGGLE BUTTON
   ========================================================= */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.site-header .theme-toggle {
  color: #ffffff;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background-color: rgba(255, 255, 255, 0.15);
}

.theme-toggle .theme-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* =========================================================
   SECTIONS & CONTENT
   ========================================================= */

.section {
  padding: 1rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section h2 {
  font-size: 1.6rem;
  margin-top: 0;
}

.service-block {
  margin-bottom: 0.5rem;
}

.service-block h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

/* =========================================================
   CONTACT FORM
   ========================================================= */

form {
  max-width: 600px;
  margin-top: 1.6rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem;
  border: 2px solid black;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--color-accent);
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.button-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.button-primary:hover,
.button-primary:focus-visible {
  background-color: var(--color-accent-dark);
}

/* =========================================================
   OWNER PHOTO
   ========================================================= */

.owner-photo {
  max-width: 340px;
  margin: 0 auto 2rem;
  text-align: center;
}

.responsive-photo {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 3px solid var(--color-accent);
}

.owner-photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #444;
}

/* =========================================================
   LOGO DIVIDER
   ========================================================= */

.logo-divider {
  height: 40px;
  margin: 0;
  background-image: url("images/John330LogoWhiteBackground.png");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 40px 20px;
}

/* =========================================================
   LOGO BOX
   ========================================================= */

.border-box {
  padding: 1.5rem;
  border: 2px solid black;
  border-radius: 6px;   /* optional */
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background-color: #222222;
  color: #ffffff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* =========================================================
   LINKS & FOCUS STYLES
   ========================================================= */

a {
  color: var(--color-accent-dark);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

a:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */

@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   SERVICE RATES PAGE
   ========================================================= */

.services-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  line-height: 1.6;
}

.services-page h1,
.services-page h2,
.services-page h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.intro {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.service-block,
.policy-block {
  border: 1px solid var(--border-color, #ccc);
  padding: 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  background-color: var(--surface-color, #fff);
}

.service-block h3,
.policy-block h3 {
  margin-top: 0;
}

.rate {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

ul {
  padding-left: 1.25rem;
}

ul li {
  margin-bottom: 0.5rem;
}

/* =========================================================
   DARK MODE OVERRIDES
   ========================================================= */

html.dark-mode {
  --color-bg: #1a1a1a;
  --color-bg-alt: #2a2a2a;
  --color-text: #f2f2f2;
  --color-accent: #66aaff;
  --color-accent-dark: #3388dd;
  --color-focus: #ffbf47;
}

html.dark-mode .site-header {
  color: #000000;
}

html.dark-mode .site-nav a {
  color: #000000;
}

html.dark-mode .owner-photo figcaption {
  color: #ffffff !important;
}

html.dark-mode .theme-toggle {
  color: #000000;
  border-color: #000000;
}

html.dark-mode .theme-toggle:hover,
html.dark-mode .theme-toggle:focus-visible {
  background-color: rgba(0, 0, 0, 0.15);
}

html.dark-mode .logo-divider {
  background-image: url("images/John330LogoNoBackground.png");
}

html.dark-mode .border-box {
   border: 2px solid white;
}

html.dark-mode .service-block,
html.dark-mode .policy-block {
  background-color: var(--surface-dark, #1e1e1e);
  border-color: var(--border-dark, #444);
}

html.dark-mode .services-page {
  color: var(--text-dark, #f2f2f2);
}
