/* ============================================================
   CDHB Careers — Baseline Stylesheet
   cdhbcareers.co.nz
   ============================================================ */

/* ----------------------------------------------------------
   CSS Reset / Base
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #333;
  background: #f0f4f8;
}

body.responsive {
  overflow-x: hidden;
}

/* ----------------------------------------------------------
   Container
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.25;
  color: #005a8e;
  margin-bottom: 0.6em;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
  margin-bottom: 1em;
  color: #444;
}

a {
  color: #005a8e;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #003d66;
  text-decoration: underline;
}

strong, b { font-weight: 700; }
em, i     { font-style: italic; }

ul, ol {
  margin: 0 0 1em 1.5em;
  padding: 0;
}

ul li, ol li {
  margin-bottom: 0.35em;
  color: #444;
}

/* ----------------------------------------------------------
   Images
   ---------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

/* ----------------------------------------------------------
   Tables
   ---------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  background: #fff;
  font-size: 0.95rem;
}

thead {
  background: #005a8e;
  color: #fff;
}

thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #fff;
}

tbody tr {
  border-bottom: 1px solid #dde6ef;
}

tbody tr:nth-child(even) {
  background: #f5f9fc;
}

tbody tr:hover {
  background: #e8f0f8;
}

td {
  padding: 10px 14px;
  color: #444;
  vertical-align: top;
}

/* ----------------------------------------------------------
   Header / Slideshow
   ---------------------------------------------------------- */
#header {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

#slideshow {
  width: 100%;
  overflow: hidden;
  max-height: 320px;
  background: #003d66;
}

#slideshow img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.slider {
  width: 100%;
}

/* Site header / logo bar */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.logo {
  display: inline-block;
  line-height: 1;
}

.logo img.cdhb {
  display: block;
}

/* ----------------------------------------------------------
   Navigation
   ---------------------------------------------------------- */
#nav-wrapper {
  background: #005a8e;
}

#nav-wrapper .container {
  padding: 0 16px;
}

ul#nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

ul#nav > li {
  position: relative;
  margin: 0;
}

ul#nav > li > a {
  display: block;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 18px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
}

ul#nav > li > a:hover,
ul#nav > li.active > a,
ul#nav > li.current > a {
  background: #003d66;
  color: #fff;
  text-decoration: none;
}

/* Dropdown */
ul#nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #004f7c;
  min-width: 200px;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

ul#nav li:hover ul,
ul#nav li:focus-within ul {
  display: block;
}

ul#nav li ul li a {
  display: block;
  color: #d0e9f8;
  padding: 10px 18px;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

ul#nav li ul li a:hover,
ul#nav li ul li.current a {
  background: #003052;
  color: #fff;
}

/* ----------------------------------------------------------
   Breadcrumb
   ---------------------------------------------------------- */
#breadcrumb {
  font-size: 0.82rem;
  color: #777;
  padding: 10px 0 6px;
  margin-bottom: 18px;
}

#breadcrumb a {
  color: #005a8e;
  text-decoration: none;
}

#breadcrumb a:hover {
  text-decoration: underline;
}

#breadcrumb span {
  color: #555;
}

/* ----------------------------------------------------------
   Content Wrapper
   ---------------------------------------------------------- */
#content-wrapper {
  background: #fff;
  padding: 24px 0 40px;
  min-height: 500px;
}

#content {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.content-main {
  flex: 1 1 640px;
  min-width: 0;
}

.content-sidebar {
  flex: 0 0 260px;
  min-width: 0;
}

/* ----------------------------------------------------------
   Sidebar
   ---------------------------------------------------------- */
.content-sidebar .sidebar-box {
  background: #f5f9fc;
  border: 1px solid #d0dde8;
  border-radius: 4px;
  padding: 18px 16px;
  margin-bottom: 20px;
}

.content-sidebar .sidebar-box h3 {
  font-size: 1rem;
  color: #005a8e;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #005a8e;
}

.content-sidebar .sidebar-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-sidebar .sidebar-box ul li {
  border-bottom: 1px solid #dde6ef;
  margin: 0;
}

.content-sidebar .sidebar-box ul li:last-child {
  border-bottom: none;
}

.content-sidebar .sidebar-box ul li a {
  display: block;
  padding: 8px 4px;
  font-size: 0.9rem;
  color: #005a8e;
}

