/* Reset + Flexbox layout for sticky footer */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: #fff;
  background-color: white;
}

/* Main content expands */
main {
  flex: 1;
}

/* Header */
header {
  background: rgba(112, 128, 144, 1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.1rem 1rem;
}

header .logo img {
  height: 4.5rem; /* slightly larger logo */
  width: 120%;
}

/* CENTERED NAV LINKS */
header nav {
  position: absolute;
  left: 92.2%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  background: transparent;
}

header nav a {
  position: relative;
  color: white;
  text-decoration: none;
  font-size: .8rem;
  font-weight: bold;
  border: 0.15rem solid white;  /* empty border by default */
  border-radius: 2rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  overflow: hidden;         /* keep animation inside */
  transition: color 0.3s ease;
  z-index: 1;
}

/* Animated fill */
header nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;                /* start at center */
  width: 104%;
  height: 104%;
  background: white;
  border-radius: 0rem;
  transform: translateX(-50%) scaleX(0);  /* collapsed in center */
  transform-origin: center;
  transition: transform 0.15s ease;
  z-index: -1;
}

/* On hover, background expands from center */
header nav a:hover::before {
  transform: translateX(-50%) scaleX(1);
}

header nav a:hover {
  color: #012039;
}

/* Active/current page stays filled */
header nav a.active::before {
  transform: translateX(-50%) scaleX(1);
}

header nav a.active {
  color: #012039;
  border-color: white;
}



/* Position hero text over slideshow */
.slideshow-container {
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 50%;               /* vertically center */
  left: 50%;              /* horizontally center */
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
}

.hero-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* readability */
}

.hero-overlay p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.hero-overlay .btn {
  display: inline-block;
  background: white;
  color: #012039;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: .5rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.hero-overlay .btn:hover {
  background: #012039;
  color: white;
}

/* Services */
.services {
  display: grid;
  gap: 4rem 1rem;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  justify-content: start; /* aligns the grid items to the left */
  align-items: center; /* <-- prevents cards from matching image height */
}

.card {
  background: rgba(0, 0, 0, .95);
  padding: .25rem;
  border-radius: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  outline: solid;
  outline-color: black;
  text-align: center;
  color: white;
}

#services {
  padding: 1rem 5rem;
  max-width: 60rem;
  margin: auto;
  margin-bottom: 4rem;
}

#services h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

/* Contact Page */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  margin: 3rem auto;
  padding: 1.5rem;
  border-radius: 2rem;
}

form input, form textarea {
  padding: 0.75rem;
  border-radius: 1rem;
  border: 0.125rem solid #ccc;
}

form button {
  background: #012039;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: .8rem;
  cursor: pointer;
  font-size: 1rem;
}

form button:hover {
  background: #1e40af;
}

/* Footer */
footer {
  background: rgba(112, 128, 144, 1);
  color: #d1d5db;
  text-align: center;
  padding: 0.5rem;
  margin-top: auto;
  color: #012039;
}
* {box-sizing:border-box}

/* Slideshow container */
.slideshow-container {
  max-width: 100%;
  position: relative;
  margin: 0;
  margin-top: 0rem;
  height: 50rem;
}

/*container height*/
.slideshow-container img {
  width: 100%;
  height: auto;
  max-height: 53rem; /* adjust this number to your liking */
  object-fit: cover; /* keeps images cropped instead of squished */
}

/* Hide the images by default */
.mySlides {
  display: none;
}

.mySlides img {
  width: 100%;
  vertical-align: middle;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 0rem 0 0 0rem;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,1);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 5rem;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: #d1d5db;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #012039;
}

.dot-container {
  text-align: center;
  position: relative;
  margin-top: 12px;
}

/* Slideshow navigation arrows */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: .75rem;
  margin-top: -2rem;
  color: #white;
  font-weight: bold;
  font-size: 2rem;
  transition: 0.3s;
  border-radius: 0.3rem;
  user-select: none;
  background: rgba(0,0,0,0.8); /* subtle dark background */
  opacity: 0.9; /* semi-transparent by default */
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .90}
  to {opacity: 1}
}

/* ================================
   MOBILE RESPONSIVE SERVICES FIX
   ================================ */
@media (max-width: 1024px) {

  /* Header */
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  header .logo img {
    height: 3.5rem;
    width: auto;
  }

  header nav {
    position: static;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
	margin-bottom: 0.2rem;
  }

  header nav a {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
/* Slideshow */
  .slideshow-container {
    height: auto;
  }

  .slideshow-container img {
    max-height: 16.67rem;
    object-fit: cover;
  }

  .hero-overlay h2 {
    font-size: 1.75rem;
  }

  .hero-overlay p {
    font-size: 1rem;
  }
   /* About + Contact Pages */
  section.about img {
    width: 90%;
    height: auto;
    margin: 1rem auto;
  }

  form {
    width: 90%;
    padding: 1rem;
  }

  form input, form textarea {
    font-size: 1rem;
  }

  footer {
    font-size: 0.9rem;
    padding: 1rem;
  }
 /* ================================
   SERVICES SECTION - DESKTOP GRID
   ================================ */
.services {
  display: grid;
  gap: 4rem 1rem; /* vertical gap / horizontal gap */
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  justify-content: start;
  align-items: start; /* prevent cards from matching image height */
}

/* Cards */
.card {
  background: rgba(0, 0, 0, 0.95);
  padding: 0.25rem;
  border-radius: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  outline: solid black;
  text-align: center;
  color: white;
}

/* Image wrapper */
.img-wrap {
  text-align: center;
}

.img-wrap img {
  width: 100%;       /* fill card width */
  height: auto;      /* maintain aspect ratio */
  object-fit: cover;
  display: block;
  margin: 1rem auto;
  max-width: 18rem;  /* optional desktop image limit */
}

/* ================================
   TABLET / SMALL SCREEN ADJUSTMENTS
   ================================ */
@media (max-width: 1024px) {
  #services {
    padding: 1rem 2rem;
    max-width: 100%;
    margin: 0 auto 4rem auto;
  }

  .card {
    max-width: 28rem;   /* slightly bigger than desktop card for tablets */
    width: 100%;
  }

  .img-wrap img {
    max-width: 26rem;   /* allow bigger images inside card */
  }
}

/* ================================
   MOBILE PHONES - STACK CARDS
   ================================ */
@media (max-width: 600px) {
  #services {
    padding: 1rem 1rem;
  }

  .services {
    display: flex;
    flex-direction: column;  /* stack vertically */
    align-items: center;
    gap: 2rem;
  }

  .card {
    width: 95%;         /* almost full width */
    max-width: none;    /* remove limit */
    padding: 1rem;
  }

  .img-wrap img {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0.75rem auto;
  }

  #services h3 {
    font-size: 1.6rem;
  }
}
