/* ===== CSS Custom Properties ===== */
:root {
  --color-primary: #7e9159;
  --color-accent: #a6b982;
  --color-menu-hover: rgb(71, 94, 57);
  --color-dropdown-bg: rgb(152, 173, 98);
  --color-footer: #232323;
  --color-credits-bg: #1F1E1E;
  --color-text: #5f6d63;
  --color-heading: rgb(97, 97, 97);
  --color-border: #f0f0e9;
  --color-bg: #ddd;
  --color-btn-border: rgb(95, 129, 23);
  --font-display-light: 'oswaldlight', sans-serif;
  --font-display: 'oswaldregular', sans-serif;
  --font-body: 'Noto Serif', serif;
  --font-button: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
  --max-width: 62.5rem;
  --gutter: 0.9375rem;
}

/* ===== Modern Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
a { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* ===== Font Faces ===== */
@font-face {
  font-family: 'oswaldlight';
  src: url('fonts/oswald-light-webfont.woff') format('woff'),
       url('fonts/oswald-light-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'oswaldregular';
  src: url('fonts/oswald-regular.woff') format('woff'),
       url('fonts/oswald-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== Base Typography ===== */
body {
  background: var(--color-bg) url('../images/bgPattern.png');
  line-height: 1.5em;
  font-family: var(--font-body);
  color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: normal;
}

.title {
  text-transform: uppercase;
  color: #000;
  font-size: 1.8em;
  border-bottom: 1px solid var(--color-border);
  font-weight: normal;
  line-height: 2em;
  margin-top: 0;
  padding-bottom: 20px;
}

h1.page-title {
  color: #000;
  font-family: var(--font-display);
  text-transform: uppercase;
}

h2.sub-title {
  font-size: 18px;
  line-height: 2em;
  margin-bottom: 22px;
}

a { color: var(--color-text); }
a:hover { color: var(--color-accent); }

::selection { color: #fff; background: var(--color-accent); }

.content { font-size: 1em; }
.content p { line-height: 2em; }
p.highlight { color: var(--color-accent); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  line-height: 1.5em;
  font-family: var(--font-body);
}

/* ===== Header ===== */
.site-header {
  padding: 50px 20px;
  background: #fff;
  text-align: center;
}

.site-header img {
  display: inline-block;
  max-width: 100%;
}

/* ===== Navigation ===== */
.main-nav {
  background: url('../images/menuBg.png');
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
  background: url('../images/menuBg.png');
}

.nav-list a {
  display: block;
  color: #fff;
  font-family: var(--font-display-light);
  text-transform: uppercase;
  font-size: 1.3em;
  padding: 0.75em 2em;
  white-space: nowrap;
}

.nav-list a:hover { color: #fff; }

.nav-list > li:hover,
.nav-list > li:focus-within,
.nav-list > li.active {
  background: var(--color-menu-hover);
}

/* Dropdown */
.nav-list .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 99;
  min-width: 14em;
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-list li:hover > .dropdown,
.nav-list li:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-list .dropdown li {
  background: var(--color-dropdown-bg);
}

.nav-list .dropdown li:hover {
  background: var(--color-menu-hover);
}

.nav-list .dropdown a {
  padding: 0.5em 1.5em;
  font-size: 1.1em;
}

/* Hamburger */
.hamburger {
  display: none;
  background: var(--color-primary);
  border: none;
  color: #fff;
  font-size: 1.5em;
  padding: 12px 15px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-display-light);
  text-transform: uppercase;
}

.hamburger-icon {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  vertical-align: middle;
  margin-right: 10px;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: #fff;
  left: 0;
}
.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }

/* ===== Buttons ===== */
.btn,
a.btn {
  display: inline-block;
  background: var(--color-primary);
  font-family: var(--font-button);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 30px;
  border-radius: 3px;
  border: 1px solid var(--color-btn-border);
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background-color 1000ms linear;
}

.btn:hover,
a.btn:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* ===== Carousel (Home page) ===== */
.carousel {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel:hover .carousel-btn { opacity: 0.8; }
.carousel-btn:hover { opacity: 1 !important; }
.carousel-btn--prev { left: 10px; }
.carousel-btn--next { right: 10px; }

/* ===== Tagline ===== */
.tagline {
  padding: 30px;
  font-family: var(--font-body);
  font-size: 21px;
  color: #3d3d3d;
  line-height: 50px;
  text-transform: uppercase;
  text-align: center;
  background: #fff;
}

/* ===== Content Box ===== */
.content-box {
  padding: 30px;
  background: #fff;
  margin-bottom: 15px;
  margin-top: 15px;
}

/* ===== Service Welcome Box (Home) ===== */
.service-welcome-grid {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: 30px;
}

.service-welcome-box li a { color: var(--color-text); }
.service-welcome-box li a:hover { color: var(--color-accent); }

.service-welcome-box .btn {
  float: right;
  margin-top: 10px;
}

.service-welcome-box p.highlight { margin-top: 20px; }

img.welcome {
  border: 10px solid #f2f2f2;
  margin-bottom: 20px;
}

/* Custom bullet list */
.bullet-list { list-style: none; padding: 0; }

.bullet-list li {
  list-style-position: inside;
  padding: 15px 5px;
  border-bottom: 1px solid var(--color-border);
}

li.bullet  { list-style-image: url('../images/bullet.png'); }
li.bullet2 { list-style-image: url('../images/bullet2.png'); }
li.bullet3 { list-style-image: url('../images/bullet3.png'); }
li.bullet4 { list-style-image: url('../images/bullet4.png'); }

/* ===== About Page - Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.img-wrapper {
  background: #000;
  margin-bottom: 20px;
  overflow: hidden;
}

.img-wrapper img {
  opacity: 0.4;
  transition: opacity 0.15s ease-in-out;
  width: 100%;
}

.img-wrapper img:hover {
  opacity: 1;
  cursor: pointer;
}

h3.employer-name {
  text-transform: uppercase;
  color: #000;
}

/* ===== Services Page ===== */
.service-card {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: center;
  background: var(--color-primary);
  padding: 20px;
  color: #fff;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 1.2em;
}

.service-card ul {
  list-style: disc;
  padding-left: 1.5em;
}

.service-card ul li {
  margin-bottom: 0.3em;
}

.service-card-title {
  font-size: 150%;
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.services-image {
  width: 200px;
  height: 200px;
  border-radius: 5px;
  object-fit: cover;
}

.services-image.right {
  justify-self: end;
}

/* ===== Gallery Page ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  margin-bottom: 20px;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.05);
  opacity: 0.8;
}

/* ===== Contact Page ===== */
.vcard {
  font-size: 1.4em;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.vcard li { margin-bottom: 0.5em; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-footer);
  padding: 40px 30px;
  border-top: 10px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.footer-nav a {
  font-family: var(--font-display-light);
  color: #fff;
  text-transform: uppercase;
  margin-right: 15px;
}

.footer-nav a:hover { color: var(--color-accent); }

h4.footer-call {
  line-height: 1em;
  margin: 0;
  text-transform: uppercase;
  text-align: center;
  color: #555;
}

h4.footer-call a { color: #555; }
h4.footer-call a:hover { color: var(--color-accent); }

.footer-meta {
  margin-top: 20px;
  text-align: right;
}

.scroll-top { cursor: pointer; }

.footer-credits {
  text-align: center;
  background: var(--color-credits-bg);
  padding: 10px 0;
}

.footer-credits p {
  margin: 0;
  color: #464646;
  font-size: 12px;
}

.footer-credits a { color: #464646; }
.footer-credits a:hover { color: var(--color-accent); }

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .hamburger { display: block; }

  .nav-list {
    display: none;
    flex-direction: column;
  }

  .nav-list.is-open { display: flex; }

  .nav-list > li {
    background: var(--color-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-list .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list .dropdown li { padding-left: 1em; }

  .service-welcome-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { grid-template-columns: 1fr; text-align: center; }
  .services-image { margin: 0 auto; }
  .services-image.right { justify-self: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 15px; }
  h4.footer-call { text-align: left; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 320px) {
  .site-header { padding: 20px; }
}
