* {
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  width: 100%;
  height: 100%;
}

:root {
  --header: rgba(100, 100, 100, 0.5);
  --border: #aeaeae;
  --primary: #222;
  --secondary: hsl(0, 0%, 90%);
  --gray: #ababab;
  --light: #f2f2f2;
  --dark: #1a1d1a;
  --accent: #323744;
  --button: #3F6484;
  --button-hover: #2B445A;
  --tertiary: #2B445A;
}

#container {
  width: 100%;
  overflow: hidden;
  background: hsl(0, 0%, 85%);
}

#header-container {
  height: fit-content;
  user-select: none;
  transition: margin 0.3s ease;
}

#header {
  background: var(--button);
  color: var(--secondary);
  border-bottom: 1px solid transparent;
  text-align: center;
  display: flex;
  padding: 12px 100px;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

#header-container.scrolled #header {
  background: var(--secondary);
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}

#container:has(#header-container:not(.scrolled)) #nav a {
  color: var(--secondary);
}

#container:has(#header-container:not(.scrolled)) #nav a::after {
  background: var(--secondary);
}

#container:has(#header-container:not(.scrolled)) #menu svg {
  fill: var(--secondary);
}

a.icon,
div.icon {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
}

a.icon img,
div.icon img {
  width: auto;
  height: 50px;
  filter: brightness(100%);
  transition: filter 0.2s ease;
}

a.icon img.dark-icon,
div.icon img.dark-icon {
  filter: brightness(0%);
}

#title {
  font-size: 30px;
  margin-right: auto;
  letter-spacing: -1px;
  font-weight: 500;
}

#nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

#nav a,
#menubar a {
  text-decoration: none;
  font-size: 20px;
  text-decoration: none;
  color: var(--primary);
  margin-left: 10px;
  margin-right: 10px;
  padding: 10px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  border-bottom: 2px solid transparent;
  position: relative;
}

#nav a:hover,
#menubar a:hover,
#nav a.selected,
#menubar a.selected {
  background: rgba(100, 100, 100, 0.1);
}

#nav a::after,
#menubar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease, scale 0.3s ease 0.3s, background 0.3s ease;
}

#nav a:hover::after,
#menubar a:hover::after,
#nav a.selected::after,
#menubar a.selected::after {
  transform-origin: left;
  transform: scaleX(1);
  scale: 1 1.1;
}

.social {
  width: 50px;
  fill: var(--secondary);
}

#menu {
  display: none;
  align-items: center;
  justify-content: center;
}

#menu svg {
  width: 30px;
  height: 30px;
  fill: var(--primary);
  transition: all 0.3s ease;
}

#menubar,
#darken {
  display: none;
}

#divider.v {
  width: 2px;
  height: 20px;
  background: var(--gray);
}

#divider.h {
  width: 100%;
  height: 2px;
  margin-top: 10px;
  margin-bottom: 10px;
  background: var(--gray);
}

#footer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--secondary);
  color: var(--primary);
  border-top: 1px solid var(--border);
  padding: 20px;
  flex-direction: column;
  gap: 5px;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

#footer #links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#footer #links a {
  color: var(--button);
  transition: color 0.2s ease-in-out;
}

#footer #links a:hover {
  color: var(--button-hover);
}

#footer #links a.active {
  color: var(--button-hover);
}

#footer #social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#footer #social a {
  width: fit-content;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  padding: 0 10px;
  gap: 10px;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

#footer #social a:hover {
  color: var(--secondary);
  background: var(--button-hover);
}

#footer #social a div {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out, margin 0.2s ease-in-out;
}

#footer #social a svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
  transition: all 0.2s ease-in-out;
}

#footer #social a:hover svg {
  fill: var(--secondary);
}

#footer #copy {
  font-size: 15px;
  font-weight: 700;
}

.hidden {
    display: none;
}

.bold {
  font-weight: 900;
}

.light {
  background: var(--light);
  color: #000;
}

.dark {
  background: var(--dark);
  color: #fff;
}

.dark.accent {
  background: var(--accent);
}

.medium {
  background: var(--tertiary);
  color: #fff;
}

.flex {
  display: flex;
}

.flex.column {
  flex-direction: column;
}

.flex.align-center {
  align-items: center;
}

.flex.justify-center {
  justify-content: center;
}

.gap {
  gap: 10px;
}

.grid {
  display: grid;
}

.grid.auto-cols {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.width {
  min-width: max-content;
}

.margin {
  margin-top: auto;
  margin-bottom: auto;
}

#cont-title {
  font-size: 30px;
  font-weight: 900;
}

#content #cont {
  padding: 20px 100px;
  gap: 20px;
}

#content #cont #text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

#content #cont #text h1 {
  font-size: 40px;
  font-weight: 900;
  color: var(--primary);
}

#content #cont #text p {
  font-size: 20px;
}

#content #cont #text #btn {
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--header);
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#content #cont #text #btn:hover {
  background: var(--secondary);
}

