@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
  font-family: 'Poppins', serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
}

* {
  box-sizing: border-box;
}

h1 {
  margin: 0;
}

a {
  text-decoration: none;
  color: black;
}

ul {
  padding: 0;
  margin: 0;
}

li {
  list-style: none;
}

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

.text-semi-bold {
  font-weight: 600;
}

/* MENU */

header nav {
  max-width: 1600px;
  margin: 1rem auto 1rem auto;
  width: 100%;
  padding: 0 1rem;
}

header .dropdownmenu .logo-header {
  width: 7em;
  padding: 0;
  & svg {
    width: 100%;
    height: auto;
    padding: 0;
  }
}

.dropdownmenu {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdownmenu ul,
.dropdownmenu li {
  margin: 0;
  padding: 0;
}
.dropdownmenu ul {
  display: flex;
  list-style: none;
  gap: 1rem;
}
.dropdownmenu li {
  position: relative;
  width: auto;
}
.dropdownmenu a {
  display: block;
  font: bold 12px/20px sans-serif;
  padding: 10px 25px;
  text-align: center;
  text-decoration: none;
  -webkit-transition: all 0.25s ease;
  -moz-transition: all 0.25s ease;
  -ms-transition: all 0.25s ease;
  -o-transition: all 0.25s ease;
  transition: all 0.25s ease;
}

.dropdownmenu ul a {
  background-color: #ebf5f2;
  border-radius: 999999px;
}

.dropdownmenu .home {
  background-color: #8eecde;
}

.dropdownmenu .submenu-phater {
  padding-right: 3rem;
  display: flex;
  gap: 0.5rem;
  padding-right: 1rem !important;
  display: flex;
  align-items: center;
}

.dropdownmenu .submenu-phater svg {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1) rotate(180deg);
  width: 1rem;
}

.dropdownmenu .active .submenu-phater svg {
  transform: scale(1.1) rotate(0deg);
}

/* .dropdownmenu .submenu-phater::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #2c2e3a;
  border-radius: 9999px;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.dropdownmenu .active .submenu-phater::after {
  transform: translateY(-50%) scale(0.5);
  border: 5px solid white;
}
 */
.dropdownmenu .active a {
  background: #2c2e3a;
  overflow: hidden;
  color: white;
}

.dropdownmenu li:hover a {
  background: #2c2e3a;
  overflow: hidden;
  color: white;
}
#submenu {
  opacity: 0;
  position: absolute;
  top: 35px;
  visibility: hidden;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
}

#submenu ul {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  margin-top: 1rem;
  width: 200px;
  box-shadow: 0px 0px 20px 0px rgba(10, 5, 35, 0.1);
  gap: 0;
}

.active #submenu {
  opacity: 1;
  visibility: visible;
}

#submenu li:nth-child(1) a {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
#submenu li:nth-last-child(1) a {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

#submenu a:hover {
  background: #4b4c4e;
  color: #fff;
}
#submenu a {
  background-color: transparent;
  color: #2c2e3a;
  padding: 0;
  text-align: left;
  border-radius: 0;
  padding: 1rem 1rem;
  overflow: hidden;
}

.menu-icon {
  display: none;
}

@media (max-width: 1000px) {
  .menu-mobile {
    display: block;
    cursor: pointer;
    width: 80px;
    text-align: center;
    margin: 0;
  }

  .menu-content {
    position: relative;
  }

  .dropdownmenu ul {
    flex-direction: column;
    height: 0;
    overflow: hidden;
    interpolate-size: allow-keywords;
    position: absolute;
    background-color: white;
    width: 300px;
    transition: height 0.3s;
    right: 0;
    border-radius: 8px;
    box-shadow: 0px 0px 20px 0px rgba(10, 5, 35, 0.1);
  }

  .dropdownmenu ul li:nth-child(1) a {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding-top: 2rem;
  }
  .dropdownmenu ul li:nth-last-child(1) a {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding-bottom: 2rem;
  }

  .dropdownmenu .active-mobile > ul {
    height: auto;
    overflow: visible;
    gap: 0;
    z-index: 999999;
  }

  .dropdownmenu ul a {
    background-color: transparent;
    border-radius: 0;
    text-align: left;
    font-size: 15px;
    padding: 20px 35px;
  }

  .menu-mobile {
    display: block;
    cursor: pointer;
    width: 80px;
    text-align: center;
    margin: 0;
  }

  .active ul {
    height: auto;
    overflow: visible;
  }

  #submenu {
    top: 90%;
    left: 100%;
  }
  #submenu ul {
    margin-top: 0;
    width: 250px;
  }
  #submenu ul a {
    padding: 20px 35px;
  }

  .menu-icon {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    background-color: #ebf5f2;
    padding: 7px;
    border-radius: 99999px;

    & svg {
      width: 40px;
      height: 40px;
      padding: 0.7em;
      background-color: #8eecde;
      border-radius: 999999px;
      transform: rotate(45deg);
      transition: transform 0.3s;
    }
  }

  .active-mobile .menu-icon svg {
    transform: rotate(180deg);
  }
}