.content-sidebar .sidebar-box ul li a:hover {
  color: #003d66;
  text-decoration: underline;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn,
button,
input[type="submit"],
input[type="button"] {
  display: inline-block;
  background: #005a8e;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.4;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: #003d66;
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: #6c757d;
}

.btn-secondary:hover {
  background: #545b62;
}

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */
form {
  margin-bottom: 1.5em;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #b0c0cc;
  border-radius: 3px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 14px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #005a8e;
  box-shadow: 0 0 0 3px rgba(0,90,142,0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group {
  margin-bottom: 16px;
}

/* ----------------------------------------------------------
   Cards / Feature Boxes
   ---------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid #d8e4ee;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card h3 {
  color: #005a8e;
  margin-bottom: 8px;
}

/* ----------------------------------------------------------
   Highlights / Info Boxes
   ---------------------------------------------------------- */
.info-box {
  background: #e8f4fd;
  border-left: 4px solid #005a8e;
  border-radius: 3px;
  padding: 14px 18px;
  margin-bottom: 1.2em;
}

.info-box p {
  margin: 0;
  color: #003d66;
}

.highlight-box {
  background: #f0faf2;
  border-left: 4px solid #4caf50;
  border-radius: 3px;
  padding: 14px 18px;
  margin-bottom: 1.2em;
}

.highlight-box p {
  margin: 0;
  color: #2d6a35;
}

.warning-box {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  border-radius: 3px;
  padding: 14px 18px;
  margin-bottom: 1.2em;
}

/* ----------------------------------------------------------
   Page-level hero (inline styles from HTML pages)
   ---------------------------------------------------------- */
.edi-hero,
.page-hero {
  background: #005a8e;
  color: #fff;
  padding: 36px 0;
  margin-bottom: 28px;
}

.edi-hero h1,
.page-hero h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 10px;
}

.edi-hero p,
.page-hero p {
  color: #d0eaf8;
  font-size: 1.05rem;
  max-width: 700px;
}

/* ----------------------------------------------------------
   Location cards
   ---------------------------------------------------------- */
.location-card {
  background: #f5f5f5;
  border-left: 4px solid #005a8e;
  margin-bottom: 24px;
  padding: 20px 24px;
  border-radius: 3px;
}

.location-card h3 {
  color: #005a8e;
  margin: 0 0 8px;
}

.location-card p {
  margin: 0 0 6px;
  font-size: 0.93rem;
}

.location-card .location-address {
  font-style: italic;
  color: #666;
  font-size: 0.86rem;
}

.location-card .location-services {
  margin-top: 8px;
  font-size: 0.86rem;
  color: #555;
}

.location-card .location-services strong {
  color: #005a8e;
}

/* ----------------------------------------------------------
   EDI Pillars
   ---------------------------------------------------------- */
.edi-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0;
}

.edi-pillar {
  flex: 1 1 260px;
  background: #f5f9fc;
  border-top: 4px solid #005a8e;
  border-radius: 4px;
  padding: 20px 18px;
}

.edi-pillar h3 {
  color: #005a8e;
  margin-top: 0;
  font-size: 1.05rem;
}

.edi-pillar p {
  color: #444;
  font-size: 0.93rem;
  line-height: 1.6;
}

.edi-quote {
  background: #e8f4ec;
  border-left: 5px solid #4caf50;
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 3px;
}

.edi-quote p {
  font-style: italic;
  color: #2d6a35;
  font-size: 1rem;
  margin: 0 0 6px;
}

.edi-quote span {
  font-size: 0.88rem;
  color: #555;
}

.edi-initiatives h2 {
  color: #005a8e;
  border-bottom: 2px solid #005a8e;
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.edi-initiative-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e0e0e0;
}

.edi-initiative-item:last-child {
  border-bottom: none;
}

.edi-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #005a8e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* ----------------------------------------------------------
   Sections
   ---------------------------------------------------------- */
.locations-section-title,
.section-title {
  font-size: 1.4rem;
  color: #005a8e;
  border-bottom: 2px solid #005a8e;
  padding-bottom: 8px;
  margin: 28px 0 16px;
}

.map-placeholder {
  background: #e8f0f7;
  border: 1px solid #ccdce8;
  border-radius: 3px;
  text-align: center;
  padding: 28px 20px;
  margin: 28px 0 10px;
  color: #666;
  font-size: 0.9rem;
}

.map-placeholder a {
  color: #005a8e;
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 10px;
  color: #005a8e;
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
#footer,
footer {
  background: #003d66;
  color: #cce3f4;
  padding: 32px 0 20px;
  margin-top: 40px;
  font-size: 0.88rem;
}

#footer .container,
footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

#footer h4,
footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

#footer a,
footer a {
  color: #a8d4ee;
  text-decoration: none;
}

#footer a:hover,
footer a:hover {
  color: #fff;
  text-decoration: underline;
}

#footer ul,
footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#footer ul li,
footer ul li {
  margin-bottom: 5px;
}

.footer-bottom {
  background: #002a4a;
  color: #88b8d8;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.82rem;
}

.footer-bottom a {
  color: #a8d4ee;
}

/* ----------------------------------------------------------
   Utility Classes
   ---------------------------------------------------------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.mt-0  { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-0  { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ----------------------------------------------------------
   Responsive — Tablet (min 640px)
   ---------------------------------------------------------- */
@media screen and (min-width: 640px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  .container {
    padding: 0 24px;
  }

  .site-header {
    padding: 14px 24px;
  }

  .locations-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .locations-two-col .location-card {
    flex: 1 1 300px;
  }
}

/* ----------------------------------------------------------
   Responsive — Desktop (min 1024px)
   ---------------------------------------------------------- */
@media screen and (min-width: 1024px) {
  h1 { font-size: 2.4rem; }

  .container {
    padding: 0 32px;
  }

  #slideshow {
    max-height: 400px;
  }

  #slideshow img {
    max-height: 400px;
  }

  ul#nav > li > a {
    font-size: 0.97rem;
    padding: 16px 22px;
  }

  #content-wrapper {
    padding: 32px 0 56px;
  }

  .content-main {
    flex: 1 1 0;
  }

  .content-sidebar {
    flex: 0 0 280px;
  }
}

/* ----------------------------------------------------------
   Responsive — Mobile nav adjustments (max 767px)
   ---------------------------------------------------------- */
@media screen and (max-width: 767px) {
  ul#nav {
    flex-direction: column;
  }

  ul#nav > li > a {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  ul#nav li ul {
    position: static;
    display: block;
    background: #003d66;
    box-shadow: none;
  }

  ul#nav li ul li a {
    padding-left: 32px;
  }

  #content {
    flex-direction: column;
  }

  .content-sidebar {
    flex: 1 1 auto;
  }

  .edi-pillars {
    flex-direction: column;
  }

  .edi-initiative-item {
    flex-direction: column;
  }

  #footer .container {
    flex-direction: column;
  }

  table {
    font-size: 0.85rem;
  }

  td, thead th {
    padding: 8px 10px;
  }
}