#content #cont #img {
  border-radius: 40px;
  border: 2px solid var(--accent);
  height: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#content #cont #img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#services, #testimonials {
  gap: 20px;
  padding: 20px 0;
}

#our-services {
  padding: 50px 0;
}

#services #service, #testimonials #testimonial {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  gap: 20px;
  flex-direction: column;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#services {
  justify-content: center;
  flex-direction: row;
}

#services #service {
  width: 100%;
  justify-content: space-between;
}

#cont:has(#testimonials) {
  padding-left: 0;
  padding-right: 0;
}

#testimonials {
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 20px 0;
  padding-left: 10px;
  margin-top: 40px;
  margin-bottom: 40px;
}

#testimonials::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#testimonials {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#testimonials::-webkit-scrollbar {
  display: none;
}

#testimonials #testimonial {
  background: #333;
  min-width: 500px;
  min-height: 200px;
  transform: scale(1);
  transition: all 0.2s ease;
}

#testimonials #testimonial #testimonial-title {
  color: #fff;
}

#testimonials #testimonial:hover {
  transform: scale(1.1);
  background: #222;
  margin-left: 10px;
  margin-right: 10px;
}

#testimonials #testimonial p {
  color: var(--secondary);
}

#rating-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#rating-selector input {
  display: none;
}

#rating-selector label {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease-in-out;
}

#rating-selector label svg {
  width: 30px;
  height: 30px;
  fill: #ff0;
}

#rating-selector input:checked + label ~ label svg {
  fill: #ababab;
}

#services #service:nth-child(odd), #testimonials #testimonial:nth-child(even) {
  flex-direction: column-reverse;
}

#testimonials #testimonial:nth-child(odd) {
  padding-top: 20px;
}

#services #service:nth-child(even) {
  padding-bottom: 20px;
}

#services #service:not(:nth-child(even)) #img {
  margin-top: auto;
}

#services #service:nth-child(odd) #service-container, #testimonials #testimonial:nth-child(even) #testimonial-container {
  padding: 20px 20px 0;
}

#services #service #service-container, #testimonials #testimonial #testimonial-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  padding: 0 20px 20px;
}

#services #service #img, #testimonials #testimonial #img {
  width: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

#services #service-title, #testimonials #testimonial-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--primary);
}

#services #service-text, #testimonials #testimonial-text {
  font-size: 20px;
}

#cont:has(#contact) {
  display: grid;
  grid-template-columns: auto auto;
}

#cont #contact #img {
  width: auto;
  height: auto;
  max-width: 350px;
  max-height: auto;
  overflow: hidden;
}

#cont #contact #img img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

#contact-links a {
  margin-left: 20px;
  color: var(--secondary);
  text-decoration: underline;
}

@media screen and (max-width: 950px) {
  #header {
    padding: 12px 50px;
  }

  #cont:has(#contact) {
    display: flex;
    flex-direction: column;
  }

  #cont #contact #img {
    max-width: 400px;
    max-height: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  #services {
    flex-direction: column;
  }
}

@media screen and (max-width: 800px) {
  #title {
    font-size: 20px;
  }

  #header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 5px 20px;
  }

  #container {
    padding-top: 60px;
  }

  #menu {
    display: flex;
    cursor: pointer;
  }

  #nav {
    display: none;
  }

  #menubar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 70vw;
    z-index: 2;
    background: var(--secondary);
    border-left: 1px solid var(--border);
    transition: right 0.3s ease;
    user-select: none;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }

  #menubar #close {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    height: fit-content;
    padding: 10px;
  }

  #menubar #close svg {
    width: 30px;
    height: 30px;
    cursor: pointer;
  }

  #menubar #links {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 10px;
  }

  #menubar a {
    margin: 5px 0;
  }

  #menubar a::after {
    transition-duration: 0.4s;
  }

  #menubar.active {
    right: 0;
  }

  #menubar a.social svg {
    fill: currentColor;
  }

  #darken {
    display: block;
    opacity: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }

  #darken.active {
    opacity: 1;
    pointer-events: all;
  }

  #content #cont:not(:has(#testimonials)) {
    padding: 20px;
    margin: 0;
  }

  #cont #cont-title {
    padding: 0;
    text-align: center;
    font-size: 25px;
  }

  #cont #text p {
    padding: 0;
    text-align: center;
    font-size: 15px;
  }

  #content #cont #services {
    flex-direction: column;
  }

  #content #cont {
    flex-direction: column;
  }

  #content #form {
    padding: 20px;
  }

  #testimonials #testimonial {
    min-width: 200px;
  }

  #testimonials #testimonial #rating-selector {
    gap: 0;
  }

  #services #service:nth-child(odd), #testimonials #testimonial:nth-child(even) {
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 20px;
  }

  #footer {
    padding: 20px;
    padding-left: 0;
  }

  #contact-form #names {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}
