/* Variables */
:root {
  --color-main: #651316;
  --color-main-light: #C7A6A9;
  --color-secondary: #0F5840;
  --color-grey: #808080;
  --color-grey-light: #ececec;
  --color-error: var(--color-main);
  --color-success: var(--color-secondary);
  --color-overlay: rgba(0, 0, 0, .6);
  --border-radius: 5px;
  --font-text: 'Nunito', sans-serif;
  --font-title: 'Raleway', sans-serif;
  --transition: .5s ease 0s;
  --shadow: 0px 0px 4px rgba(0, 0, 0, .25);
  --shadow-bottom: 0px 4px 4px rgba(0, 0, 0, .25);
  --max-content-width: 1300px;
}

/* Reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-text);
  line-height: 1.5;
  margin: 0;
}

/* :has does not work on FF yet so there's a JS fallback */
body:has(dialog[open]),
body:has(.loader.show) {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  line-height: 1.5;
  margin: 0;
}

a {
  color: #000;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}

p {
  margin: 0;
}

small a {
  font-size: inherit;
}

button {
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  height: auto;
  max-width: 100%;
}

u {
  position: relative;
  text-decoration: none;
}

u::after {
  background-color: var(--color-secondary);
  bottom: 0;
  content: '';
  height: 50%;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 1;
}

u span {
  position: relative;
  z-index: 2;
}

/* Responsive */
.hide-mobile {
  display: none !important;
}

/* Splide */
.splide__wrapper {
  padding-bottom: 4.5rem;
}

.splide__track {
  /* So box shadows on slides are visible */
  padding-bottom: .5rem;
}

.splide__pagination {
  bottom: -4.5rem;
  display: flex;
  gap: 1.125rem;
}

.splide__pagination__page {
  background-color: #fff;
  height: 11px;
  opacity: 1;
  margin: 0;
  width: 11px;
}

.splide__pagination__page.is-active {
  background-color: var(--color-grey);
  transform: scale(1.27);
}

/* reCaptcha */
.grecaptcha-badge {
  visibility: hidden;
}

/* General */
.btn {
  background-color: var(--color-main);
  border: 0;
  border-radius: 15px;
  color: #fff;
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: .75rem 2rem;
  text-align: center;
  text-decoration: none;
}

.max-width {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max-content-width);
}

.section {
  padding: 4rem 1rem;
}

