:root {
  --fs-sm: clamp(0.8rem, 0.08vi + 0.78rem, 0.84rem);
  --fs-base: clamp(1rem, 0.23vi + 0.94rem, 1.13rem);
  --fs-md: clamp(1.25rem, 0.45vi + 1.14rem, 1.5rem);
  /*h4*/
  --fs-lg: clamp(1.56rem, 0.79vi + 1.36rem, 2rem);
  /*h3*/
  --fs-xl: clamp(1.95rem, 1.29vi + 1.63rem, 2.66rem);
  /*h2*/
  --fs-xxl: clamp(2.44rem, 2.02vi + 1.94rem, 3.55rem);
  /*h1*/
  --fs-xxxl: clamp(3.05rem, 3.06vi + 2.29rem, 4.73rem);


  --GREEN: #139c98;
  --WHITE: #FFFFFF;
  --BLACK: #000000;
  --DARK: #5E5D5B;
  --LIGHT_YELLOW: #EFEFE5;
}


.grid_container {
  display: grid;
  grid-template-columns: 1fr;

  @media screen and (min-width:1024px) {
    grid-template-columns: 400px 1fr;
  }

  gap: 3rem;

  h2 {
    font-size: var(--fs-lg);
    font-weight: bold;
    color: var(--DARK);
    padding-bottom: 0;
  }
}

.grid-rows {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 3rem;
}

.grid_container-comercios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  @media screen and (min-width:768px) {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  gap: 2rem;

  .not-found {
    grid-column: 1 /span 4;
    justify-self: center;
  }
}

.list_container-comercios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  height: 100%;
  overflow-y: auto;

  img {
    display: none;
  }

  .card {
    text-align: left;
  }

  .not-found {
    grid-column: 1 /span 4;
    justify-self: center;
  }
}

.filters_controls {
  background-color: #d7d1c3;
  padding: 2rem;

  display: flex;
  flex-wrap: wrap;
  /* permite responsividad */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  @media (max-width: 768px) {
    width: 85vw;
    flex-direction: column;
    align-items: stretch;
  }
}


.filters_controls form:is(input, select) {
  padding: 0.5rem 1.2rem;
  border: 0.5px solid var(--DARK);
  font-size: var(--fs-base);
  width: auto;
  /* evita que ocupe 100% del contenedor */
  min-width: 180px;
}

.filters_controls form:is(select) {
  background-color: transparent;
  border: 2px solid var(--WHITE);
  appearance: none;
}

.filters_controls .custom-select {
  position: relative;
}

.filters_controls .custom-select #select_category {
  border: none;
  background: transparent;
  width: 370px;

  @media (max-width: 900px) {
    width: 73vw;
  }

  @media (max-width: 768px) {
    width: 65vw;
  }

  @media (max-width: 400px) {
    width: 60vw;
  }
}

.filters_controls .custom-select::after {
  content: '\f543';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-family: "Dashicons";
  display: none;
}

.search {
  background-color: #e2dccc;
  /* mismo fondo beige claro */
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  width: 400px;

  @media (max-width: 768px) {
    width: 100%;
  }
  @media (max-width: 900px) {
    width: 100%;
  }
}

.search input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.125rem;
  color: #2a3440;
  font-family: 'Termina-Regular', sans-serif;
  outline: none;
  width: 370px;

  @media (max-width: 900px) {
    width: 73vw;
  }

  @media (max-width: 768px) {
    width: 60vw;
  }

  @media (max-width: 400px) {
    width: 50vw;
  }
}

.search input[type="text"]::placeholder {
  color: rgba(42, 52, 64, 0.5);
}

.search svg {
  width: 24px;
  height: 24px;
  fill: #2a3440;
  flex-shrink: 0;
}

.filters_controls h2 {
  font-size: var(--fs-lg);
  font-weight: bold;
  color: var(--DARK);
  padding-bottom: 0;
  margin: 0;

  @media (max-width: 768px) {
    text-align: center;
  }
}


.filter_controls {
  background-color: var(--LIGHT_YELLOW);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  justify-content: center;

  form :is(input, select) {
    padding: .5rem 1.2rem;
    width: 100%;
    border: .5px solid var(--DARK);
    font-size: var(--fs-base);
  }

  form :is(select) {
    border: 2px solid var(--WHITE);
    background-color: transparent;
    appearance: none;
  }

  .custom-select {
    position: relative;

    @media (max-width: 768px) {
      width: 100%;
    }
  }

  .custom-select::after {
    content: '\f543';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-family: "Dashicons";
  }

  .search {
    position: relative;

    svg {
      position: absolute;
      right: 1rem;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}

.view {

  .btn_view {
    background-color: transparent;
    border: none;
    padding: 0 1.2rem;
    cursor: pointer;
    font-size: 18px;
    color: #2A3440;
    font-weight: lighter;

    &:active {
      font-weight: bold;
    }
  }

  .btn_view:first-child {
    border-right: 2px solid;
    padding-left: 0;
  }

  @media (max-width: 400px) {
    .btn_view:first-child {
      width: 32vw;
    }
    #btn_grid {
      width: 32vw;
    }
  }

  @media (max-width: 768px) {
    display: flex;

    .btn_view:first-child {
      width: 35vw;
    }
    #btn_grid {
      width: 35vw;
    }
  }

  @media (max-width: 900px) {
    width: 100%;
    text-align: center;

    .btn_view:first-child {
      width: 35vw;
    }
    #btn_grid {
      width: 35vw;
    }
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animation__detalle {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card {
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;

  img {
    margin-bottom: 1rem;
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out;

    @media screen and (min-width: 891px) {
      margin-bottom: 2rem;
    }
  }

  h4 {
    padding-bottom: 0;
    font-family: 'Termina-Regular', sans-serif;
  }

  a {
    color: #2A3440;
    border-radius: 100%;
    padding: 5px 7px;

    &:hover {
      color: #fff;
      background-color: #2A3440;
    }
  }

  &:hover img {
    filter: none;
  }

  @media (max-width: 768px) {
    width: 30vw;
    justify-self: center;
  }
}


/*GASTRONOMIA*/
.grid-gastronomy {
  h4 {
    font-size: 16px;
    font-weight: bold;
    color: #2A3440;
  }

  p {
    color: #2A3440;
  }


}

.show {
  opacity: 1;
  transform: translateY(0);
}

.active_view {
  font-weight: bold;
}



/*EVENTOS*/
.events_grid {
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;

  p {
    color: var(--DARK);
    font-size: var(--fs-base);
  }

  h3 {
    color: var(--DARK);
    font-size: var(--fs-md);
    font-weight: bold;
  }
}

.event {
  img {
    border: 1px solid var(--LIGHT_YELLOW);
    border-radius: 1rem;
    overflow: hidden;
  }

  .footer_link {
    text-align: center;
    margin-top: 1rem;
  }
}

.pagination {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  border-top: 1px solid var(--DARK);
  padding-top: .5rem;

  button {
    background-color: transparent;
    border: 0;
    cursor: pointer;
    color: var(--DARK);
  }

  span:first-of-type {
    margin-right: .3rem;
    line-height: inherit;
  }

  span:last-of-type {
    margin-left: .3rem;
    line-height: inherit;
  }
}