/* Las fuentes ahora se importan desde fuentes.css */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body{
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #888a8a, #d5d8da);
    font-family: var(--font-principal);
}

main {
    margin: 0;
    padding: 0;
    margin-top: -20px;
    margin-left: -20px;
    justify-content: center;
    align-items: center;
}

/* carousel */
.carousel{
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.carousel .list {
    transition: transform 0.5s ease-in-out; /* Transición suave */
}

.carousel .list .item{
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}
.carousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel .list .item .content{
    position: absolute;
    width: 600px;
    height: 515px;
    max-width: 60%;
    left: 25%;
    transform: translateX(-50%);
    padding-right: 20px;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px #0004;
}
.carousel .list .item .name{
    font-weight: bold;
    letter-spacing: 10px;
}
.carousel .list .item .title,
.carousel .list .item .topic{
    font-size: 60px;
    font-weight: bold;
    line-height: 1.3em;
}
.carousel .list .item .topic{
    color: #f1683a;
}
.carousel .list .item .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}
.carousel .list .item .buttons button{
    border: none;
    background-color: #eee;
    letter-spacing: 3px;
    font-family: var(--font-principal);
    font-weight: 500;
}
.carousel .list .item .buttons button:nth-child(2){
    background-color: transparent;
    border: 1px solid #fff;
    color: #eee;
}
/* thumbail */
.thumbnail{
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px;
}
.thumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}
.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.thumbnail .item .content{
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}
.thumbnail .item .content .title{
    font-weight: 500;
}
.thumbnail .item .content .description{
    font-weight: 300;
}
/* arrows */
.arrows{
    position: absolute;
    top: 80%;
    right: 52%;
    z-index: 1;
    width: 200px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
}
.arrows button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    color: #fff;
    font-family: var(--font-principal);
    font-weight: bold;
    transition: .5s;
}
.arrows button:hover{
    background-color: #fff;
    color: #000;
}

/* animation */
.carousel .list .item:nth-child(1){
    z-index: 1;
}

/* animation text in first item */

