

:root {
  --theme-marine: 200, 100%, 16%;
  --theme-orange: 22, 92%, 49%;
  --theme-light-orange: 24, 91%, 55%;
  --theme-black: 0, 7%, 9%;
  --theme-white: 0, 0%, 100%;
  --theme-light: 40, 100%, 97%;
  --theme-dark: 0, 7%, 29%;
  color: hsl(var(--theme-dark));
 /* background: hsl(var(--theme-light));*/
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

.Dots a {
  color: hsl(var(--theme-marine));
  transition: color 150ms, text-decoration-color 150ms;

  &:active,
  &:visited {
    color: hsl(var(--theme-marine));
  }

  &:hover {
    color: hsl(var(--theme-orange));
  }

  &:focus,
  &:hover {
    text-decoration-color: transparent;
  }
}

a,
[tabindex='-1'] {
  &:focus {
    outline: 0.125rem solid hsl(var(--theme-light-orange));

    &:not(:focus-visible) {
      outline: none;
    }
  }
}

.Carousel {
  --carousel-gap: 8px;
  border-radius: 8px;
  display: flex;
  gap: var(--carousel-gap);
  overflow-y: hidden;
  overflow-x: auto;
  position: relative;
  scroll-behavior: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  height: 50vw;
  outline: none !important;
  min-height: 20rem;
  max-height: 30rem;

  &::-webkit-scrollbar {
    display: none;
  }

  .Card {
    aspect-ratio: var(--card-ratio);
    flex: 1 0 auto;
    min-height: 100%;
    scroll-snap-align: start;
  }
  
  .Card__media {
    aspect-ratio: auto;
  }

  & > div:empty {
    position: relative;

    &:first-child {
      inset-inline-start: 10%;
      margin-inline-end: calc(-1 * var(--carousel-gap));
    }

    &:last-child {
      inset-inline-end: 10%;
      margin-inline-start: calc(-1 * var(--carousel-gap));
    }
  }
}

.Carousel--single {
  .Card {
    --card-ratio: auto;
    flex: 1 0 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .Carousel {
    scroll-behavior: auto;
  }
}

// Not a perfect fix but looks better in Safari 14
@supports not (aspect-ratio: 1/1) {
  .Carousel {
    .Card__media {
      padding-block-end: 0 !important;
    }
    
    .Card__image {
      position: relative !important;
    }
  }
}

.Dots {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.Dot {
  border-radius: 100%;
  display: block;
  height: 1.5rem;
  width: 1.5rem;
  position: relative;

  &::after {
    background: currentColor;
    border-radius: 100%;
    content: '';
    display: block;
    height: 0.375rem;
    width: 0.375rem;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
  }
}

.Dot--active {
  color: hsl(var(--theme-light-orange)) !important;
}

.Pagination {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 1rem -0.5rem 0;

  .Arrow {
    flex: 0 0 auto;

    &:first-of-type {
      margin-inline-end: auto;
      order: -1;
    }
    &:last-of-type {
      margin-inline-start: auto;
      order: 1;
    }
  }
}

.Arrow {
  align-items: center;
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 0.125rem;
  cursor: pointer;
  color: hsl(var(--theme-marine));
  display: flex;
  height: 3.4rem;
  justify-content: center;
  opacity: 1;
  padding: 0.5rem;
  transition: opacity 150ms, color 150ms;
  width: 3.4rem;

  &:hover {
    color: hsl(var(--theme-orange));
  }

  &:focus {
    color: hsl(var(--theme-light-orange));
    outline: none;

    svg {
      box-shadow: 0 0 0 0.125rem hsla(var(--theme-white), 1),
        0 0 0 0.25rem currentColor;
    }

    &:not(:focus-visible) {
      color: hsl(var(--theme-orange));
      svg {
        box-shadow: none;
      }
    }
  }

  &[disabled] {
    color: hsl(var(--theme-dark));
    opacity: 0.4;
    pointer-events: none;
  }

  svg {
    border-radius: 100%;
    fill: currentColor;
    height: 100%;
    width: 100%;
    transition: box-shadow 150ms;

    [dir='rtl'] & {
      transform: scaleX(-1);
    }
  }
}

.Hidden {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

// Card pattern
// https://codepen.io/dbushell/full/MWpzGje

:root {
  --card-link-color: var(--theme-marine);
  --card-hover-color: var(--theme-orange);
  --card-focus-color: var(--theme-light-orange);
  --card-inner-focus-color: var(--theme-white);
  --card-shadow-color: var(--theme-black);
  --card-foreground-color: var(--theme-dark);
  --card-background-color: var(--theme-dark);
}

.Card {
  --card-ratio: auto 1/1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: [media-start] auto [media-end main-start] auto [main-end];
  max-width: 100%;
  position: relative;
}

.Card__media {
  aspect-ratio: var(--card-ratio);
  background: hsla(var(--card-background-color), 0.5);
  grid-column: 1 / -1;
  grid-row: media-start / media-end;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: -1;

  & > * {
    border-radius: inherit;
    height: 100%;
    object-fit: cover;
    position: absolute;
    width: 100%;
  }
}

.Card__main {
  align-self: end;
  color: hsl(var(--card-foreground-color));
  grid-column: 1 / -1;
  grid-row: main-start / main-end;
  padding: 1.25rem;

  [href]:not(.Card__link) {
    position: relative;
    z-index: 2;
  }

  & > * {
    margin: 0;
  }
}

.Card__link {
  color: hsl(var(--card-link-color));
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: hsla(var(--card-link-color), 0.2);
  text-decoration-thickness: 0.125rem;
  text-decoration-skip: ink;
  text-decoration-skip-ink: all;
  text-decoration-offset: 100%;

  &::after {
    border: 0.125rem solid hsl(var(--card-focus-color));
    box-shadow: inset 0 0 0 0.125rem hsla(var(--card-inner-focus-color), 1);
    border-radius: 1rem;
    bottom: 0;
    content: '';
    display: block;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: border-color 150ms, opacity 150ms;
    z-index: 1;
  }

  &:hover,
  &:focus {
    text-decoration-color: hsla(var(--card-hover-color), 1);

    &::after {
      opacity: 1;
    }
  }

  &:focus {
    outline: none;
    text-decoration-color: currentColor;
  }
}

.Card__heading {
  line-height: 1.25;
  margin-block-end: 0.5rem;
}

.Card--border {
  .Card__link {
    &::after {
      opacity: 1;
    }
    
    &:not(:focus):not(:hover) {
      &::after {
        border-color: hsla(var(--card-foreground-color), 0.5);
      }
    }
  }
}

.Card--overlay {
  --card-shadow-color: var(--theme-black);
  --card-foreground-color: var(--theme-white);
  --card-background-color: var(--theme-dark);
  --card-link-color: var(--theme-white);
  --card-hover-color: var(--theme-white);

  grid-template-rows:
    [media-start] 1fr
    [overlay-start] 1rem
    [main-start] auto
    [main-end overlay-end media-end];

  &::before {
   /* background: linear-gradient(
      to top,
      hsla(var(--card-shadow-color), 0.8) 20%,
      hsla(var(--card-shadow-color), 0.3) 60%,
      transparent
    ); */
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    content: '';
    display: block;
    grid-column: 1 / -1;
    grid-row: overlay-start / overlay-end;
    overflow: hidden;
  }

  .Card__main {
    p {
      text-shadow: 0 0.0625rem 0.0625rem hsl(var(--card-shadow-color));
    }

    a {
      color: hsl(var(--card-link-color));

      &:active,
      &:visited {
        color: hsl(var(--card-link-color));
      }

      &:hover,
      &:focus {
        color: hsl(var(--card-hover-color));
      }
    }
  }
}

.Card--square {
  --card-ratio: auto 1/1;
}

.Card--photo {
  --card-ratio: auto 4/3;
}

.Card--portrait {
  --card-ratio: auto 3/4;
}

.Card--wide {
  --card-ratio: auto 16/9;
}

@supports not (aspect-ratio: 1/1) {
  .Card__media {
    height: 100%;
    padding-block-end: calc(100% * (1 / 1));
  }

  .Card--square {
    .Card__media {
      padding-block-end: calc(100% * (1 / 1));
    }
  }

  .Card--photo {
    .Card__media {
      padding-block-end: calc(100% * (3 / 4));
    }
  }

  .Card--portrait {
    .Card__media {
      padding-block-end: calc(100% * (4 / 3));
    }
  }

  .Card--wide {
    .Card__media {
      padding-block-end: calc(100% * (9 / 16));
    }
  }
}




img {
  display: block;
  height: auto;
  max-width: 100%;
}

.Main {
  margin: 0 auto;
  /*max-width: calc(90rem + 20vw);*/
  padding: 0 20px;
  width: 100%;

  & > *:first-child {
    margin-block-start: 0;
  }

  & > h1 {
    font-weight: 800;
  }

  & > h1,
  & > h2,
  & > h3 {
    line-height: 1.25;
    margin-block: 1.5rem 1rem;
  }

  & > ul {
    margin-block: 1.5rem;
    padding-inline: 2rem 0;

    li {
      margin-block: 0.5rem;
    }
  }

  & > p {
    margin-block: 1rem;
  }

  a:not([class]) {
    font-weight: 500;
  }
}

/*new gallery*/

/* Gallery grid layout */
.gallery {
  
  gap: 0px;
  width: 100%;
  max-width: 1920px;
}
.gallery img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 4px;
}
.gallery img:hover {
  transform: scale(1.05);
}
/* Lightbox styling */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.lightbox img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
}
.lightbox .prev,
.lightbox .next {
  height: 50px;
  width: 50px;
  position: absolute;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background-color: transparent;
  color: #ffffff;
  padding: 10px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1001;
}
.lightbox .prev {
  left: 20px;
}
.lightbox .next {
  right: 20px;
}
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: #ffffff;
  background: none;
  cursor: pointer;
  border: none;
  z-index: 1001;
}

.separator {
  display: block;
  height: 50px;
  border: 1px solid red;
}

.gallery-nivel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  width: 100%;
  margin: 0 0 40px 0;

}