/* OBRAS */

.container-grid {
  display: grid;
  max-width: 1600px;
  width: 100%;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto;
  grid-template-areas: 'sidebar main';
  column-gap: 2em;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .container-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: 'sidebar' 'main';
  }
}

.wave-line {
  height: 10px;
  margin-top: 0.3em;
  background: url('../assets/wave.png');
  background-repeat: repeat;
  background-position-x: 0%;
  background-position-y: 0%;
  background-size: auto auto;
  background-repeat: repeat-x;
  background-size: 30px 10px;
  animation: move 15s linear infinite;
  -webkit-animation: move 15s linear infinite;
  animation-play-state: running;
}

.arside-grid {
  grid-area: sidebar;

  & .arside-container {
    position: sticky;
    height: calc(100vh - 2rem - 95px);
    /* min-height: 800px; */
    box-sizing: border-box;
    top: 1rem;
    width: 300px;
    border-radius: 30px;
    border: 1px solid #3fbea7;
    background: linear-gradient(16deg, #d5fff9 23.5%, #b9fff8 58.27%);
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    padding: 2em 1em;
    margin: 1rem 0;

    & .arside-content {
      height: 100%;
    }

    & .title-seciton {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;

      & h1 {
        font-size: 1.5em;
        padding: 0 0 0 10px;
      }

      & img {
        max-width: 50px;
        object-fit: contain;
      }
    }

    & .filter-btn {
      display: none;
    }

    & .category-section {
      height: calc(100% - 8em);
      & ul {
        display: flex;
        flex-flow: column;
        margin-top: 2em;
        height: 100%;
        overflow: auto;

        & li {
          width: 100%;
          & a {
            padding: 7px 10px;
            width: 100%;
            display: flex;
            box-sizing: border-box;

            &:hover {
              border-radius: 8px;
              background: #ffffff85;
            }
          }
        }
      }
    }

    & .wave-line {
      animation-play-state: paused;
    }
  }
}

.arside-content .category-section ul {
  scrollbar-width: auto;
  scrollbar-color: #8f54a0 #ffffff;
}

/* Chrome, Edge, and Safari */
.arside-content .category-section ul::-webkit-scrollbar {
  width: 16px;
}

.arside-content .category-section ul::-webkit-scrollbar-track {
  background: #ffffff;
}

.arside-content .category-section ul::-webkit-scrollbar-thumb {
  background-color: #8f54a0;
  border-radius: 10px;
  border: 3px solid #ffffff;
}

@media (max-width: 768px) {
  .arside-grid {
    & .arside-container {
      height: auto;
      width: 100%;
      align-items: center;

      & .category-section {
        height: 0;
        overflow: hidden;
        transition: height 0.3s;
        interpolate-size: allow-keywords;

        & a {
          justify-content: center;
        }

        &.active {
          height: auto;
        }
      }

      & .filter-btn {
        display: flex;
        justify-content: center;
        margin-top: 1em;

        & button {
          width: 180px;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 10px;
          padding: 10px 20px;
          border-radius: 8px;
          background-color: inherit;
          cursor: pointer;
          border: solid 1px black;
        }
      }
    }

    & .arside-container {
      & .wave-line {
        animation-play-state: running;
      }
    }
  }
}

.arside-container:hover .wave-line {
  animation-play-state: running;
}

@keyframes move {
  from {
    background-position: 2px 0px;
  }
  to {
    background-position: 500px 0px;
  }
}

.main-grid {
  grid-area: main;

  & .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;

    & .card {
      display: flex;
      position: relative;
      padding: 1em 1.2em;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-end;
      border-radius: 20px;
      transition:
        transform 0.3s ease,
        box-shadow 0.3s ease; /* Transición suave */
      transform-style: preserve-3d; /* Mantiene el estilo 3D */
      background: linear-gradient(145deg, #f9e7e8 -0.31%, #f7f9f4 101.77%);
      box-shadow: 0px 0px 20px 0px rgba(10, 5, 35, 0.03);

      &:hover {
        transform: perspective(2000px) rotateY(-5deg) rotateX(10deg) scale(102%); /* Efecto de rotación */
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); /* Sombra más intensa al hacer hover */
        box-shadow: 0px 0px 20px 0px rgba(10, 5, 35, 0.1);
      }

      & .card-body {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }

      & .card-img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 14px;
      }

      & .card-text {
        margin-top: 1.5rem;
        margin-bottom: 2.5rem;

        & .title-obra {
          margin: 0 0 0.3rem 0;
        }

        & .author-obra {
          font-size: 20px;
          margin: 0 0 0.6rem 0;
        }

        & .info-obra {
          margin: 0;
          font-size: 14px;
          color: #2c2c2c;
        }
      }

      & .card-footer {
        color: #303030;
        font-size: 12px;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;

        & li {
          padding: 10px 14px;
          border-radius: 8px;
          background: #9be8ff;
        }
      }
    }
  }
}

