/* ------------------- */
/* RESET & BASE STYLES */
/* ------------------- */
:root {
  --color-primary: #27807e;
  --color-primary-dark: #003d3b;
  --color-light: #E5F4F1;
  --color-white: #ffffff;
  --color-dark: #333;
  --color-gray: #555;

  --font-family: 'Poppins';
  --transition-fast: 0.3s ease;

  --fs-h1: clamp(2rem, 5vw + 1rem, 2.5rem);
  --fs-h2: clamp(1.75rem, 4vw + 1rem, 2.25rem);
  --fs-h3: clamp(1.25rem, 2vw + 1rem, 1.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-light);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a,
button {
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); color: var(--color-primary); }
h3 { font-size: var(--fs-h3); }

.container {
  width: 80%;
  max-width: 1200px;
  margin-inline: auto;
}

section { padding-block: 4rem; }

.h-content {
  margin-bottom: 3rem;
  text-align: center;
}

.h-content p { color: var(--color-gray); }

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------- */
/* NAVIGATION          */
/* ------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 3rem;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.5rem;
  color: var(--color-white);
}

.logo-img { width: 100px; height: auto; }

.nav-toggle {
  display: block;
  z-index: 1001;
  padding: 0.5rem;
  background: transparent;
  border: none;
}

.hamburger {
  position: relative;
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 25px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition-fast);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

#nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
#nav-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(8px) rotate(45deg); }
#nav-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(-8px) rotate(-45deg); }

#nav-menu {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  font-size: large;
  background: var(--color-primary);
}

#nav-menu.active { display: flex; }

#nav-menu a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-white);
}

#nav-menu a:not(.cbt):hover {
  color: var(--color-primary);
  background-color: var(--color-light);
  border-radius: 10px;
  transform: scale(1.1);
}

#nav-menu a.active-link {
  color: var(--color-primary);
  background-color: var(--color-light);
  border-radius: 10px;
}

.cbt {
  border: 1px solid var(--color-white);
  border-radius: 20px;
}

.cbt:hover { transform: scale(1.2); }
.dropdown-menu { display: none; }

/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  padding: 0;
}

#heroImage {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 40, 39, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2rem 1rem;
  color: var(--color-white);
  text-align: center;
}

.hero-text {
  max-width: 80ch;
  margin-inline: auto;
}

.hero-text h1 { margin-bottom: 1rem; }
.hero-text p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.buttons { display: none; }

.buttons button,
.buttons .btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-white);
  background-color: rgb(39, 128, 126, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn img { width: 50px; }

.buttons button:hover,
.buttons .btn:hover {
  color: var(--color-primary);
  background-color: var(--color-white);
  transform: translateY(-5px);
}

/* ------------------- */
/* SERVICES SECTION    */
/* ------------------- */
#highlights {
  background-color: var(--color-white); 
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background-color: var(--color-light);
  border-radius: 20px;
  padding: 1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: var(--color-light);
  border-bottom: 1.5px solid rgba(51, 51, 51, 0.2);
}

.service-card:last-child {
  border-bottom: none;
}

.service-card .doodle {
  width: 120px;
  height: 100px;
  margin-bottom: 1rem;
  align-self: center;
}

.service-card p {
  flex-grow: 1;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 80ch;
  text-align: justify;
  font-size: 0.9rem;
}

.readmore {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  color: var(--color-white);
  background-color: var(--color-primary);
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 10rem;
}

.readmore:hover { transform: translateY(-5px); }

/* ------------------- */
/* FOOTER              */
/* ------------------- */
.footer {
  padding-block: 4rem 2rem;
  color: var(--color-white);
  background-color: var(--color-primary);
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 90%;
  margin-inline: auto;
  padding-left: 2rem;
  text-align: left;
}

.footer h2, .footer h3 {
  margin-bottom: 1rem;
  color: var(--color-light);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.footer-links a, .footer-contact a { color: var(--color-white); }
.footer-links a:hover, .footer-contact a:hover { text-decoration: underline; }
.footer address, .footer p { margin-bottom: 1rem; font-style: normal; }

.footer address .location {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.social-links img { width: 40px; }
.social-links a:hover { transform: scale(1.1); }
.footer-brand img { display: none; }

/* -------------------------- */
/* MEDIA QUERIES              */
/* -------------------------- */
@media (min-width: 768px) {
    .services-grid {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
  /* THIS IS THE FIX FOR THE DROPDOWN HOVER EFFECT */
  #navbar {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .nav-toggle {
    display: none;
  }

  #nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: auto;
    height: auto;
    background: transparent;
  }

  #nav-menu a {
    font-size: 0.9rem;
  }

  /* Main dropdown menu style */
  .dropdown-about:hover .dropdown-menu{
    position: absolute;
    top: 90%;
    right: 19.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: fit-content;
    padding: 20px 25px !important;
    background: rgb(39, 128, 126, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(50%);
    transition: 0.4s ease;
  }
  .dropdown-about::after {
    content: "";
    position: absolute;
    top: 70%;
    right: 28rem;
    width: 8%;
    height: 40px;

  }
  .dropdown-services:hover .dropdown-menu{
    position: absolute;
    top: 90%;
    right: 10.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: fit-content;
    padding: 20px 25px !important;
    background: rgb(39, 128, 126, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(50%);
    transition: 0.4s ease;
  }
  .dropdown-services::after {
    content: "";
    position: absolute;
    top: 70%;
    right: 19rem;
    width: 8%;
    height: 40px;

  }
  .dropdown-candidates:hover .dropdown-menu{
    position: absolute;
    top: 90%;
    right: 4.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: fit-content;
    padding: 20px 25px !important;
    background: rgb(39, 128, 126, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(50%);
    transition: 0.4s ease;
  }
  .dropdown-candidates::after {
    content: "";
    position: absolute;
    top: 70%;
    right: 12.5rem;
    width: 8%;
    height: 40px;
  }
  .dropdown-services:hover .dropdown-menu {
    right:12rem;
  }
  .dropdown-candidates:hover .dropdown-menu {
    right: 4.5rem;
  }

  /* Adjusted position for scrolled navbar */
  #navbar.scrolled .dropdown-about:hover .dropdown-menu,
  #navbar.scrolled .dropdown-services:hover .dropdown-menu,
  #navbar.scrolled .dropdown-candidates:hover .dropdown-menu {
    top: 100%;
    background: rgb(39, 128, 126, 0.7);
  }

  .dropdown-menu a {
    width: 13rem;
    font-size: 1rem !important;
    text-align: left;
    border-style:solid;
    border-width:2px;
    border-color:rgb(255, 255, 255, 0.1);
    border-radius:10px;
  }
  
  .hero-content {
    flex-direction: row;
    padding-left: 10rem;
    text-align: left;
  }

  .hero-text { max-width: 70ch; }
  .hero-text h1 { font-size: 1.4rem; }
  .hero-text p { font-size: 1rem; text-align: left; }
  
  .buttons {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
  }
  
  .btn img { width: 60px; }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    border-right: none;
    border-bottom: 1.5px solid rgba(51, 51, 51, 0.2);
  }

  .service-card:last-child {
    border-bottom: none;
  }
  
  .footer { padding-block: 4rem 0rem; }
  
  .footer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px; 
    font-size: 0.9rem !important;
  }

  .footer-details{
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 70px;
  }

  .footer-brand{
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .footer-brand img {
    display: block;
    height: 250px;
    width: 300px;
  }

  .footer-brand h2 {
    color: var(--color-light);
    font-size: 1.3rem;
  }

  .social-links {
    display: flex;
    gap: 35px;
  }

  .social-links img { width: 50px; }
}