@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Defining font colors based on the provided design */
:root {
  --main-blue: #003366;
  --main-green: #339966;
}

/* Website typography */
body {
  max-width: 1500px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
  color: var(--main-blue);
  margin: 0 auto;
}

.background {
  background-image: url("../assets/background.svg");
  background-size: auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  min-height: 100vh;
}

@media (max-width: 930px) {
  .background {
    background-size: auto;
    background-attachment: scroll;
    background-position: center top;
    margin-top: 3rem;
  }
}

/* Navbar styles */
.navbar {
  display: flex;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  z-index: 1;
  position: sticky;
  top: 0;
}

.navbar a {
  color: inherit;
  text-decoration: none;
}
.navbar ul {
  display: flex;
  list-style: none;
  justify-content: flex-end;
  width: 100%;
}
.navbar ul li a {
  display: block;
  color: var(--main-green);
  padding: 0.75rem;
  margin: 0 0.25rem;
  text-align: center;
  text-decoration: none;
  width: 100%;
}
.navbar .toggler {
  display: none;
  font-size: 1.75rem;
  cursor: pointer;
}

/* Media Queries */
@media (max-width: 930px) {
  .navbar ul {
    position: fixed;
    left: -100%;
    top: 5rem;
    flex-direction: column;
    background-color: #003366;
    width: 100%;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 2;
  }
  .navbar ul li {
    margin: 1rem 0;
  }
  .navbar ul li a {
    width: 100%;
    color: #fff;
  }
  .navbar ul.active {
    left: 0;
  }
  .navbar .toggler {
    display: initial;
  }
}

/* Logo and menu items */

.menu {
  display: flex;
  gap: 1em;
}
.menu-item {
  color: white;
  text-decoration: none;
  padding: 0.5em;
}
.menu-item:hover {
  background-color: var(--main-blue);
  border-radius: 10px;
  transition: transform 0.5s ease-in-out;
}

/* Media Queries */
@media (max-width: 930px) {
  .menu-item:hover {
    background-color: var(--main-green);
    transition: transform 0.5s ease-in-out;
  }
}

.main-logo {
  flex: 0 0 auto;
}

.main-logo img {
  max-height: 4rem;
  width: auto;
  margin-right: 10px;
  animation: none !important;
}

.main-logo img:hover {
  transform: scale(1.1);
  transition: transform 0.5s ease-in-out;
  cursor: pointer;
}

/* Hero page */

.hero {
  position: relative;
  background-color: rgba(255, 255, 255, 0.85);
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.hero-wrapper {
  padding-top: 10%;
}

/* Video */
.video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0 auto;
  object-fit: cover;
}

video {
  opacity: 0.5;
}

@media (max-width: 1025px) {
  .hero-wrapper {
    display: none;
  }
}

/* Main page */

.title {
  color: var(--main-blue);
  align-self: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 7rem;
}

.title-main {
  color: var(--main-green);
}

.main-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  max-height: 100vh;
}

.main-svg {
  background-image: url("../assets/containers.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: center top;
  min-height: 80vh;
  opacity: 0.7;
}

@media (max-width: 930px) {
  .main-svg {
    min-height: 65vh;
    margin-top: 5rem;
  }
  .title {
    font-size: 5rem;
  }
}

@media (max-width: 768px) {
  .main-page {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }
  .title {
    font-size: 4rem;
  }
  .main-svg {
    min-height: 50vh;
    margin-top: 0;
  }
}

/* Section styling */

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.8;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

section {
  background-color: rgba(255, 255, 255, 0.85);
  scroll-margin-top: 50px;
  text-align: center;
}

.main-page h1,
.about,
.services,
.team,
.contact,
.gallery,
.section-img {
  text-align: center;
  margin: 0;
}

img {
  animation: appear linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
}

section > p {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
  animation: appear linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
}

section > p > a {
  background-color: #33996696;
  text-decoration: none;
  cursor: pointer;
  border-radius: 5px;
}

.services img {
  max-width: 60%;
  height: auto;
}

.section-logo img {
  max-height: 15rem;
  width: auto;
}

.extras {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  justify-content: center;
  align-items: start;
  padding: 1rem 2rem;
  font-size: 1rem;
}

.extras p {
  text-align: left;
}

#social-media {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 930px) {
  .sections-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .services img {
    max-width: 90%;
    height: auto;
  }
  .extras {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  #social-media img {
    width: 30px;
    height: 30px;
  }
}