/* OBRA INDIVIDUAL */

.container-details {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  margin-top: 2em;
  padding: 0 1em;

  & .image-container {
    display: flex;
    flex-direction: column;
    gap: 1em;

    & .image-main-container {
      position: relative;
    }
    & .image-main {
      display: flex;
      justify-content: center;
      align-items: center;
      height: auto;
      width: 100%;
      object-fit: cover;
      border-radius: 20px;
      margin-bottom: 1em;
    }

    & .images-list {
      display: flex;
      border-radius: 30px;
      border: 1px solid #3fbea7;
      background: linear-gradient(16deg, #d5fff9 23.5%, #b9fff8 58.27%);
      padding: 20px 25px;
      justify-content: center;
      align-items: center;
      gap: 15px;

      & .image-list {
        width: auto;
        object-fit: cover;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.1s;
        box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);

        &.active {
          transform: scale(1.08);
          box-shadow: 0 0px 30px rgba(0, 0, 0, 0.2);
          &:hover {
            transform: scale(1.08);
          }
        }

        &:hover {
          transform: scale(1.03);
        }
      }
    }
  }

  & .info-container {
    & .extra-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2em;
      & .card-tags li {
        padding: 10px 14px;
        border-radius: 8px;
        background: #9be8ff;
      }
    }

    & .main-info {
      & .title {
        font-size: clamp(2rem, -2rem + 8vw, 3.5rem);
        font-weight: 700;
      }
      & .author {
        font-size: clamp(1.5rem, -2rem + 5vw, 2.5rem);
        margin: 0.5rem 0 0 0;
        font-weight: 300;
      }
      & .date {
        font-size: 16px;
        color: #009881;
        margin: 1em 0 0 0;
        font-weight: 700;
      }
    }

    & .second-info {
      display: flex;
      flex-direction: column;
      margin-top: 2em;

      & .description {
        font-size: 16px;
        margin: 0;
        font-weight: 300;
        line-height: 150%;
        text-wrap: balance;
      }
      & .wave-container {
        margin: 2em auto;
        & .wave-line {
          width: 300px;
        }
      }

      & .extra-data {
        font-size: 14px;
        margin: 0;
        font-weight: 300;
        line-height: 150%;
        text-wrap: balance;
      }
    }
  }
}

@media (max-width: 768px) {
  .container-details {
    grid-template-columns: 1fr;
    gap: 1em;
    & .image-container {
      & .images-list {
        /* padding: 10px 15px; */
        border-radius: 20px;
      }
    }
  }
}

.individual-container {
  margin-bottom: 3em;
}

.image-list-container {
  display: flex;

  & .new-image {
    position: absolute;
    transition: all 0.3s;
    interpolate-size: allow-keywords;
    opacity: 0;
    border-radius: 20px;
    pointer-events: none;
  }
}

/* FOOTER */

footer {
  background-color: black;
  display: flex;
  padding: 3em 0;
  margin-top: 3rem;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: 15em;

  & .img-footer {
    position: absolute;
    left: 0;
    bottom: 12vh;
  }

  & > div {
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
    & > div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-direction: row;
      padding: 0 1rem;
      height: 100%;
      max-width: 1280px;
      width: 100%;

      & > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
        gap: 2.5rem;
        color: white;
        font-size: 1.25rem;
        line-height: 1.75rem;
      }

      & img {
        width: 13rem;
      }

      & ul {
        display: flex;
        gap: 1rem;

        & li {
          width: 2.5rem;
        }
      }
    }
  }
}

