:root {
  --primary-color: rgb(172, 106, 70);
  --white: rgb(255, 255, 255);
  --black: rgb(0, 0, 0);
  --light-black: rgb(43, 43, 43);
  --light-gold: rgb(214, 169, 93);
}

html {
  box-sizing: border-box;
  font-family: sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
  transition: 300ms ease;
  display: inline-block;
  color: var(--white);
}

button {
  background-color: transparent;
  border: thin solid var(--black);
  padding: 0.5rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 300ms ease;
  display: block;
  color: var(--black);
}

img {
  /* Para que no se pueda seleccionar ni arrastrar ni copiar */
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

li {
  list-style: none;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: Lora, sans-serif;
  overflow-x: hidden;
}

.button {
  min-width: 12rem;
  /* height: 3.5rem; */
  font-size: 1rem;
  padding: 1rem 2rem;
  background: transparent;
  text-transform: uppercase;
  color: var(--light-gold);
  outline: 2px solid var(--light-gold);
  display: flex;
  justify-content: center;
  align-items: center;

  &:hover {
    background: var(--light-gold);
    transform: translateY(-5px);
    color: var(--white);
    outline: 2px solid var(--light-gold);
  }
}

.subtitle-style {
  font-size: 3rem;
  text-align: center;
  font-family: Playfair Display, serif;
  font-weight: 800;
  color: var(--black);
}

.paragraph-style {
  font-size: 1.2rem;
  text-align: center;
  color: var(--light-black);
  font-weight: 400;
  font-family: Lora, serif;
}

.nav-bar-container {
  position: fixed;
  top: 0;
  z-index: 2;
}

.nav-bar {
  width: 100vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 1rem;
  background: transparent;
  box-sizing: border-box;
  column-gap: 1rem;
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.5s ease, background-color 0.5s ease;

  & div:first-child {
    display: flex;
    justify-content: center;
  }

  & img {
    max-width: 12rem;
    height: auto;
    transition: max-width 0.4s ease;
  }
}

.nav-links {
  display: flex;
  justify-content: center;

  & ul {
    display: flex;
    gap: 3rem;
  }

  & li a {
    font-size: 1.1rem;
    color: var(--white);
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0);
    transition: font-size 0.3s ease, border-bottom 0.5s ease,
      transform 0.4s ease;
    display: inline-block;

    &:hover {
      border-bottom: 2px solid rgb(255, 255, 255);
      transform: scale(1.1);
    }
  }
}

/* Clase para animacion donde navegadores no soportan aun las propiedades animation-timeline */
.nav-bar.scrolled {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  transition: backdrop-filter 0.5s ease, background-color 0.5s ease;

  & img {
    max-width: 11rem;
    transition: max-width 0.4s ease;
  }

  & li a {
    font-size: 1rem;
    transition: font-size 0.3s ease, border-bottom 0.5s ease,
      transform 0.4s ease;
  }
}

.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.hero-container {
  position: relative;
  background: url("./images/hero-background.jpg"), rgba(0, 0, 0, 0.6);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Este atributo determina como los fondos se pueden mezclar con sus colores   */
  background-blend-mode: multiply;
  min-height: 100vh;
  z-index: 1;
  color: var(--white);
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
}

.hero {
  max-width: 64rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;

  & p {
    font-size: 1.2rem;
    text-align: center;
    color: white;
    font-weight: 400;
    font-family: Lora, serif;
  }
}

.hero-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  & h2 {
    font-size: 3rem;
    text-align: center;
    font-family: Great Vibes, serif;
    letter-spacing: 6px;
    font-weight: 400;
    color: var(--light-gold);
  }

  & h1 {
    font-size: 4rem;
    text-align: center;
    font-family: Playfair Display, serif;
    color: white;
  }
}

.hero-footer {
  & a {
    font-size: 1.5rem;
    background: transparent;
    text-transform: uppercase;
    outline: 2px solid var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;

    &:hover {
      background: var(--light-gold);
      transform: translateY(-5px);
      color: var(--white);
      outline: 2px solid var(--light-gold);
    }
  }
}

.products-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
}

.products {
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 4rem 2rem;
  animation: fade-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 40%;
}

.products-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;

  & p {
    width: 75%;
  }
}

.products-list {
  display: flex;
  gap: 2rem;
}

.product-item {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  align-items: center;
  flex: 1;
  gap: 1rem;

  & header {
    width: 100%;
    height: 250px;
    overflow: hidden;
  }

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  & h3 {
    font-size: 1.5rem;
    text-align: center;
    font-family: Playfair Display, serif;
    text-transform: capitalize;
    color: var(--light-gold);
  }

  & p {
    width: 95%;
    font-size: 1rem;
    text-align: center;
    color: var(--light-black);
    font-weight: 400;
    font-family: Lora, serif;
  }
}

.events-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
}

.events {
  max-width: 90rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  gap: 4rem;

  animation: fade-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 40%;
}

.events-list {
  position: relative;
  display: flex;
  gap: 4rem;
  height: 60%;
}

.event-item {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
  overflow: hidden;
  transition: transform 0.3s ease;

  & img {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
  }

  & p {
    font-size: 2rem;
    text-align: center;
    font-family: Great Vibes, serif;
    text-transform: capitalize;
    font-weight: 500;
    color: var(--black);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  &:hover {
    transform: translateY(-40px);
    cursor: pointer;
  }

  &:hover p {
    opacity: 1;
    visibility: visible;
  }
}

.item-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  width: 25rem;
  padding: 1.5rem;
  animation: show-modal 0.5s ease;

  & header {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 1rem;
  }

  & header img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  &::backdrop {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
  }
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  & h3 {
    font-size: 1.5rem;
    text-align: center;
    font-family: Great Vibes, serif;
    text-transform: capitalize;
    color: var(--black);
    font-weight: 500;
  }

  & p {
    font-size: 1rem;
    text-align: center;
    font-family: Lora, serif;
    color: var(--black);
  }

  & p:nth-of-type(1) {
    color: var(--light-gold);
  }

  & p:nth-of-type(2) {
    font-size: 0.9rem;
  }
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;

  & a:nth-of-type(1) {
    font-size: 0.8rem;
    width: 10.5rem;
    height: 2.5rem;
    color: var(--light-gold);
    outline: 2px solid var(--light-gold);

    &:hover {
      color: var(--white);
      background: var(--light-gold);
    }
  }
}