.carousel .list .item:nth-child(1) .content .name,
.carousel .list .item:nth-child(1) .content .title,
.carousel .list .item:nth-child(1) .content .topic,
.carousel .list .item:nth-child(1) .content .des,
.carousel .list .item:nth-child(1) .content .buttons
{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent .5s 1s linear 1 forwards;
}
@keyframes showContent{
    to{
        transform: translateY(0px);
        filter: blur(0px);
        opacity: 1;
    }
}
.carousel .list .item:nth-child(1) .content .title{
    animation-delay: 1.2s!important;
}
.carousel .list .item:nth-child(1) .content .topic{
    animation-delay: 1.4s!important;
}
.carousel .list .item:nth-child(1) .content .des{
    animation-delay: 1.6s!important;
}
.carousel .list .item:nth-child(1) .content .buttons{
    animation-delay: 1.8s!important;
}
/* create animation when next click */
.carousel.next .list .item:nth-child(1) img{
    width: 150px;
    height: 220px;
    position: absolute;
    bottom: 50px;
    left: 50%;
    border-radius: 30px;
    animation: showImage .5s linear 1 forwards;
}
@keyframes showImage{
    to{
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.carousel.next .thumbnail .item:nth-last-child(1){
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}
.carousel.prev .list .item img{
    z-index: 100;
}
@keyframes showThumbnail{
    from{
        width: 0;
        opacity: 0;
    }
}
.carousel.next .thumbnail{
    animation: effectNext .5s linear 1 forwards;
}

@keyframes effectNext{
    from{
        transform: translateX(150px);
    }
}

/* running time */

.carousel .time{
    position: absolute;
    z-index: 1000;
    width: 0%;
    height: 3px;
    background-color: #f1683a;
    left: 0;
    top: 0;
}

.carousel.next .time,
.carousel.prev .time {
    animation: runningTime 3s linear 1 forwards;
}
@keyframes runningTime{
    from{ width: 100%}
    to{width: 0}
}


/* prev click */

.carousel.prev .list .item:nth-child(2){
    z-index: 2;
}

.carousel.prev .list .item:nth-child(2) img{
    animation: outFrame 0.5s linear 1 forwards;
    position: absolute;
    bottom: 0;
    left: 0;
}
@keyframes outFrame{
    to{
        width: 150px;
        height: 220px;
        bottom: 50px;
        left: 50%;
        border-radius: 20px;
    }
}

.carousel.prev .thumbnail .item:nth-child(1){
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail .5s linear 1 forwards;
}
.carousel.next .arrows button,
.carousel.prev .arrows button{
    pointer-events: none;
}
.carousel.prev .list .item:nth-child(2) .content .name,
.carousel.prev .list .item:nth-child(2) .content .title,
.carousel.prev .list .item:nth-child(2) .content .topic,
.carousel.prev .list .item:nth-child(2) .content .des,
.carousel.prev .list .item:nth-child(2) .content .buttons
{
    animation: contentOut 1.5s linear 1 forwards!important;
}

.content {
    background: rgba(0, 0, 0, 0.5); /* Fondo negro con 50% de opacidad */
    color: white; /* Texto blanco para mejor contraste */
    padding: 30px; /* Espaciado interno */
    border-radius: 8px; /* Bordes redondeados opcionales */
    margin-top: 42px;
}


@keyframes contentOut{
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

.buttons {
    font-size: 16px;
  }

  .birthstone-regular {
    font-family: var(--font-titulos);
    font-size: 4rem !important;
    font-weight: var(--font-bold);
    font-style: italic;
    text-align: center;
    color: rgb(216, 25, 25);
    /* Color principal del texto */
    text-shadow:
        2px 2px 0 black,
        -2px 2px 0 black,
        4px 4px 4px rgba(0, 0, 0, 0.5);
}

.informacion {
    font-family: var(--font-principal);
    background: linear-gradient(to right, #2c3e50, #34495e);
    color: #ecf0f1;
    padding: 20px;
    display: block;
    width: 100vw;
  }

.presentacion {
    margin-left: -10px ;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
}


/* Título Servicios de Seguridad e Higiene en el Trabajo */
#titulo {
    font-size: 2rem;
    text-align: center;
}

/* Subtítulos */
.t2 {
    font-size: 20px;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 5px;
}

#direccion {
    text-align: center;
    color: black;
    font-family: var(--font-titulos);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: -460px;
}

.mapa {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#map {
    border-radius: 2%;
    height: 300px;
    width: 90%;
    box-shadow: 5px 5px 2.5px #161616;
    margin-bottom: -475px;
}


.servicios-lista {
    margin-bottom: 15px; /* Ajusta el espacio entre elementos */
    text-align: justify;
}

.highlight {
    background-color: yellow;
    color: red;
}

/*********************************************** Media Queries para Celulares ***********************************************/
@media (max-width: 650px) {
    .carousel .list .item .content {
        position: absolute;
        width: 380px !important;
        height: 510px;
        max-width: 80%;
        margin-top: 5px;
        margin-left: 65px;
    }

    .carousel .list .item .name {
        font-size: 12px;
    }

    .carousel .list .item .title {
        font-size: 32px;
    }

    .carousel .list .item .topic {
        color: #f1683a;
        font-size: 34px;
    }

    .carousel .des {
        font-size: 12px;
    }

    .carousel .buttons {
        flex-direction: column;
        align-items: center;
    }

    .carousel .buttons button {
        width: 100%;
        padding: 5px;
        margin: 5px 0;
        font-size: 14px;
    }

    p {
        font-size: 1rem;
        line-height: 1.7;
        text-align: justify;
    }


    .servicios-lista {
        margin-bottom: 15px; /* Ajusta el espacio entre elementos */
        text-align: justify;
    }

    .titulo-mapa {
        margin-bottom: 10px;
    }
    .mapa {
        margin-bottom: 30px;
    }
}

/*********************************************** Media Queries para Tablets ***********************************************/
@media (min-width: 651px) and (max-width: 850px) { 
    .carousel .list .item .content {
        position: absolute;
        width: 840px !important;
        height: 600px;
        max-width: 80%;
        margin-top: 5px;
        margin-left: 120px !important;
        margin-bottom: 60px;
        }
        
        .carousel{
            height: 500px;
            width: 100vw;
            overflow: hidden;
            position: relative;
        }

        .thumbnail {
            margin-top: 150px;
        }


    .carousel .list .item .name {
        font-size: 15px;
      }
      
      .carousel .list .item .title {
        top: -10px;
        font-size: 30px;
    }

    .carousel .list .item .topic {
        color: #f1683a;
        font-size: 32px;
    }

      .carousel .des {
        font-size: 6px;
      }
    
      .carousel .buttons button {
        padding: 8px 16px;
        font-size: 14px;
      }

      .arrows{
        margin-top: 20px;
      }

      .thumbnail{
        bottom: 0;
        left: 55%;
        gap: 10px;
    }

/* Título Servicios de Seguridad e Higiene en el Trabajo */
#titulo {
    font-size: 1.8rem;
    text-align: center;
}

/* Subtítulos */
.t2 {
    margin-left: -5px;
    font-size: 22px;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 5px;
}

    #direccion {
        margin-bottom:-190px;
    }
    
    .mapa {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin-bottom: 300px;
    }

    #map {
        border-radius: 2%;
        height: 450px;
        width: 90%;
        box-shadow: 5px 5px 2.5px #161616;
    }
    p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: justify;
    }

    .servicios-lista {
        margin-bottom: 15px; /* Ajusta el espacio entre elementos */
        text-align: justify;
    }
    
}

/*********************************************** Media Queries para Notebooks ***********************************************/
@media (min-width: 851px) {
    #direccion {
        text-align: center;
        color: black;
        font-family: var(--font-titulos);
        font-size: 2.0rem;
        font-weight: bold;
        margin-bottom: -250px;
    }

    #manito {
        text-align: center;
    }

    .mapa {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin-bottom: 120px; /* último cambio */
    }

    #map {
        margin-top: -120px;
        border-radius: 2%;
        height: 450px;
        width: 800px;
        box-shadow: 5px 5px 2.5px #161616;
    }

    .t2 {
        margin-top: 20px;
        border-bottom: 2px solid #f39c12;
        padding-bottom: 5px;
    }

    .presentacion {
        background: rgba(255, 255, 255, 0.1);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: justify;
    }
}