@media (max-width: 2000px) {
  footer .img-footer {
    bottom: 10em;
  }
}

@media (max-width: 1400px) {
  footer .img-footer {
    bottom: 10em;
  }
}

@media (max-width: 640px) {
  footer {
    & > div {
      & > div {
        flex-direction: column;
        & > div {
          flex-direction: column;
          gap: 0;
          margin-bottom: 2em;
        }
      }
    }
  }

  footer .img-footer {
    display: none;
  }
}

.novedades-individual {
  max-width: 1280px;
  margin: auto;

  & > div {
    flex-direction: row;
    display: flex;
    gap: 5rem;
    margin: 0 2em;
  }

  & main {
    width: 66.666667%;
    gap: 1.25rem;
    align-items: flex-start;
    flex-direction: column;
    display: flex;
    margin-bottom: 5em;

    & h1 {
      font-size: 3rem;
      line-height: 1;
    }

    & .subtitle {
      color: #707070;
      font-size: 1.1rem;
    }

    & p {
      font-size: 1.25rem;
      line-height: 1.5;
      margin: 0;
    }

    & .size {
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
      padding-left: 1rem;
      padding-right: 1rem;
      background-color: black;
      margin: 0;
      color: white;
    }

    & hr {
      background-color: rgb(55 65 81);
      width: 100%;
      height: 1px;

      margin-bottom: 1.25rem;
    }
  }

  & aside {
    width: 33.333333%;
    position: relative;
    & img {
      border-radius: 0.5rem;
    }

    & .decorate {
      width: 8rem;
      height: 8rem;
      top: -2.5rem;
      left: -2.5rem;
      position: absolute;
    }
  }
}

@media (max-width: 1200px) {
  .novedades-individual {
    & > div {
      flex-direction: column;
      gap: 2rem;
      padding-top: 2em;
    }
    & aside {
      width: 100%;
      max-width: 600px;
      margin: auto;
    }

    & main {
      width: 100%;
      max-width: 600px;
      margin: 0 auto 2em auto;

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

.back {
  & button {
    background-color: #8eecde;
    border-radius: 999999px;
    padding: 0.5em 1.5em;
    font-size: 1.2rem;
    color: black;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
    margin-top: 2em;

    &:hover {
      background-color: #7dd4c9;
      transform: scale(1.05);
    }
  }
}

.title-container {
  font-size: 3rem;
  margin-top: 1rem;
  margin-bottom: 2rem;

  & span {
    font-weight: 300;
  }
}

.x-dia {
  & ul {
    height: auto !important;
    padding-bottom: 2em;
    border-bottom: 1px solid #3fbea7;

    &:nth-last-child(1) {
      border-bottom: none;
    }
  }
}
@media (max-width: 1200px) {
  .title-container {
    font-size: 2.5rem;
  }
}
@media (max-width: 600px) {
  .title-container {
    font-size: 2rem;
  }
}

#galerias_fauna {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 2em;
  margin-bottom: 3em;
}
#galerias_fauna ima {
  width: 32%;
}

/* WINNER OBRAS */

.card-winner {
  position: absolute;
  z-index: 9999999;
  left: 5px;
  top: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-winner p {
  font-size: 1rem;
  background-color: #fff;
  text-align: center;
  margin-left: -1em;
  z-index: 0;
  padding: 0.8em 1.3em;
  border-radius: 0 999999px 999999px 0;
  box-shadow: 0px 0px 20px 0px rgba(10, 5, 35, 0.1);
}

.card-winner .winner-icon-container {
  width: 5em;
  height: 5em;
  z-index: 1;
  background: #6dd8d6;
  background: linear-gradient(16deg, #6dd8d6 23.5%, #a6dda4 58.27%);
  border-radius: 999999px;
  border: #fff solid 5px;
}

.card-winner .winner-icon-container img {
  padding: 1.1em;
}

.card-winner.mention .winner-icon-container {
  background: linear-gradient(16deg, #6dc2d8 23.5%, #a4bbdd 58.27%);
}

.programation .category-section.x-dia {
  overflow: auto;
}

@media (max-width: 768px) {
  .arside-grid {
    margin: 0 2rem;
  }
}