.section-title {
  color: var(--color-main);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.form__label {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 400;
}

.form__input {
  background-color: var(--color-grey-light);
  border: 0;
  border-radius: var(--border-radius);
  padding: .35rem;
  resize: vertical;
}

.form.validated .form__input:valid {
  border: 1px solid var(--color-success);
}

.form.validated .form__input:invalid {
  border: 1px solid var(--color-error);
}

.form.validated .form__input:invalid + .form__invalid-message {
  display: block;
}

.form__invalid-message {
  color: var(--color-error);
  display: none;
  font-weight: 700;
}

.form__submit {
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem;
  max-width: 100%;
  order: 1;
  width: 173px;
}

.form__captcha-message,
.form__required-message {
  order: 1;
}

/* Close icon */
.close-icon {
  display: flex;
  flex-direction: column;
  height: 1.125rem;
  justify-content: space-between;
  width: 1.125rem;
}

.close-icon__line {
  background-color: #000;
  height: .1rem;
  width: 100%;
}

.close-icon__line:first-child {
  transform: translateY(.5rem) rotate(-45deg);
}

.close-icon__line:last-child {
  transform: translateY(-.5rem) rotate(45deg);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown__toggle {
  border: 1px solid rgba(51, 51, 51, .5);
  background-color: #fff;
  padding: .5rem;
}

.dropdown__chevron {
  margin-left: .5rem;
}

.dropdown__menu {
  background-color: white;
  border-radius: 5px;
  box-shadow: var(--shadow);
  left: 0;
  opacity: 0;
  margin-top: .5rem;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 100%;
  transition: all var(--transition);
  visibility: hidden;
}

.dropdown__menu.open {
  opacity: 1;
  visibility: visible;
}

.dropdown__item {
  padding: .5rem;
  transition: background-color var(--transition);
}

.dropdown__item:hover,
.dropdown__item:focus,
.dropdown__item:focus-within {
  background-color: var(--color-grey-light);
}

/* Modals */
.modal {
  background-color: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
  flex-direction: column;
  height: 420px;
  max-height: 100%;
  max-width: 100%;
  opacity: 0;
  padding: 1.5rem;
  transition: opacity var(--transition);
  width: 643px;
}

.modal[open] {
  display: flex;
  opacity: 1;
}

.modal::backdrop {
  /* Can't use CSS variables here for some reason */
  background-color: rgba(0, 0, 0, .6);
}

.modal__header {
  border-bottom: 1px solid var(--color-main);
  display: flex;
  margin-bottom: 2rem;
  padding-bottom: .5rem;
}

.modal__title {
  color: var(--color-main);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
}

.modal__close {
  background-color: transparent;
  border: 0;
  margin-left: auto;
  padding: 0;
}

.modal__body {
  overflow: auto;
}

.modal__copy {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.modal__list {
  font-size: 1.125rem;
  list-style: disc;
  padding-left: 1rem;
}

/* Alerts */
.alert {
  align-items: center;
  background-color: #fff;
  border-left: 5px solid var(--color-success);
  border-radius: var(--border-radius);
  bottom: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  max-width: 80%;
  opacity: 0;
  padding: 1rem;
  position: fixed;
  right: 1.5rem;
  transform: translateX(80%);
  transition: all .3s;
  visibility: hidden;
  z-index: 10;
}

.alert.show {
  opacity: 1;
  transform: translateX(0);
  visibility: visible; 
}

.alert.error {
  border-color: var(--color-error);
}

.alert__close {
  background-color: transparent;
  border: 0;
  padding: 0;
}

/* Language selector */
.language-dropdown-desktop {
  display: none;
}

.language-btn {
  align-items: center;
  gap: .25rem;
  display: flex;
}

.language-link {
  align-items: center;
  display: flex;
  font-size: 1rem;
  font-weight: 400;
  gap: .25rem;
  text-decoration: none;
}

/* Loader */
.loader {
  position: fixed;
   display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background: var(--color-overlay);
  top: 0;
  left: 0;
  z-index: 999999;
  width: 100vw;
  height: 100vh;
  transition: all .3s;
  visibility: hidden;
  transition: all .3s;
}

.loader.show {
  opacity: 1;
  visibility: visible;
}

.loader span {
  display: inline-block;
}

.spinner {
  position: relative;
  width: 54px;
  height: 54px;
}
.spinner div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 44px;
  height: 44px;
  margin: 4px;
  border: 3px solid #fff;
  border-radius: 50%;
  animation: spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #fff transparent transparent transparent;
}

.spinner div:nth-child(1) {
  animation-delay: -0.45s;
}

.spinner div:nth-child(2) {
  animation-delay: -0.3s;
}

.spinner div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Top Bar */
.top-bar {
  background-color: var(--color-main);
  padding: .3rem;
  position: relative;
  text-align: center;
  z-index: 100;
}

.top-bar__content {
  color: #fff;
  font-weight: 500;
}

/* Navbar */
.skip-nav {
  background-color: #fff;
  border-bottom-right-radius: 15px;
  box-shadow: var(--shadow);
  padding: 1rem;
  position: absolute;
  text-decoration: none;
  z-index: 1000;
}

.skip-nav:not(:focus):not(:focus-within) {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.nav-main {
  position: sticky;
  top: 0;
  transition: all var(--transition);
  width: 100%;
  z-index: 10;
}

.nav-content-wrapper {
  align-items: center;
  box-shadow: var(--shadow-bottom);
  background-color: #fff;
  display: flex;
  padding: 1rem;
}

.nav-title {
  margin-right: auto;
}

.nav-logo {
  display: block;
  height: 40px;
  width: auto;
}

.nav-menu-toggle {
  background-color: #0000;
  border: 0;
  height: 2rem;
  margin-right: .5rem;
  padding: .5rem;
  width: 2rem;
}

.nav-menu-toggle__burger {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.nav-menu-toggle__burger__line {
  background-color: var(--color-grey);
  height: .1rem;
  transition: all var(--transition);
  width: 100%;
}

.nav-menu-toggle.open .nav-menu-toggle__burger__line:nth-child(1) {
  transform: translateY(.5rem) rotate(-45deg);
}

.nav-menu-toggle.open .nav-menu-toggle__burger__line:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle.open .nav-menu-toggle__burger__line:nth-child(3) {
  transform: translateY(-.4rem) rotate(45deg);
}

.nav-content {
  align-items: center;
  display: flex;
  flex: 1;
}

.nav-menu {
  align-items: center;
  display: flex;
}

.nav-menu--desktop {
  display: none;
}

.nav-menu--mobile {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 4rem 1rem;
}

.nav-menu-mobile-wrapper {
  background-color: #fff;
  left: 0;
  position: absolute;
  right: 0;
  transform: translateY(-100%);
  transition: all var(--transition);
  z-index: -1;
}

.nav-menu-mobile-wrapper.open {
  box-shadow: var(--shadow-bottom);
  transform: translateY(0);
}

.nav-menu__link {
  color: var(--color-main);
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 7000;
  text-decoration: none;
}

/* Home */
/* Header */
.home-header {
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  display: flex;
  justify-content: center;
  min-height: 714px;
  padding-bottom: 188px;
}

.home-header__content {
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

/* Products */
.section--products {
  text-align: center;
}

.products__list {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 3.5rem;
}

.products__btn {
  align-items: center;
  background-color: var(--color-main);
  border: 0;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.products__btn::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.products__label {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.products__img {
  bottom: 0;
  display: block;
  position: absolute;
  width: 100%;
}

/* Origin Countries */
.section--origin-countries {
  background-color: var(--color-grey-light);
}

.section--origin-countries .section-title {
  color: #000;
}

.country-slide {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-bottom);
  height: 100%;
  padding: 3rem 2rem;
}

.country-slide__header {
  align-items: center;
  display: flex;
  margin-bottom: 1.5rem;
}

.country-slide__img {
  margin-right: 1rem;
  width: 53px;
}

.country-slide__title {
  font-size: 1rem;
  font-weight: 700;
}

.country-slide__contact {
  display: flex;
  gap: 1rem;
}

.country-slide__contact:last-child {
  margin-top: auto;
}

.country-slide__contact:not(:last-child) {
  margin-bottom: 1.25rem;
}

.country-slide__data {
  color: inherit;
  text-decoration: none;
}

/* Destination Countries */
.section--destination-countries {
  background-color: var(--color-main);
  background-position: center;
  background-size: cover;
}

.section--destination-countries .section-title {
  color: #fff;
  min-height: 705px;
}

/* Articles */
.section--articles {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

.section--articles .section-title {
  color: #000;
  grid-area: title;
}

.section--articles .article:first-child .splide {
  margin-bottom: 2.5rem;
}

.section--articles .article:not(:first-child) .splide {
  margin-bottom: 4rem;
}

.section--articles .article:not(:first-child) .splide__track {
  padding-bottom: 2.5rem;
}

.section--articles .splide__pagination {
  bottom: 0;
}

.section--articles .splide__pagination__page:not(.is-active) {
  background-color: var(--color-grey-light);
}

.articles__list {
  display: grid;
  gap: 5rem;
  margin-bottom: 5rem;
}

.article__title {
  margin-bottom: 2.5rem;
  text-align: center;
}

.article__img {
  display: block;
  width: 100%;
}

.articles__quote {
  display: block;
  font-size: 1.125rem;
  font-style: italic;
  font-weight: 700;
  text-align: center;
}

/* Us */
.section--us {
  background-color: var(--color-grey-light);
}

.section--us .section-title {
  color: #000;
}

.us__copy {
  font-size: 1.125rem;
  margin-bottom: 4rem;
  text-align: center;
}

.us__list {
  display: grid;
  gap: 2.25rem; 
}

.us__item {
  column-gap: 2.25rem; 
  display: grid;
  grid-template-areas: 'img name' 'img position';
  grid-template-columns: 45fr 54fr;
  grid-template-rows: repeat(2, auto);
}

.us__img {
  grid-area: img;
}

.us__name {
  align-self: end;
  grid-area: name;
}

.us__position {
  align-self: start;
  grid-area: position;
}

/* Contact */
.section--contact {
  background-position: center;
  background-size: cover;
}

.section--contact .section-title {
  color: #000;
  margin-bottom: .5rem;
}

.section--contact .section-subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact__form {
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: 2.5rem 2.25rem;
}

/* Footer */
.footer-main {
  background-color: var(--color-main);
  padding: 5rem 2rem;
}

.footer__content {
  color: #fff;
  text-align: center;
}

.footer__locations,
.footer__links {
  display: grid;
  gap: 2rem;
}

.footer__links {
  margin-bottom: 2rem;
}

.footer__link {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.footer__locations {
  margin-bottom: 4rem;
}

.footer__location {
  display: grid;
}

.footer__location:first-child {
  display: none;
}

.footer__logo {
  opacity: .5;
}

/* Nav menu breakpoint */
@media screen and (min-width: 948px) {
  .nav-menu-toggle {
    display: none;
  }

  .nav-menu--mobile {
    display: none;
  }

  .nav-menu--desktop {
    display: flex;
    gap: 6rem;
    margin-right: 6rem;
  }

  .nav-menu__link {
    color: #000;
    font-weight: 500;
  }

  .language-dropdown-desktop {
    display: block;
    margin-left: 3rem;
  }
}

/* Tablet breakpoint */
@media screen and (min-width: 769px) {
  /* Responsive */
  .hide-mobile {
    display: block !important;
  }

  .hide-desk {
    display: none !important;
  }

  /* Sections */
  .section {
    padding-bottom: 7.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 6rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
  
  /* Home header */
  .home-header__content {
    font-size: 3.125rem;
  }

  /* Products */
  .products__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  /* Articles */
  .section--articles .section-title {
    margin-bottom: 2rem;
  }

  .section--articles .article:first-child .splide,
  .section--articles .article:not(:first-child) .splide {
    margin-bottom: 3.5rem;
  }

  .section--articles .article:not(:first-child) .splide__list {
    display: grid;
    gap: 1.25rem;
    grid-template-areas: 'big small1' 'big small2';
    grid-template-columns: 5fr 3fr;
    grid-template-rows: repeat(2, 1fr);
  }

  .section--articles .article:not(:first-child) .splide__slide:first-child {
    grid-area: big;
  }

  .section--articles .article:nth-child(2n + 1) .splide__list {
    grid-template-areas: 'small1 big' 'small2 big';
    grid-template-columns: 3fr 5fr;
  }

  .section--articles .article:nth-child(2n + 1) .splide__slide:first-child {
    grid-area: small1;
  }

  .section--articles .article:nth-child(2n + 1) .splide__slide:nth-child(2) {
    grid-area: big;
  }

  .section--articles .article:nth-child(2n + 1) .splide__slide:nth-child(3) {
    grid-area: small2;
  }

  .section--articles .splide__track {
    padding-bottom: 0;
  }

  .articles__list {
    gap: 4rem;
    margin-bottom: 4rem;
  }

  .article__copy {
    font-size: 1.125rem;
  }

  /* Us */
  .us__list {
    grid-template-columns: repeat(3, 1fr);
  }

  .us__item {
    grid-template-areas: 'img' 'name' 'position';
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-self: center;
  }

  .us__img {
    margin-bottom: .75rem;
  }

  .us__name {
    font-size: 1.5rem;
  }

  /* Contact */
  .contact__form {
    margin: 0 auto;
    max-width: 686px;
  }

  /* Footer */
  .footer__content {
    display: grid;
    column-gap: 3.5rem;
    grid-template-areas: 'nav  locations' 'logo locations';
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    padding: 4.5rem 2rem;
  }

  .footer-nav {
    grid-area: nav;
  }

  .footer__links {
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    margin-bottom: 0;
    text-align: left;
  }

  .footer__item:last-child {
    display: none;
  }

  .footer__locations {
    grid-area: locations;
    margin-bottom: 0;
    text-align: left;
  }

  .footer__location:first-child {
    display: block;
  }

  .footer__location {
    display: block;
  }

  .footer__logo {
    align-self: end;
    grid-area: logo;
  }
}

/* Desktop breakpoint */
@media screen and (min-width: 1024px) {
  /* Origin Countries */
  .section--origin-countries .splide__track {
    display: flex;
    justify-content: center;
  }
  
  .section--origin-countries .splide.is-initialized:not(.is-active) .splide__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    max-width: var(--max-content-width);
  }

  .section--origin-countries .splide__slide {
    flex-basis: 32%;
  }
}