/* Statistics section */

.statistics {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.85);
  animation: appear linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
  padding-top: 4rem;
}

.statistics > h2 {
  font-size: 2rem;
  text-align: center;
}

#deliveryChart {
  width: 100%;
  max-width: 400px;
}

#legend {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#legend > h3 {
  font-size: 1.5rem;
  margin: 5px 0;
}

@media (max-width: 600px) {
  .statistics > h2 {
    font-size: 1.5em;
  }
  .statistics {
    flex-direction: column;
  }
  #legend {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  #legend > h3 {
    flex: 1 50%; /* Each legend item takes up half the width on small screens */
  }
}

/* Testimonials section */

.testimonials {
  text-align: center;
  color: var(--main-blue);
  background-color: rgba(255, 255, 255, 0.85);
  animation: appear linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
  padding-top: 4rem;
}

.testimonials h2 {
  font-size: 2rem;
  color: var(--main-blue);
  margin-bottom: 1.875rem;
}

.testimonial-container {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.testimonial {
  background: #3399662f;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  border-radius: 0.625rem;
  width: 30%;
  min-width: 16rem;
}

.testimonial p {
  font-style: italic;
  line-height: 1.6;
}

.testimonial h3 {
  margin-top: 1.25rem;
  color: var(--main-green);
  font-weight: normal;
}

@media (max-width: 768px) {
  .testimonial-container {
    flex-direction: column;
    align-items: center;
  }
}

/* Contact section styles */
.contact {
  padding: 2rem;
  text-align: center;
}

.contact-text-main {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-text {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Style for the telephone and email links */
.contact-link {
  display: inline-block;
  background-color: #33996671;
  color: var(--main-blue);
  text-decoration: none;
  font-size: 1.5rem;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.contact-text a {
  display: block;
  margin: 1rem auto;
  width: 30rem;
}

/* Hover effect for telephone links */
.contact-link:hover {
  background-color: var(--main-blue);
  color: white;
}

@media (max-width: 800px) {
  .contact-text a {
    width: 100%;
  }

  .email {
    font-size: 1rem;
  }
}

/* Team section */

.team-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.team-container > img {
  width: 30%;
  margin-bottom: 2rem;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 50%;
}

.first-member {
  grid-column: 1 / -1;
}

.team-member-card {
  margin: 0;
  overflow: hidden;
  transition: box-shadow 0.3s ease-in-out;
  animation: appear linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
}

.team-member-card:hover {
  background: #33996637;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-content {
  padding: 1rem;
  text-align: center;
}

.member-name {
  margin: 0.5rem 0 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.member-role {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #666666;
}

/* Responsive Grid */
.team-members {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .team-container > img {
    width: 50%;
  }
}
@media (max-width: 800px) {
  .team-container {
    flex-direction: column;
    align-items: center;
  }

  .team-container > img {
    width: 50%;
  }

  .team-members {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .team-member-card {
    flex: 0 1 100%;
  }
}

@media (max-width: 600px) {
  .team img {
    max-width: 70%;
  }
  .team-member-card {
    flex: 0 1 100%;
  }
  .team-members {
    grid-template-columns: 1fr;
  }
}

/* Gallery section */

.gallery img {
  animation-range: entry 25% cover 25%;
}

.img-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  padding: 1rem;
}

.img-gallery img:nth-child(1) {
  grid-column: span 8;
  grid-row: span 6;
}

.img-gallery img:nth-child(2) {
  grid-column: 7 / span 6;
  grid-row: 7 / span 5;
  height: 80%;
}

.img-gallery img:nth-child(3) {
  grid-column: span 6;
  grid-row: 7 / span 6;
}

.img-gallery img:nth-child(4) {
  grid-column: 9 / span 4;
  grid-row: span 6;
}

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

/* Small screens */
@media (max-width: 767px) {
  .img-gallery {
    display: flex;
    flex-direction: column;
  }
}

/* Footer styling */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--main-blue);
  color: white;
  padding: 1rem;
}
