/*-- Main slide --*/
#main-slide {
    width: 100%;
    height:550px;
    position: relative;   /* 🔴 FUNDAMENTAL */
    overflow: hidden;     /* evita que el before se salga */
    z-index: 2;
}

/* Pseudo-elemento antes para superponer color con opacidad sobre la imagen */
#main-slide::before {
    content: '';
    position: absolute;
    inset: 0; /* equivale a top:0; right:0; bottom:0; left:0 */
  /*  background-color: #000000;*/
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;  /* capa vino */
}

#main-slide .item {
    min-height: 550px;
    color: #fff;
    background-position: 50% 50%;
    -webkit-background-size: cover;
    background-size: cover;
    align-items: center; /* Asegura que el contenido esté centrado verticalmente */
    
}

#main-slide .item img {
    width: 100%;
    height:auto;
}

#main-slide .item .slider-content {
    opacity: 0;
    -webkit-transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    transition: opacity 500ms;

}

#main-slide .item.active .slider-content {
    opacity: 1;
    -webkit-transition: opacity 100ms;
    -moz-transition: opacity 100ms;
    -o-transition: opacity 100ms;
    transition: opacity 100ms;
}

/* content text of the carousel */
#main-slide .slider-content {
    top: 65%;					/* vertical center the text in the middle of carousel */
    padding: 0;
    width: 100%;
    color: #ffffff;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    position: absolute;

}

#main-slide .slider-content.text-left {
    left: 10%;
}

#main-slide .slider-content.text-right {
    right: 10%;
}

.slider-content {
    position: relative;
    padding-top: 99px; /* Igual a la altura del header */
    display: table;
    height: 100%;
    width: 100%;
	vertical-align: middle;
    justify-content: center; /* Centramos horizontalmente */
    align-items: center; /* Centramos verticalmente */
    z-index: 2;
}

#main-slide .slider-content p {
    display: flex;
    justify-content: center;   /* ✅ centrado horizontal */
    align-items: center;
    gap: 15px;                 /* espacio entre botones */
    flex-wrap: wrap;           /* evita desbordes en móvil */
    margin: 0 auto;
}

#main-slide a.slider {
    position: relative;
    z-index: 3;
}

#main-slide a.slider.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.slide-title-box {
    font-size: 16px;
    line-height: 39px;
    background: #ffb600;
    color: #fff;
    display: inline-block;
    padding: 0 15px;
    margin: 0 0 10px;
}

/* small letters in the carousel */
.slide-title {
    font-size: 30px;
    line-height: 30px;
    font-weight: 250;
    color: #fff;
    margin: 30px 0 40px;
    
}

/* Big letters in the text of carousel  */
.slide-sub-title {
    font-style: normal;
    font-size: 40px;
    line-height: 50px;
    margin: 20px 0 30x 0;
    color: #fff;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.slider-text {
    display: table;
    vertical-align: bottom;
    color: #fff;
    padding-left: 40%;
    width: 100%;
    padding-bottom: 0;
    padding-top: 20px;
}

.slider-text .slide-head {
    font-size: 36px;
    color: #0052a5;
    position: absolute;
}

.slider-img {
    display: block;
    position: absolute;
    top: -80px;
    left: 20%;
    width: 314px;
    max-height: 100%;
}

.slider-img img {
    display: block;
    position: relative;
    max-height: 100%;
    width: auto;
}

/* Carousel buttoms below the text */
.slider.btn {
    margin: 10px 10px; /* Centrado horizontal */
    border: 2px solid #135f84;
    color: #135f84;
    font-family: 'Montserrat', montserrat, sans-serif ;
    font-weight: normal;
    font-size: 18px;
    text-align: center;
    box-shadow: 2px 2px 3px #000;
    border-radius: 15px;
    display:inline-flex; /* Cambia inline-flex a flex */
    align-items: center;
    justify-content: center;
}

.slider.border {
    background: rgba(255, 255, 255, 1);
    border: 2px solid transparent;
    text-align: start;
    box-shadow: 2px 2px 3px #000;
}

.slider.border:hover {
    background: #135f84;
    color: #fff;
    border: 2px solid transparent;
}

#main-slide .carousel-indicators {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;              /* ajusta altura si quieres */
    margin: 0;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

/* Carousel control - puntos de cotrol de paginas of the carousel*/ 
.carousel-indicators li {
    width: 25px !important;
    height: 25px !important;
    margin: 5px !important;
    border-radius: 50px !important;
    border: 0 !important;
    background-color: rgba(255, 255, 255, 0.6); /* Set a background color */
    float: none;               /* 🔴 clave: elimina el float de Bootstrap */
    display: inline-block;
}

