@tailwind base;
@tailwind components;
@tailwind utilities;

:where( :root:has(.modal-open, .modal[open], .modal:target, .modal-toggle:checked, .drawer:not(.drawer-open) > .drawer-toggle:checked)) {
  scrollbar-gutter: auto;
}
/* .menu :where(li) > *:not(ul, .menu-title, details, .btn):active, .menu :where(li) > *:not(ul, .menu-title, details, .btn).menu-active, .menu :where(li) > details > summary:active{
  @apply bg-transparent text-primary underline shadow-none underline-offset-4
} */
.menu li > *:not(ul, .menu-title, details, .btn):active{
  @apply bg-transparent text-primary underline shadow-none underline-offset-4
}
.menu-horizontal > li:not(.menu-title) > details > ul{
  margin-top: 0;
  border-radius: 0;
}
.btn{
  height: auto;
  min-height: initial;
}
.collapse:is([open], :focus:not(.collapse-close))> :where(.collapse-content),
.collapse:not(.collapse-close)> :where(input:is([type="checkbox"], [type="radio"]):checked ~ .collapse-content) {
  padding-bottom: initial;
}
.menu li > details > summary:active{
  @apply text-primary bg-secondary
}
/* Swiper */
.swiper-pagination-bullet {
  width: 25px;
  height: 25px;
  font-size: 12px;
  opacity: 1;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
  border: 1px solid ;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0);
  transition: border-color 0.3s;
}
.swiper-pagination{
  display: flex;
  align-items: center;
  gap: .25rem;
  justify-content: center;
}
.swiper-pagination-bullet-active{
  border-color: rgba(255, 255, 255, 1);
  color: rgba(255, 255, 255, 1);
}
.swiper-pagination-bullet-active .bullet-number {
  display: none;
}
.swiper-pagination-bullet-active .bullet-icon {
  display: inline-flex !important;
  background: transparent;
}
/* END Swiper */
/************************* CORE *************************/
.grid-auto-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* Si el último elemento es impar (es decir, queda solo en la fila) */
.grid-auto-4 > :nth-child(2n+1):last-child {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: auto;
}
.gradient-shadow{
  --gradient-direction: to top; /* Valor por defecto */
  --start-color: rgba(0, 0, 0, 0.9);
  --end-color: rgba(0, 0, 0, 0);
  --start-percentage: 0%; /* Valor por defecto */
  --end-percentage: 60%;   /* Valor por defecto */
  position: relative;
}
.gradient-shadow::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    var(--gradient-direction),
    var(--start-color) var(--start-percentage),
    var(--end-color) var(--end-percentage)
  );
  z-index: -1;
}
.left-blue-gradient{
  --start-percentage: 27%;
  --end-percentage: 50%;
  background: rgba(13, 116, 185, 0.9);
  background: linear-gradient(to right, rgba(13, 116, 185, 0.9) var(--start-percentage), rgba(13, 116, 185, 0) var(--end-percentage));
}
/************************* END CORE *********************/

/************************* LANDING *************************/
.banner {
  min-height: max(50vh, 600px);
  min-height: max(50dvh, 600px);
  width: 100%;
  position: relative;
  display: grid;
  padding: 0 1rem;
  grid:
    "header" auto
    "main" 1fr
    "footer" auto
    / 1fr;
  .banner_top {
    grid-area: header;
    .menu {
      .link-menu{
        &:hover {
          @apply bg-transparent underline shadow-none underline-offset-4
        }
      }
    }
  }
  .banner_swiper{
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    z-index: -1;
    img{
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .banner_body{
    @apply container px-0;
  }
  .banner__end{
    @apply container px-0 py-4 gap-4 flex items-center justify-between;
    grid-area: footer;
    .swiper-pagination{
      position: static;
      width: fit-content;
    }
  }
}
.gallery-section{
  @apply min-h-[500px];
  background: linear-gradient(to right, rgba(13,116,185,0.9) 25%, rgba(13,116,185,0) 80%), url("/public/images/pools/10.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.container-estimate{
  background: linear-gradient(to right, rgba(13,116,185,1) 65%, rgba(13,116,185,0) 80%), url("/public/images/pools/7.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/************************* END LANDING *********************/



/* Banner */
/* Header */

