
/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.6;
}

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

a {
  color: #00928b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  color: #002d4a;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  color: #002d4a;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 0.9rem;
  color: #00928b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: #444;
  font-size: 0.97rem;
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.columns {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.col-2 {
  flex: 1;
}

.center-headings {
  text-align: left;
}

/* =============================================
   BUTTONS
   ============================================= */
.button,
a.button {
  display: inline-block;
  background: #00928b;
  color: #fff !important;
  padding: 0.65rem 1.5rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.1s ease;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.button:hover,
a.button:hover {
  background: #007b74;
  text-decoration: none;
  transform: translateY(-1px);
}

/* =============================================
   HEADER
   ============================================= */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header {
  background: #002d4a;
  padding: 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header .logo {
  height: 50px;
  width: auto;
  display: block;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-navigation-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.main-navigation {
  position: relative;
}

.main-navigation > ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.main-navigation ul li {
  position: relative;
}

.main-navigation ul li a {
  display: block;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.75rem 0.7rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.03em;
}

.main-navigation ul li a:hover,
.main-navigation ul li.sel > a {
  color: #00aca3;
  background: rgba(255,255,255,0.05);
}

/* Dropdown */
.main-navigation ul li.has-children > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #003d5c;
  min-width: 240px;
  z-index: 9999;
  border-top: 3px solid #00928b;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.main-navigation ul li.has-children:hover > ul {
  display: block;
}

.main-navigation ul li.has-children > ul li a {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: #e0f0f0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.main-navigation ul li.has-children > ul li a:hover {
  background: #00928b;
  color: #fff;
}

/* Job Search button in nav */
.main-navigation a.button.job-search-link {
  background: #00928b;
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  font-size: 0.82rem;
  transition: background 0.2s;
}

.main-navigation a.button.job-search-link:hover {
  background: #007b74;
}

.main-navigation li.job-search-link {
  display: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid #00928b;
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

/* =============================================
   HERO / SLIDESHOW
   ============================================= */
.slideshow {
  position: relative;
  width: 100%;
  min-height: 520px;
  background-image: url('/assets/New-Home-Page-Image.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.slideshow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,45,74,0.78) 0%, rgba(0,146,139,0.45) 100%);
}

.slider {
  position: relative;
  z-index: 1;
  width: 100%;
}

.slide {
  margin: 0;
  padding: 0;
}

.caption {
  padding: 4rem 1.25rem;
}

.caption-content {
  max-width: 620px;
}

.caption-content h2 {
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.caption-content p {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.caption-content .button {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  background: #00928b;
}

.caption-content .button:hover {
  background: #007b74;
}

/* =============================================
   CONTENT SECTION
   ============================================= */
.content-wrapper {
  padding: 4rem 0;
  background: #fff;
}

.content-wrapper .content {
  width: 100%;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =============================================
   COLOURED BACKGROUND / THUMBNAILS
   ============================================= */
.coloured-background {
  background: linear-gradient(135deg, #002d4a 0%, #007b74 100%);
  padding: 4rem 0;
}

.coloured-background h4 {
  color: #7eeae5;
  text-align: center;
}

.coloured-background h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 2.5rem;
}

.page-thumbnails-wrapper {
  text-align: center;
}

.page-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.thumbnail {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 160px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.2);
}

.thumbnail:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  text-decoration: none;
}

.thumbnail:nth-child(1) {
  background-image: url('/assets/METUGroup2018CC004.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(1)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail:nth-child(2) {
  background-image: url('/assets/ICUAnna2018CC003.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(2)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail:nth-child(3) {
  background-image: url('/assets/Christchurch-Otakaro.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(3)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail:nth-child(4) {
  background-image: url('/assets/contactimg.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(4)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail:nth-child(5) {
  background-image: url('/assets/Job-Search-Pic-1.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(5)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail:nth-child(6) {
  background-image: url('/assets/THGroup2018CC001.jpg');
  background-size: cover;
  background-position: center;
}
.thumbnail:nth-child(6)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,45,74,0.2), rgba(0,45,74,0.65));
}

.thumbnail .title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  padding: 0.6rem 0.5rem;
  display: block;
  width: 100%;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =============================================
   PAGE SECTIONS (Ōtautahi + News)
   ============================================= */
.page-sections {
  padding: 3.5rem 0 2rem;
}

.section {
  margin-bottom: 3rem;
}

/* =============================================
   ARTICLES / NEWS
   ============================================= */
.articles.grid-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-summary {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.article-summary:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

.article-summary .image {
  display: block;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #cce8e7;
}

/* Article images using available assets */
.article-summary:nth-child(1) .image {
  background-image: url('/assets/NSJohn2019001.jpg');
}

.article-summary:nth-child(2) .image {
  background-image: url('/assets/Rangatahi-Induction-1.jpg');
}

.article-summary:nth-child(3) .image {
  background-image: url('/assets/Mana-Taurite-3.jpg');
}

.article-summary .summary {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.article-summary .summary h3 {
  font-size: 1.05rem;
  color: #002d4a;
  margin-bottom: 0.5rem;
}

.article-summary .summary p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.article-summary .read-more {
  display: inline-block;
  color: #00928b;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 2px solid #00928b;
  padding-bottom: 2px;
  align-self: flex-start;
  transition: color 0.2s, border-color 0.2s;
}

.article-summary .read-more:hover {
  color: #007b74;
  border-color: #007b74;
  text-decoration: none;
}

.articles-more {
  text-align: center;
  margin: 1.5rem 0 3rem;
}

/* =============================================
   FOOTER
   ============================================= */
footer[role="banner"] {
  background: #002d4a;
}

.footer-main {
  background: #003d5c;
  padding: 3rem 0;
}

.footer-main > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-main h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.footer-main p {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  max-width: 600px;
  margin-top: 1rem;
}

.footer-main p a {
  color: #7eeae5;
}

/* Social links */
.social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.1);
  padding: 0.45rem 1rem;
  border-radius: 3px;
  transition: background 0.2s;
  border: 1px solid rgba(255,255,255,0.15);
}

.social a:hover {
  background: #00928b;
  text-decoration: none;
}

/* Social icons using SVG */
.social a.facebook::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.social a.youtube::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M22.54 6.42a2.78 2.78 0 00-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46A2.78 2.78 0 001.46 6.42 29 29 0 001 12a29 29 0 00.46 5.58 2.78 2.78 0 001.95 1.96C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 001.95-1.96A29 29 0 0023 12a29 29 0 00-.46-5.58z'/%3E%3Cpolygon fill='%23002d4a' points='9.75 15.02 15.5 12 9.75 8.98 9.75 15.02'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.social a.linkedIn::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.footer-content {
  background: #002d4a;
  padding: 2rem 0;
}

.footer-content .content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-content .content img {
  max-width: 260px;
  height: auto;
}

.copyright {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  line-height: 1.8;
}

.copyright a {
  color: rgba(255,255,255,0.55);
}

.copyright a:hover {
  color: #7eeae5;
}

/* =============================================
   MOBILE MENU STATE
   ============================================= */
.main-navigation.open > ul {
  display: flex;
}

/* =============================================
   RESPONSIVE: 768px+
   ============================================= */
@media (min-width: 768px) {
  .articles.grid-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .slideshow {
    min-height: 580px;
  }

  .caption-content h2 {
    font-size: 2.8rem;
  }
}

/* =============================================
   RESPONSIVE: 1024px+
   ============================================= */
@media (min-width: 1024px) {
  .columns {
    flex-direction: row;
    align-items: flex-start;
  }

  .articles.grid-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .slideshow {
    min-height: 640px;
  }

  .caption-content h2 {
    font-size: 3rem;
  }

  .thumbnail {
    width: 170px;
    height: 170px;
  }
}

/* =============================================
   MOBILE ADJUSTMENTS (below 768px)
   ============================================= */
@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    width: 100%;
  }

  .main-navigation.open {
    display: block;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #002d4a;
    overflow-y: auto;
    z-index: 9999;
  }

  .main-navigation.open > ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }

  .main-navigation.open > ul > li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .main-navigation ul li a {
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
  }

  .main-navigation ul li.has-children > ul {
    display: block;
    position: static;
    background: rgba(0,0,0,0.2);
    border-top: none;
    box-shadow: none;
    border-left: 3px solid #00928b;
    margin-left: 1rem;
  }

  .main-navigation a.button.job-search-link {
    display: block;
    margin: 1rem 1.25rem;
    text-align: center;
  }

  .main-navigation li.job-search-link {
    display: none;
  }

  .site-header .container {
    flex-wrap: wrap;
    position: relative;
  }

  .main-navigation-wrapper {
    display: none;
  }

  .site-header .container .menu-toggle {
    margin-left: auto;
  }

  .caption-content h2 {
    font-size: 1.8rem;
  }

  .slideshow {
    min-height: 420px;
  }

  h2 {
    font-size: 1.6rem;
  }

  .thumbnail {
    width: 140px;
    height: 140px;
  }
}

/* =============================================
   ACCENT DIVIDERS
   ============================================= */
.section-divider {
  width: 60px;
  height: 4px;
  background: #00928b;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

/* Otautahi section */
.page-sections .section h3 {
  font-size: 1.6rem;
}

/* Content padding */
.content.container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.center-headings > h4,
.center-headings > h2 {
  text-align: center;
}

.center-headings > h4 {
  padding-top: 2.5rem;
}
