@use '../utilities/colors' as *;
@use '../utilities/functions' as *;
@use '../utilities/mixins' as *;
@use '../utilities/helpers' as *;
@use '../base/merlin' as *;

.grid-ce {
  background-size: 100%;
  background-position: bottom;
  background-repeat: no-repeat;
}

.main-information {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(12, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  margin-bottom: 0;
  @include bp-up(md){
    display: grid;
  }
  @include bp-up(lg){
  margin-bottom: 8rem;
}

  .main-banner {
    grid-area: 1 / 1 / 5 / 2; 
    position: relative;
  
    .video-bg {
      // add overlay black
      &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(#000, .3);
        z-index: 2;
      }

      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      video {
        object-fit: cover;
        width: 100%;
        height: 100%;
      }
    }
    .bg-video__content {
      z-index: 3;
    }
  }
  .pscicultura {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    grid-area: 3 / 1 / 13 / 2;
    z-index: 9;
    padding-bottom: 0;
    background: #c85017;
    overflow: hidden;
    @include bp-up(lg){
      padding-bottom: 2rem;
      background: initial;
      background-size: cover;
    }
    @include bp-up(fhd){
      .main-title {
        h1 {
          padding-top: 7rem;
        }
      }

    }
    &.position-bottom {
      @include bp-up(lg){
        background-position: bottom;
      }
    }

    .title-section {
      padding-bottom: 6rem;
      margin-top: 3rem;
      bottom: 0;
      @include bp-up(md){
        bottom: -3rem;
        margin-top: 6rem;
      }
      
      @include bp-up(lg){
        padding-bottom: 9rem;
        bottom: -3rem;
        padding-top: 9rem;
      }
      
      // &--main {
      //   padding-bottom: 5rem;        
      //   @include bp-up(md){
      //     bottom: -3rem;
      //     margin-top: 6rem;
      //   }
      // }
    }
  }
}

.main-banner {
    position: relative;
    height: 30rem;
    @include bp-up(md){
      height: 43rem;
    }
    @include bp-up(fhd){
      height: 47rem;
    }
    .main-banner__fallback {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .bg-video__content {
        position: relative;
        z-index: 1;
    }
}

.slider-primary-1 {
    border-radius: 10px;
}

.controls-slider-pscicultura {
    justify-content: flex-start;
    align-items: center;
    flex-direction: row-reverse;
    height: auto;
    display: flex;
    position: absolute;
    left: 0;
    top: 25px;
    z-index: 99;
    gap: 1rem;
    width: 100%;
    // allgin center
    justify-content: center;
    @include bp-up(lg){
      top: 0;
      height: 100%;
      justify-content: flex-start;
      gap: 0;
      width: auto;
    }

    .first-number, .last-number {
      transform: rotate(0deg);
      @include bp-up(lg){
        transform: rotate(90deg);
      }
    }
}

// section pscicultura
.title-section {
    .text-shadow {
        position: absolute;
        // center horizontal
        left: 50%;
        transform: translateX(-50%);
        top: -20px;
        @include bp-up(lg){
          top: 105px;
        }
    }
    .icon-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: -50px;
        z-index: 1;
    }
}

// section timeline
.timeline {
    .swiper-slide {
        background: transparent !important;
    }
    .img-timeline {
        width: 90%;
        height: auto;
        // margin-right: auto;
        border-radius: 10px;
        @include bp-up(lg){
          width: 60%;
        }
    }
    .swiper-pagination-bullets {
        top: 7px !important;
    }
    .swiper-pagination-custom {
      overflow-x: auto;
    }
    span.swiper-pagination-bullet.swiper-pagination-bullet {
        display: none;
    }
}

.active-indicator-container {
  position: absolute;
  top: 10px; /* Set the top position to 10px */
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

.active-indicator {
  width: 46px; /* Adjust the width as needed */
  height: 46px; /* Adjust the height as needed */
  background-image: url('https://pucv-piscicultura.desarrollos.want.cl//app/uploads/2023/10/pescado2.png');; /* Indicator color */
  position: absolute;
  top: 0;
  // left: 10px;
  transition: -webkit-transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
  background-size: cover;
}
// timline Section
$primary-color: #000;
$secondary-color: #888;
.swiper-container-wrapper {
  &--timeline {
    .swiper-slide {
      display: flex;
      background: #fff;
      min-height: 300px;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      .container {
        padding: 0;
        width: 100%;
      }
      .title{
        font-size: 18px;
        opacity: 0;
        transition: 0.5s ease 0.5s;
      }
      &-active{
        .title{
          opacity: 1;
        }
      }
    }
    .swiper-pagination-progressbar {
      display: none;
      position: relative;
      margin-bottom: 70px;
      background-color: transparent;
      height: 4px;
      border-bottom: 2px solid rgba(#fff, 0.3);
      width: 75%;
      &-fill {
        background-color: $primary-color;
        height: 3px;
        top: 2px;
        left: 0;
        opacity: 0;
      }
      &:before {
        position: absolute;
        top: 2px;
        left: -100%;
        width: 100%;
        height: 3px;
        background-color: $primary-color;
        content: "";
      }
      &:after {
        position: absolute;
        top: 3px;
        right: -100%;
        width: 100%;
        height: 1px;
        background-color: $secondary-color;
        content: "";
      }
    }
    .swiper-pagination-custom {
      /* Style for the active indicator */
      position: relative;
      list-style: none;
      margin: 1rem 0;
      padding: 0;
      display: flex;
      line-height: 1.66;
      bottom: 0;
      z-index: 11;
      // width: 75%;
      width: 100%;
      display: flex;
      justify-content: space-between;
      &::before {
        // i need through this but with space between elements 
        content: "";
        position: absolute;
        top: 24px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: rgba(#fff, 0.3);
        z-index: 1;
        border-radius: 10px;
        // vertical align
      }

      .swiper-pagination-switch {
        position: relative;
        // width: 100%;
        width: auto;
        line-height: 30px;
        display: block;
        background: #c85017;
        @include bp-up(lg){
          background: #be3e16;
        }
        @include bp-up(fhd){
          background: #b63117;
        }
        z-index: 999;
        padding-inline: 1rem;
        .switch-title {
          // position: absolute;
          position: relative;
          font-weight: 400;
          right: 0;
          transform: translateX(50%);
          transition: 0.2s all ease-in-out;
          transition-delay: 0s;
          cursor: pointer;
          color: rgba(#fff, .3);
          z-index: 1;
          &:after {
            display: none;
          }
        }
        &.active {
          .switch-title {
            font-weight: 400;
            transition-delay: 0.4s;
            color: #fff;
            &:after {
              background: $primary-color;
              width: 25px;
              height: 25px;
              transition-delay: 0.4s;
            }
          }
          // ~ .swiper-pagination-switch {
          //   .switch-title {
          //     color: rgba(#fff, 0.3);
          //     font-weight: 16px;
          //     &:after {
          //       background: $secondary-color;
          //     }
          //   }
          // }
        }
      }
    }
  }
}

// info accordion
.dd-info {
    &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(#076633, .7);
        z-index: 20;
        display: block;
    }
    &--variation {
        &::before {
            background-color: rgba(#003E7E, .7);
        }
    }
    &--white {
        &::before {
            background-color: rgba(#fff, .7);
        }
        .acc-dd-ed {
          h2,.acc-ed-desc {
            color: #003E7E;
          }
        }
    }
}

.overlay {
    &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(#076633, .7);
        z-index: 20;
    }
    &--variation {
        &::before {
            background-color: rgba(#003E7E, .7);
        }
    }
    &--white {
        &::before {
          background-color: rgba(#fff, .7);
        }
        &~div {
          span {
            color: #003E7E;
          }
        }
    }
}

// comunidad
.comunidad {
  ul {
    background-color: $bg-accordion;
    li {
      button {
        padding-block: 0;
        border-radius: 0;
      }
    }
  }
}

.accordion-comunidad {
  dt,dd {
    background: $bg-accordion;
  }

  dt.aria-\[expanded\=true\]\:border-0[aria-expanded=false] {
      transform: scale(1);
      // add transition
      transition: all 0.3s ease-in-out;
    }
    dt.aria-\[expanded\=true\]\:border-0[aria-expanded=true] {
    transition: all 0.3s ease-in-out;
    border-width: 0px;
    transform: scale(1.04);
    z-index: 30;
    position: relative;
    background-color: #fff;
  }
  
  dd.aria-\[expanded\=true\]\:opacity-100[aria-expanded=false] {
    transform: scale(1);
    // add transition
    transition: all 0.3s ease-in-out;
  }
  dd.aria-\[expanded\=true\]\:opacity-100[aria-expanded=true] {
    opacity: 1;
    transition: all 0.3s ease-in-out;
    transform: scale(1.04);
    z-index: 30;
    position: relative;
    // add border bottom shadow
    box-shadow: 0px 18px 10px -14px rgba(0, 0, 0, 0.2);
    background-color: #fff;
  }
}

// slider simple
.simple-banner {
  .wrap-button-slider {
    button {
      border: 2px solid #fff;
    }
  }
  .content-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
  }
  span.outline-text {
    left: 0;
    top: 0; 
    position: absolute;
    // center horizontal
    left: 50%;
    transform: translateX(-50%);
    // center vertical
    top: 25%;
  }
}

// Blog
.grid-blog {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(1, 1fr);
  @include bp-up(lg){
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
  }
  .item {
    border-radius: 10px;
    overflow: hidden;
    span.link-b {
      text-decoration: underline;
      text-underline-offset: 2px;
      position: relative;
      opacity: 1;
      @include bp-up(lg){
       opacity: 0;
       position: absolute;
     } 
    }
    article {
      border-radius: 10px;
      overflow: hidden;
      cursor: pointer;
      .badges {
        border-radius: 0 0 0 10px;
      }
      @include bp-up(lg){
        &:hover {
          span.link-b {
            position: relative;
            opacity: 1;
          }
        }
      }
    }
    &:first-child {
      min-height: 300px;
      @include bp-up(lg){
        min-height: auto;
        grid-area: 1 / 1 / 7 / 2;
      }

    }
    &:nth-child(2) {
      @include bp-up(lg){
        grid-area: 1 / 2 / 4 / 3;

      }
      min-height: 300px;
    }
    &:nth-child(3) {
      @include bp-up(lg){
        grid-area: 4 / 2 / 7 / 3;

      }
      min-height: 300px;
    }

    .overlay-bottom {
      position: absolute;
      left: 0;
      bottom: 0;
      height: 100%;
      width: 100%;
      // add background gradiente bottom to top
      background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
      z-index: 20;
    }
  }
}

// contact
.contact-section {
  margin-bottom: -16rem;
  z-index: 9;
  position: relative;
  background: white;
  // shadow bottom
  box-shadow: 0px 18px 10px -14px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  border-radius: 7px;
  overflow: hidden;
}

ol.info-contact {
  // li last child selector}
  li:first-child {
    position: relative;
    &::before {
      content: "";
      position: absolute;
      width: 1px;
      top: 0;
      left: -1px;
      background-color: white;
      height: 10%;
    }
  }
  li:last-child {
    position: relative;
    &::before {
      content: "";
      position: absolute;
      width: 1px;
      background: white;
      left: -1px;
      height: 90%;
      bottom: 0;
      z-index: 0;
    }
  }
}

// Parque
.title-acc-park {
  letter-spacing: .2rem;
}

// general 
.outline-text {
  color: black;
  -webkit-text-fill-color: transparent; /* Will override color (regardless of order) */
  -webkit-text-stroke-width: 0.5px;
  -webkit-text-stroke-color: white;
}

.swiper-cultivo {
  display: flex;
  align-items: center;
}

.slide-custom-dot {

}

.swiper-thumbs-cultivo {
  position: absolute !important;
  top: 20px;
  right: 0;
  width: 48%;
}

.title-acc-ed {
  letter-spacing: 3px;
  padding-left: 1rem;
  padding-top: 3rem;
}

// section simple banner
.simple-banner {
  .simple-banner__controls {
    height: 170px;
    display: flex;
    justify-content: center;
    z-index: 9999;
    width: 100%;
    position: absolute;
    align-items: center;
    // background-color: $green;
    //  style="background-image:url(<?= get_template_directory_uri(); ?>/build/assets/bg-banner-controls.svg)"
    background-size: cover;
    background-repeat: no-repeat;
    background-position: left;
    padding-left: 0;
    @include bp-up(md){
      width: 70%;
      padding-left: 10rem;
    }
  }
  .slider-primary-1--left {
    .swiper-slide {
      height: auto!important;
        will-change: auto !important; /* or auto */
    }
  }
}

// overlay blue
.overlay-blue {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: #003e7e;
  opacity: .7;
  z-index: 10;
}

// contact
.publico-general {
    .wrap-info {
      display: flex;
      gap: 0;
      flex-direction: column;
      @include bp-up(md){
        flex-direction: row;
        gap: 2rem;
      }
      label {
        font-family: var(--secondary-font);
        color: #0C0C3C;
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: .7rem;
        gap: .8rem;
        input {
          background-color: white;
          width: 100%;
          line-height: 3.5;
          border-radius: 5px;
          // placeholder padding left
          padding-inline-start: 1rem;
        }
      }
    }    
  }
  form.wpcf7-form {
    min-height: 450px;
    input.wpcf7-form-control.wpcf7-submit {
      margin: 0 auto;
      display: block;
      margin-top: 3rem;
      background-color: #76a92b;
      color: white;
      padding: 0.9rem 3rem;
      font-weight: 600;
      border-radius: 7px;
      cursor: pointer;
      // hover darker and transition
      transition: all 0.3s ease-in-out;
      &:hover {
        background-color: #5e7e1a;
      }
  }
  }

  // accordion education
  .accordion-education {
    dt.accordion-trigger {
      &.active {
        width: 0;
        span.title-acc-ed {
          writing-mode: initial;
          transform: rotate(270deg);
          transform-origin: center; 
          transition: all 2s;
        }
    }
    &.not-active {
        width: 10%;
        justify-content: center;
        span.title-acc-ed {
          writing-mode: vertical-lr;
          transform: rotate(180deg);
          transform-origin: center;
        }
    }
    }
    dd {

    }
    .outline-text {
      color: black;
      -webkit-text-fill-color: transparent;
      -webkit-text-stroke-width: 0.5px;
      -webkit-text-stroke-color: white;
      bottom: 30px;
    }
  }
  
  .acc-old {
    display: none !important;
  }

  // custom acc 
  .custom-acc {
    border-radius: 12px;
    .overlay__acc {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 100%;
      background-color: rgba(#003E7E, .7);
      z-index: 20;
      &--white {
        background-color: rgba(#fff, .7);
      }
    }
    .g-text {
      grid-template-columns: min-content 1fr;
      line-height: 1.1;
    }
    .ed-acc {
      height: 30rem;
      width: 100%;
      .close-ed {
        opacity: 0;
      }
      span {
        color: black;
        -webkit-text-fill-color: transparent;
        -webkit-text-stroke-width: 0.5px;
        -webkit-text-stroke-color: white;
        position: absolute;
        left: 0;
        writing-mode: vertical-lr;
        transform: rotate(180deg);
        opacity: .5;
        line-height: 1;
      }
      @include bp-up(lg){
        height: 30rem;
        width: 33.3%;
        transition: all 0.3s ease-in-out;
        h2.g-text {
          opacity: 1;
          // writing-mode: horizontal-tb;
          transform: rotate(0deg);
          transition: all 0.3s ease-in-out;
          cursor: pointer;
        }
        .ed-content {
          opacity: 0;
          transition: all 1s ease-in-out;
          height: 100%;
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          padding-bottom: 4rem;
          padding-left: 6rem;
        }

        &.active {
          .close-ed {
            opacity: 1;
            cursor: pointer;
          }
          width: 80%;
          h2.g-text {
            position: absolute;
            opacity: 0;
          }
          .ed-content {
            opacity: 1;
          }

        }
        &.not-active {
          width: 10%;
          display: flex;
          align-items: flex-end;
          padding-bottom: 2rem;
          justify-content: center;
          h2.g-text {
            // writing-mode: vertical-lr;
            // writing-mode: tb;
            transform: rotate(90deg);
            transition: all 0.5s ease;
            top: -6rem;
          }
          .ed-content {
            opacity: 0;
            position: absolute;
          }
        }
      }
      &--white {
        h2,p,span {
            color: #003E7E;
          }
          .ed-content {
            span {
              -webkit-text-stroke-color: #0f3f7e;
            }
        }
        .close-ed {
          color: #003E7E;
        }
      }
    }
  }
 
  // custom css cultivo 

  .grid-controls-cultivo {
    position: absolute;
    z-index: 20;
    right: 0;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .tabs-info-cultivo {
    display: flex;
    flex-direction: column;
}

.tab-buttons {
    display: flex;
    list-style: none;
    padding: 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1.5rem;
    gap: .75rem;
}

.tab-button {
    cursor: pointer;
    padding: 5px;
    &.active {
      border-bottom: 2px solid #0C0C3C;
    }
}

.tab-button:hover {
    background: #e0e0e0;
}

.tab-content {
    display: none;
    padding: 10px;
}

.tab-content.active {
    display: block;
}


// custom messagge mail
.custom-success-message {
  .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #f1f6ea;
    .success-title {
      font-size: 4rem;
      color: #76a92b;
    }
    .success-description {
      font-size: 18px;
    }
    .close-button {
      color: #fff;
      background: #76a92b;
      border-radius: 4px;
      padding: 0.8rem 2rem;
      margin-top: 1rem;
      font-size: 18px;
      font-weight: 700;
    }
  }
}

