:root {
  --background-gradient-start: #f4e4d5;
  --background-gradient-end: #f7efe4;
  --orange: #e9723d;
  --dark: #473f2f;
  --light-orange: #d0a491;
  --light-gray: #e8dcce;
}

html {
    background: linear-gradient(100deg, var(--background-gradient-start), var(--background-gradient-end)) no-repeat fixed;
}

body {
  max-width: 1200px;
  margin: 0 auto;
  font-family: sans-serif;
  padding-bottom: 50vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 80px;
}

nav ul {
  display: flex;
  justify-content: end;
  gap: 32px;
  flex-wrap: wrap;
  padding-left: 40px;
  margin: 0;
}

nav li {
  list-style-type: none;
  padding-bottom: 4px;
  text-align: right;
}

nav li:hover {
  border-bottom: 3px solid var(--dark);
}

nav li.current {
  border-bottom: 3px solid var(--orange);
}

nav li a {
  color: var(--dark);
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
}

.hero {
  width: 100%;
  border-bottom: 3px solid var(--dark);
  display: flex;
  align-items: center;
  height: 470px;
  position: relative;
}

.hero-bg {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: auto;
  z-index: -1;
}

.hero-photo {
  margin-left: 180px;
  height: 100%;
  object-fit: contain;
}

.hero-content {
  display: flex;
  margin-left: auto;
}

.hero-acolade {
  height: 100%;
  width: auto;
  margin-top: 20px;
  margin-bottom: 20px;
}

.hero-text {
  flex: 1;
  width: 400px;
  margin-left: 65px;
  margin-right: 90px;
}

.hero-title {
  font-size: 1em;
  font-weight: bold;
  font-family: serif;
  margin: 0 0 20px 0;
  line-height: 1.1;
}

.hero-title-dark {
  font-size: 6em;
  color: var(--dark);
}

.hero-title-orange {
  font-size: 4em;
  color: var(--orange);
}

.hero-description {
  color: var(--dark);
  font-size: 1.4em;
  line-height: 1.6;
  margin: 10px;
  text-align: justify;
}

.cards {
  display: flex;
  padding-top: 45px;
  padding-bottom: 45px;
  border-bottom: 3px solid var(--dark);
}

.card {
  flex: 1;
  margin: 20px 70px;
}

.divider {
  width: 2px;
  background-color: var(--light-gray);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-icon {
  width: 60px;
}

.card-title {
  font-size: 1.8em;
  font-family: serif;
  font-weight: bold;
  color: var(--dark);
  margin: 0;
  line-height: 1;
}

.card-description {
  margin-top: 25px;
  margin-left: 5px;
  margin-right: 5px;
  font-size: 1.1em;
  color: var(--dark);
  line-height: 1.5;
}

.card-link {
  display: block;
  margin-top: 25px;
  margin-left: 5px;
  font-size: 1em;
  color: var(--light-orange);
  text-decoration: none;
}

.quote-section {
  margin-top: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-mark {
  width: 40px;
  height: auto;
}

.quote-mark-top {
  align-self: flex-start;
}

.quote-mark-bottom {
  align-self: flex-end;
}

.quote-container {
  flex: 1;
  max-width: 800px;
  position: relative;
  height: 120px;
}

.quote-text {
  font-family: serif;
  font-style: italic;
  font-size: 1.7em;
  margin: 15px 40px;
  text-align: center;
  max-width: 800px;
  line-height: 1.6;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateX(50px);
  --quote-time: 5s;
  --cycle-duration: calc(var(--quote-count) * var(--quote-time));
  animation-duration: var(--cycle-duration);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: calc(var(--cycle-duration) * (-1 + var(--index) / var(--quote-count)));
}

/* Hide quotes beyond what is supported */
.quote-text:nth-child(n+6) {
  display: none;
}

/* One slide: show it without animating */
.quote-container > .quote-text:only-child {
  opacity: 1;
  transform: translateX(0);
}

/* Two slides */
.quote-container:has(> .quote-text:nth-child(2):last-child) {
  --quote-count: 2;
}

.quote-container:has(> .quote-text:nth-child(2):last-child) > .quote-text {
  animation-name: two-cycle;
}

@keyframes two-cycle {
  0% { opacity: 1; transform: translateX(0); }
  45%  { opacity: 1; transform: translateX(0); }
  50%  { opacity: 0; transform: translateX(-50px); }
  95% { opacity: 0; transform: translateX(50px); }
  100%  { opacity: 1; transform: translateX(0); }
}

/* Three slides */
.quote-container:has(> .quote-text:nth-child(3):last-child) {
  --quote-count: 3;
}

.quote-container:has(> .quote-text:nth-child(3):last-child) > .quote-text {
  animation-name: three-cycle;
}

@keyframes three-cycle {
  0% { opacity: 1; transform: translateX(0); }
  30.33%  { opacity: 1; transform: translateX(0); }
  33.33%  { opacity: 0; transform: translateX(-50px); }
  97% { opacity: 0; transform: translateX(50px); }
  100%  { opacity: 1; transform: translateX(0); }
}

/* Four slides */
.quote-container:has(> .quote-text:nth-child(4):last-child) {
  --quote-count: 4;
}

.quote-container:has(> .quote-text:nth-child(4):last-child) > .quote-text {
  animation-name: four-cycle;
}

@keyframes four-cycle {
  0% { opacity: 1; transform: translateX(0); }
  23%  { opacity: 1; transform: translateX(0); }
  25%  { opacity: 0; transform: translateX(-50px); }
  98% { opacity: 0; transform: translateX(50px); }
  100%  { opacity: 1; transform: translateX(0); }
}

/* Five slides */
.quote-container:has(> .quote-text:nth-child(5):last-child) {
  --quote-count: 5;
}

.quote-container:has(> .quote-text:nth-child(5):last-child) > .quote-text {
  animation-name: five-cycle;
}

@keyframes five-cycle {
  0% { opacity: 1; transform: translateX(0); }
  18%  { opacity: 1; transform: translateX(0); }
  20%  { opacity: 0; transform: translateX(-50px); }
  98% { opacity: 0; transform: translateX(50px); }
  100%  { opacity: 1; transform: translateX(0); }
}

.footer-decoration {
  display: block;
  width: 200px;
  margin: 35px auto 0;
}
