* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 1rem;
    transition: all 0.3s ease;
    z-index: 1000;
}
@media only screen and (max-width: 800px) {

    #header nav ul{
        display:none;
    }
    #header nav .logo a img{

        transition: all 0.3s ease;
        width:250px;
        float:left;
    }
    #header.scrolled nav .logo a img{
        transition: all 0.3s ease;
        width:200px;
    }
    .presentacion h1{
        margin-top:20%;
    }
    .presentacion{
        width:100%;
        margin:0;
        justify-content: space-between;
        align-items:center;
        font-size:11pt;
        
    }

    div .servicio{
        position:relative;
        display:inline-block;
        width:100%;
        height:69%;
    }
    .servicios-container{

        position: relative;
        width:100%;
        clear:left;
        
    }
    #lightbox .close{
        position:static;
        cursor: pointer;
        margin-left:20px;
        width:200px;
        height:200px;
    }
    .lightbox-nav {
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        padding: 1rem;
    }
    /* Servicios */
    #servicios {
        padding: 4rem 2rem;
        background-color: #f4f4f4;
    }

    .servicios-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        margin-top: 2rem;
    }

    div .servicio {
        width: 100%;
        margin-bottom: 2rem;
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        cursor: pointer;
        /*max-height:900px;*/
    }

    .servicio:hover {
        transform: translateY(-5px);
    }

    .servicio h3 {
        padding: 1rem;
        background-color: #333;
        color: #fff;
    }

    .servicio img {
        width: 100%;
        height: auto;
        display: block;
    }
    .servicio p {
        padding: 1rem;
        background-color: #333;
        color: #fff;
    }
    #contacHeader{
        margin-left:-15px;
        clear:left;
        display:none;
    }

}
@media only screen and (min-width: 801px) {
    
    #contacHeader{
        margin-left:12%;
    }
    #header.scrolled nav .logo a img{
        transition: all 0.3s ease;
        width:250px;
    }
    #header nav .logo a img{
        transition: all 0.3s ease;
        width:300px;
    }
    /* Servicios */
    #servicios {
        padding: 4rem 2rem;
        background-color: #f4f4f4;
    }
    #servicios p{
        font-size:0.8em;
    }

    .servicios-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        margin-top: 2rem;
    }

    div .servicio {
        width: 45%;
        margin-bottom: 2rem;
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        cursor: pointer;
        max-height:900px;
    }

    .servicio:hover {
        transform: translateY(-5px);
    }

    .servicio h3 {
        padding: 1rem;
        background-color: #333;
        color: #fff;
    }

    .servicio img {
        width: 100%;
        height: auto;
        display: block;
    }
    .servicio p {
        padding: 1rem;
        background-color: #333;
        color: #fff;
    }
    .prev, .next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        padding: 1rem;
        border: none;
        cursor: pointer;
        font-size: 1.5rem;
        transition: background-color 0.3s ease;
    }
}
#header.scrolled {
    padding: 0.5rem 1rem;
    background-color: rgba(51, 51, 51, 0.9);
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a img{
    font-size: 1.5rem;
    font-weight: bold;
    width:300px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav ul li a:hover, nav ul li a.active {
    background-color: #fff;
    color: #333;
}

/* Slider */
.slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

/* Presentación */
.presentacion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 10px;
}
/* Nosotros */
#nosotros {
    padding: 4rem 2rem;
    background-color: #f4f4f4;
}


/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
}

#lightbox-img {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.close {
    color: #fff;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-nav {
    position: fixed;
    bottom: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.lightbox-nav button {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lightbox-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Contacto */
#contacto {
    background-color: #333;
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

.info-contacto {
    max-width: 500px;
    margin: 2rem auto 0;
    text-align: left;
}

.info-contacto p {
    margin-bottom: 1rem;
}

.info-contacto i {
    margin-right: 0.5rem;
}

.redes-sociales {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.redes-sociales a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.redes-sociales a:hover {
    color: #ddd;
}

/* Botón volver arriba */
#volver-arriba {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #333;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#volver-arriba.visible {
    opacity: 1;
}