.space-gallery{
  padding: 20px;
}

/*Estructure videos*/

section.content-videos{
  margin: 0 auto 80px
}

.content-videos .box{
  width: 130px;
  flex-grow: 2;
  margin: 0 2%;
}

.btn{
   position:relative;
   font-size:1.2em;
   font-weight:300;
   color:#fff;
   text-shadow:none;
   border-radius:0px;
   background: #f7be68;
   box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.22);
   text-decoration: none;
}

.btn:hover{
   background: #f5b14b;
   box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.22);
   color:#fff;
}

#modalContent{
   position:absolute;
   z-index:6;
   margin: 2% 5%;
   width:90%;
   color:#888888;
   line-height:22px;
   padding:5px;
   border-radius:5px;
   background:#ffffff;
   box-shadow:5px 5px 10px 0px rgba(0,0,0,0.22);
   text-align: center;
}

#modalContent2{
   position:absolute;
   z-index:6;
   margin: 2% 5%;
   width:90%;
   color:#888888;
   line-height:22px;
   padding:5px;
   border-radius:5px;
   background:#ffffff;
   box-shadow:5px 5px 10px 0px rgba(0,0,0,0.22);
   text-align: center;
}

#modal, #modal2, #modal3, #modal4{
   position:fixed;
   top:0px;
   left:0px;
   z-index:5;
   float:left;
   width:100%;
   height:100%;
   background:rgba(0,0,0,0.8);
   display:none;
   opacity:0;
}

#modal > a{
   position:fixed;
   top:0px;
   left:0px;
   z-index:1;
   float:left;
   width:100%;
   height:100%;
}

:target{
   display:block!important;
   opacity:1!important;
}

#modalContent > a{
   position:absolute;
   top: 0;
   right: 0;
   color: #fff;
   border-radius:2px;
   background:#E56013;
   padding:10px;
   font-size: 30px;
   text-decoration: none;
   z-index: 3;
}




@media only screen and (max-width: 1024px) {

  section.content-videos{
      margin: 0 0 40px 0;
  }
  
} 