.close-modal {
  width: 10.5rem;
  height: 2.5rem;
  color: var(--black);
  text-transform: uppercase;
  outline: 2px solid var(--black);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;

  &:hover {
    background: var(--black);
    color: var(--white);
    transform: translateY(-5px);
  }
}

.gallery-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
}

.gallery {
  max-width: 90rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 4rem 2rem;

  animation: fade-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 40%;
}

.gallery-content {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 20rem;
}

.image-container {
  position: relative;
  z-index: 0;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    outline: 2px solid var(--white);
    transition: transform 0.4s ease;
  }

  &:hover {
    z-index: 1;
  }

  &:hover img {
    transform: scale(1.1);
  }
}

.menu-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
}

.menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 4rem 2rem;
  max-width: 85rem;

  animation: fade-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 40%;

  & .paragraph-style {
    width: 75%;
  }
}

.menu-content {
  display: flex;
  gap: 4rem;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;

  & header h3 {
    font-size: 1.5rem;
    text-align: center;
    font-family: Playfair Display, serif;
    text-transform: uppercase;
    color: var(--light-black);
  }
}

.menu-section-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.menu-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;

  & div:first-of-type {
    display: flex;
    justify-content: space-between;
  }

  & div h4 {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--light-black);
  }

  & div p {
    color: var(--light-gold);
    font-weight: 600;
  }

  & p {
    font-size: 0.9rem;
    color: var(--primary-color);
  }
}

.contact-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
}

.contact {
  display: flex;
  flex-direction: column;
  max-width: 55rem;
  gap: 4rem;
  padding: 4rem 2rem;

  animation: fade-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 40%;
}

.contact-content {
  display: flex;
  box-shadow: 0px 0px 25px 15px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;

  & div h3 {
    font-size: 1.1rem;
    font-family: Lora, serif;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 600;
  }

  & p {
    font-size: 0.9rem;
    font-family: Lora, serif;
    font-weight: 400;
  }
}

.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  & img {
    width: 1.5rem;
  }
}

.contact-map {
  width: 90%;
  margin-inline: auto;
  aspect-ratio: 1/1;

  & iframe {
    width: 100%;
    height: 100%;
  }
}

.contact-footer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-container {
  background: var(--light-black);
  display: flex;
  flex-direction: column;
}

.footer {
  display: flex;
  justify-content: space-around;
  padding: 2rem;
  color: var(--white);

  & img {
    max-width: 12rem;
    height: auto;
  }

  & h4 {
    font-size: 1.2rem;
    font-family: Playfair Display, serif;
    text-transform: uppercase;
    font-weight: 600;
  }
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;

  & img {
    width: 1.5rem;
  }

  & i {
    font-size: 1.3rem;
  }
}

.footer-copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--black);
  color: var(--white);
}

@keyframes blur-nav-bar {
  to {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }
}

@keyframes small-nav-items {
  to {
    font-size: 1rem;
  }
}

@keyframes small-image {
  to {
    max-width: 11rem;
  }
}

@keyframes show-modal {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animacion para navegadores que soporten propiedades animation-timeline, range */
@supports (animation-timeline: scroll()) {
  .nav-bar {
    animation: blur-nav-bar linear both;
    animation-timeline: scroll(root);
    animation-range: 10rem 20rem;

    & img {
      animation: small-image linear both;
      animation-timeline: scroll(root);
      animation-range: 10rem 20rem;
    }

    & li a {
      animation: small-nav-items linear both;
      animation-timeline: scroll(root);
      animation-range: 10rem 20rem;
    }
  }
}

@media (max-width: 64rem) {
  html {
    font-size: 13px;
  }

  .nav-bar ul {
    gap: 2rem;
  }

  .gallery-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 48rem) {
  html {
    font-size: 12px;
  }

  .hamburger {
    display: block;
    padding: 1.5rem;
  }

  .nav-bar {
    & div:first-child {
      order: 2;
    }
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 10;
  }

  .nav-links.open {
    left: 0;
  }

  .nav-links ul {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    width: 100%;
  }

  .nav-links li a {
    font-size: 1.7rem;
    animation: none !important;
  }

  .hero-header {
    & h2 {
      font-size: 2rem;
    }

    & h1 {
      font-size: 3rem;
    }
  }

  .products {
    max-width: 45rem;
  }

  .products-header {
    & p {
      width: 100%;
    }
  }

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

  .events {
    max-width: 35rem;
  }

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

  .event-item {
    & p {
      visibility: visible;
      opacity: 1;
    }
  }

  .gallery {
    max-width: 35rem;
  }

  .gallery-content {
    grid-template-columns: repeat(1, 1fr);
  }

  .menu {
    gap: 3rem;
    max-width: 45rem;
    & .paragraph-style {
      width: 100%;
    }
  }

  .menu-content {
    gap: 3rem;
    flex-direction: column;
  }

  .contact {
    max-width: 45rem;
    justify-content: center;
    align-items: center;
  }

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

  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer {
    flex-direction: column;
    gap: 2rem;
  }
}