#main-slide .carousel-indicators li.active,
#main-slide .carousel-indicators li:hover {
    background: #135f84;
    -moz-transition: all 300ms ease;
    -webkit-transition: all 300ms ease;
    -ms-transition: all 300ms ease;
    -o-transition: all 300ms ease;
    transition: all 300ms ease;
}

#main-slide .carousel-control.left,
#main-slide .carousel-control.right,
#main-slide .carousel-indicators {
    opacity: 1;                     /* Hace que los controles y puntos de navegacion sean visibles siempre y no solo en hover */
    filter: alpha(opacity=1);
    background-image: none;
    background-repeat: no-repeat;
    text-shadow: none;
    -webkit-transition: all .25s ease;
    -moz-transition: all .25s ease;
    -ms-transition: all .25s ease;
    -o-transition: all .25s ease;
    transition: all .25s ease;
}

#main-slide:hover .carousel-control.left,
#main-slide:hover .carousel-control.right,
#main-slide:hover .carousel-indicators {
    opacity: 1;
    filter: alpha(opacity=1);
}

#main-slide .carousel-control .fa-angle-left,
#main-slide .carousel-control .fa-angle-right {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-block;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}

#main-slide .carousel-control .fa-angle-left {
    left: 20px;
}

#main-slide .carousel-control .fa-angle-right {
    right: 20px;
}

/* left and right controls of the carousel */
#main-slide .carousel-control i {
    position: fixed; /* Fixed/sticky position */

    background-color: rgba(255, 255, 255, 0.6); /* Set a background color */
    color: #135f84;
    line-height: 30px;
    cursor: pointer; /* Add a mouse pointer on hover */
    border-radius: 50px;
    font-size: 25px; /* Adjusted font size */
    border: 0.5px solid #bebebe; /* Thin border */
    padding: 10px 10px; /* Remove extra padding */
    margin-left: 30px;
    margin-right: 30px;
    width: 50px;
    height: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #000;
    display: flex; /* Enable flexbox */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */

    -moz-transition: all 500ms ease;
    -webkit-transition: all 500ms ease;
    -ms-transition: all 500ms ease;
    -o-transition: all 500ms ease;
    transition: all 500ms ease;
}

#main-slide .carousel-control i:hover {
    background: #135f84 ;   
    color: #fff;
}

/*-- Animation */
.carousel .item.active .animated2 {
    -webkit-animation: slideInLeft .5s ease-in 300ms both;
    animation: slideInLeft .5s ease-in 300ms both;
}

.carousel .item.active .animated3 {
    -webkit-animation: fadeInLeft 1s ease-in-out 300ms both;
    animation: fadeInLeft 1s ease-in-out 300ms both;
    display: flex; /* Cambiado a inline-flex para permitir un centro más efectivo */
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */ 
}

.carousel .item.active .animated4 {
    -webkit-animation: lightSpeedIn 1s ease-in 300ms both;
    animation: lightSpeedIn 1s ease-in 300ms both;
}

.carousel .item.active .animated5 {
    -webkit-animation: bounceInLeft 1s ease-in-out 100ms both;
    animation: bounceInLeft 1s ease-in-out 100ms both;
}

.carousel .item.active .animated6 {
    -webkit-animation: fadeInRight 1s ease-in 200ms both;
    animation: fadeInRight 1s ease-in 200ms both;
}

.carousel .item.active .animated7 {
    -webkit-animation: fadeInRight 1.5s ease-in 300ms both;
    animation: fadeInRight 1.5s ease-in 300ms both;
}

.carousel .item.active .animated8 {
    -webkit-animation: bounceInDown 1s ease-in 800ms both;
    animation: bounceInDown 1s ease-in 800ms both;
}


/*-- Owl slide common --*/
.owl-carousel.page-slider .owl-nav {
    margin: 0;
}

.owl-carousel .owl-nav {
    text-align: center;
    margin-top: 50px;
}

.owl-carousel .owl-nav>div {
    margin: 0 5px;
    background-color: #135f84;
    color: #fff;
    width: 32px;
    height: 32px;
    line-height: 24px;
    display: inline-block;
    text-align: center;
    font-size: 20px;
    border-radius: 4px;
    -webkit-transition: 400ms;
    -moz-transition: 400ms;
    -o-transition: 400ms;
    transition: 400ms;
}

.owl-carousel .owl-nav>div:hover {
    background: #272d33;
}

.owl-theme .owl-dots {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.owl-theme .owl-dots .owl-dot {
    display: inline-block;
}

.owl-theme .owl-dots .owl-dot span {
    width: 30px;
    height: 4px;
    margin: 5px 4px;
    background: #000;
    opacity: .2;
    display: inline-block;
}

.owl-theme .owl-dots .owl-dot.active span {
    background: #135f84;
    opacity: 1;
}

/* Owl Page slider */
.page-slider.owl-theme .owl-nav>div {
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    width: 36px;
    height: 72px;
    line-height: 60px;
    font-size: 26px;
    text-align: center;
    margin: 0;
    border-radius: 0;
    -webkit-transition: 400ms;
    -moz-transition: 400ms;
    -o-transition: 400ms;
    transition: 400ms;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    position: absolute;
}

.page-slider.owl-theme .owl-nav>.owl-prev {
    left: 0;
}

.page-slider.owl-theme .owl-nav>.owl-next {
    right: 0;
}

.page-slider.owl-theme .owl-nav>div:hover {
    background: #ffb600;
    color: #fff;
}

.page-slider .item {
    min-height: 700px;
    background-position: 50% 50%;
    -webkit-background-size: cover;
    background-size: cover;
}

.page-slider.page-slider-small .item {
    max-height: 500px;
    min-height: auto;
}

.page-slider-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 5px 20px;
    background: rgba(255, 255, 255, .9);
}

.page-slider-caption h3 {
    font-size: 20px;
}

.page-slider-caption span {
    font-weight: 400;
}


/* Owl Box slider */
.box-slider-content {
    top: 50%;
    padding: 0;
    position: absolute;
    width: 100%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}

.box-slider-text {
    background: #111;
    background: rgba(0, 0, 0, 0.65);
    display: inline-block;
    padding: 20px 30px;
    max-width: 650px;
}

.box-slide-title {
    font-size: 18px;
    font-weight: 300;
    margin: 0;
    color: #fff;
}

.box-slide-sub-title {
    font-size: 36px;
    margin: 8px 0 10px;
    color: #fff;
}

.box-slide-description {
    color: #fff;
}

.box-slider-text .btn {
    padding: 10px 20px;
}

.box-slide.owl-theme .owl-controls {
    margin: -20px;
}

/*-- Slider pages --*/
#main-slide.slider-pages .item {
    min-height: 340px;
    color: #fff;
    background-position: 50% 50%;
    -webkit-background-size: cover;
    background-size: cover;
}

/* =========================
   1200px
========================= */
@media (max-width: 1200px) {

  #main-slide {
    height: 500px;
  }

  #main-slide .item {
    min-height: 500px;
  }

  .slide-title {
    font-size: 26px;
  }

  .slide-sub-title {
    font-size: 34px;
    line-height: 44px;
  }

  .slider-text {
    padding-left: 30%;
  }
}


/* =========================
   1100px
========================= */
@media (max-width: 1100px) {

  #main-slide {
    height: 450px;
  }

  #main-slide .item {
    min-height: 450px;
  }

  .slide-title {
    font-size: 24px;
  }

  .slide-sub-title {
    font-size: 30px;
    line-height: 40px;
  }

  .slider-text {
    padding-left: 25%;
  }
}


/* =========================
   900px (tablet)
========================= */
@media (max-width: 900px) {

  #main-slide {
    height: 400px;
  }

  #main-slide .item {
    min-height: 400px;
  }

  #main-slide .slider-content {
    top: 55%; /* 🔥 mejor centrado */
  }

  .slide-title {
    font-size: 22px;
    text-align: center;
  }

  .slide-sub-title {
    font-size: 26px;
    line-height: 34px;
    text-align: center;
  }

  .slider-text {
    padding-left: 0;
    text-align: center;
  }

  #main-slide .slider-content.text-left,
  #main-slide .slider-content.text-right {
    left: 0;
    right: 0;
    text-align: center;
  }

  #main-slide .carousel-control i {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }
}


/* =========================
   600px (mobile)
========================= */
@media (max-width: 600px) {

  #main-slide {
    height: 320px; /* 🔥 evita que sea gigante */
  }

  #main-slide .item {
    min-height: 320px;
  }

  #main-slide .slider-content {
    top: 50%;
  }

  .slide-title {
    font-size: 18px;
    margin: 15px 0;
  }

  .slide-sub-title {
    font-size: 20px;
    line-height: 26px;
    margin: 10px 0;
  }

  #main-slide .slider-content p {
    flex-direction: column; /* 🔥 botones en columna */
    gap: 10px;
  }

  .slider.btn {
    font-size: 14px;
    padding: 8px 12px;
  }

  #main-slide .carousel-control i {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  #main-slide .carousel-indicators li {
    width: 15px !important;
    height: 15px !important;
  }
}