* { box-sizing: border-box; }

::selection {
    background-color: #d25656;
    text-shadow: 2px 1px 4px rgba(0, 0, 0, 0.8);
    color: white;
}

html {
    font-family: "Noto Sans", sans-serif;
    font-size: 15px;
    font-style: normal;
    font-optical-sizing: auto;
    font-variation-settings: "wdth" 100;
}

body {
    margin: 40px auto 0;
    width: 80%;
}

a {
    text-decoration: none;
    color: inherit;
}

    a:hover {
        color: #f30500;
    }

b {
    font-weight: 600;
}

h1 {
    font-weight: 700;
    font-size: 2em;
    margin: 18px 0;
}

h2 {
    font-weight: 700;
    font-size: 1.5em;
    margin: 18px 0;
    line-height: 15px;
}

h3 {
    font-weight: 700;
    font-size: 1.1em;
    line-height: 15px;
    padding-left: 3px;
    margin: 15px 0;
    color: #8e8e8e;
}

p {
    line-height: 21px;
    margin: 16px 0;
}

#menu {
    display: grid;
    grid-template-columns: 1.5fr .5fr;
    align-items: center;
    justify-items: end;

    margin: 0 0 40px auto;
    width: 90%;
}

#icon-menu {
    display: none;
}

#menu ul li {
    display: inline-block;
    margin-right: 40px;
    font-weight: 600;
    font-size: 1.1em;
    text-transform: uppercase;
    line-height: 8px;
}

#menu-active::after {
    content: '';
    display: inherit;
    float: left;
    margin-top: 8px;
    width: 18%;
    margin-left: 41%;
    border-top: solid 2px black;
}

#menu-active:hover::after {
    border-top: solid 2px #f30500;
}

    .menu-inactive::after {
        content: '';
        display: inherit;
        width: 18%;
        margin-left: 41%;
        border-top: solid 2px none;
    }

#compromiso {
   text-align: center;
   width: 60%;
   margin: 80px auto;
}

#compromiso img {
    max-width: 150px;
    padding: 0 15px;
}

#compromiso img:hover {
    /* opacity: .5; */
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3));
}

#grid-proyectos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2em;
    width: 75%;
    /* border: solid 1px black; */
    margin: 40px auto 100px;
    position: relative;
}

#grid-servicios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: 4%;
    row-gap: 8%;
    width: 75%; /* Ajusta según sea necesario */

    /* border: solid 1px black; */
    margin: 40px auto 100px;
}

    .grid-servicios-element {
        max-width: 250px;
        height: 300px;

        display: grid;
        grid-template-rows: repeat(1, 1fr);

        position: relative;
        cursor: pointer;

        box-shadow: 4px 4px 10px 0px rgba(0, 0, 0, 0.1);
        transition: box-shadow 0.4s ease;
    }

    .grid-servicios-element:hover {
        box-shadow: 8px 8px 15px 0px rgba(0, 0, 0, 0.4);
    }

        .grid-servicios-element::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-size: cover;
            background-position: center;
            filter: brightness(65%);
            opacity: 1;
            z-index: -1;
        }

        .grid-servicios-industrial::before {
            background-image: url('../img/bg-industrial.jpg');
        }
        .grid-servicios-decorativos::before {
            background-image: url('../img/bg-decorativos.jpg');
        }
        .grid-servicios-senyalizacion::before {
            background-image: url('../img/bg-senyalizacion.jpg');
        }
        .grid-servicios-fuego::before {
            background-image: url('../img/bg-fuego.jpg');
        }
        .grid-servicios-rotulacion::before {
            background-image: url('../img/bg-rotulacion.jpg');
        }
        .grid-servicios-estructuras::before {
            background-image: url('../img/bg-estructuras.jpg');
        }

        .grid-servicios-element p {
            color: white;
            padding: 10px;
        }

        .grid-servicios-element h2 {
            font-weight: 600;
            font-size: .9em;
            background-color: white;
            padding: 15px 10px;
            text-transform: capitalize;
            margin: 0;
            line-height: 18px;
        }

            /* .grid-servicios-element h2::after {
                content: '...';
                position: absolute;
                bottom: 17px;
                right: 8px;
                font-size: 1.5em;
            } */

#nosotros {
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0;}
    to {opacity: 1;}
}


#nosotros img{
    display: block;
    width: 80%;
    margin: 30px auto;
}

    #nosotros-cita {
        width: 350px;
        position: absolute;
        top: 30%;
        left: 15%;
        /* border: solid 1px black; */

        font-size: 1.2em;
        font-weight: 400;

        line-height: 28px;
        text-align: center;
        
        opacity: 0;
        animation: fadeIn 2s forwards;
        animation-delay: 300ms;
    }

    #nosotros-cita b{
        font-weight: 900;
    }

    #cita {
        font-style: italic;
        font-family: "Noto Serif", serif;
        font-size: 1.1em;
        line-height: 28px;
    }

        #cita p {
            margin: 0;
        }

    #cita-init {
        position: relative;
    }

    #cita-init::before {
        content: "\201C";
        position: absolute;
        left: -30px;
        font-family: "Palanquin Dark", sans-serif;
        font-size: 2.5em;
    }

    #cita-end {
        position: relative;
    }

        #cita-end::after {
            content: "\201D";
            top: 2px;
            position: absolute;
            font-family: "Palanquin Dark", sans-serif;
            font-size: 2.5em;
            font-weight: 100;
        }

    #cita-autor {
        margin: 20px 0 10px;
        font-weight: 700;
        opacity: 0;
        animation: fadeIn 2s forwards;
        animation-delay: 2800ms;
    }

    #cita-autor::after {
        content: '';
        display: inherit;
        float: left;
        margin-top: 4px;
        width: 18%;
        margin-left: 41%;
        border-top: solid 2px black;
    }

    #cita-gerente {
        text-transform: uppercase;
        font-weight: 400;
        font-size: 0.8em;
        letter-spacing: 1px;

        opacity: 0;
        animation: fadeIn 2s forwards;
        animation-delay: 3600ms;
    }


/* ###########   PROYECTO   ######################  */

#proyecto {
    position: relative;
    margin-bottom: 100px;
}

#proyecto-info h1 {
    margin-bottom: -10px;
    text-transform: capitalize;
}

/* #proyecto-info {
    position: absolute;
    left: -80px;
    top: -50px;
    padding: 0 20px;

    width: 40%;
    max-width: 490px;

    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: -4px 4px 10px 0px rgba(0, 0, 0, 0.1);
} */

#zoom {
    display: grid;
    width: 300px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 19px;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 0;
    border-radius: 5px;
}

#zoom:hover {
    /* filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3)); */
    color: #f30500;
}

#proyecto-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    height: 500px;
    /* margin-bottom: 100px; */
    /* padding-left: 25%;
    padding-right: 5%; */
}

#proyecto-slider img {
    height: auto;
    flex-shrink: 0;
    margin-right: 20px;
}

.btn,
#modal-btn-left,
#modal-btn-right,
#modal-btn-exit {
    /* position: absolute; */
    /* top: 50%; */
    width: 50px;
    height: 50px;
    /* transform: translateY(-50%); */
    background-color: rgba(255, 255, 255, 0.7);
    color: #0e0e0e;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    /* z-index: 1; */
    font-size: 2em;
    box-shadow: -4px 4px 10px 0px rgba(0, 0, 0, 0.3);
}

    .btn:hover {
        color: #f30500;
    }

    .btn-left {
        left: 30%;
    }

    .btn-right {
        right: 20px;
    }

#modal-options {
    margin-bottom: 20px;
}

#modal-btn-exit {
    margin-left: 40px;
    color: #d25656;
}

#proyecto-slider::-webkit-scrollbar {
    display: none;
}

/* ###########   MODAL    ########################  */


#modal {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100vh;

    z-index: 1;

    background-color: rgba(0, 0, 0, 0.8);
}

    #modal-content {
        position: relative;
        text-align: center;

        margin:  5% auto;
        width: 80%;
    }

    #modal-img {
        max-width: 900px;
        max-height: 80vh;
    }

/* ###########   FOOTER   ########################  */
footer {
    width: 100%;
    position: absolute;
    left: 0;
    background-color: rgb(22, 22, 22);
    padding: 40px;
    
    color: whitesmoke;
    text-transform: uppercase;
    text-align: center;
}

#footer {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(1, 1fr);
    align-items: center;
    justify-items: center;
    gap: 4%;

    line-height: 30px;
}

    .footer-logo {
        max-width: 225px;
    }

    .footer-iso {
        max-width: 48px;
    }

    .footer-right {
        text-align: right;
    }

    .footer-right img:hover {
        filter: contrast(0%) sepia(1) hue-rotate(310deg) saturate(1000%);
    }

#footer-links {
    margin-top: 40px;
    font-size: .9em;
}

.link {
    color: #5fcb4b;
}

/*  */

.hide {
    display: none;
}

.capitalized {
    text-transform: capitalize;
}

#formulario {
    display: flex;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

    #formulario h1 {
        text-align: center;
    }

    #formulario a {
        color: #5fcb4b;
    }

input[type="text"], input[type="email"], input[type="submit"], textarea {
    display: inline-block;
    width: 90%;
    padding: 10px;
    margin: 4px 0;
    border: solid 1px black;
}

input[type="checkbox"] {
    margin-bottom: 20px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    vertical-align: text-top;
}

input[type="submit"] {
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background-color: #f30500;
    color: white;
}
    input[type="submit"]:hover {
        background-color: #5fcb4b;
        color: black;
    }

textarea {
    height: 120px;
    margin-bottom: 20px;
    font-family: inherit;
}

iframe {
    min-width: 800px;
    max-height: 500px;
    height: 100%;
}

#formulario iframe {
    width: 150%;
    height: 600px;
}


/* ********************************************************** */
/* ********************************************************** */
/* ********************************************************** */
/* ********************************************************** */


@media only screen and (max-width: 767px) {

    /* Estilos para teléfonos móviles */
    body {
        width: 100%;
        padding: 20px;
        margin: 0;
    }

    #menu-mobile {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 1;
        width: 100%;
        height: 100vh;
        background-color: white;
        text-transform: uppercase;
        text-align: center;
        font-size: 1.5em;
        font-weight: 700;
        position: fixed;
    }
        #menu-mobile img {
            margin: 40px 0;
        }

        #menu-mobile li{
            margin: 30px 0;
        }

        #menu-mobile-close{
            margin-top: 50%;
            color: #f30500;
        }

    #menu-active{
        color: #f30500;
    }
    #menu-active::after {
        content: none;
    }

    #menu {
        width: 100%;
        justify-items: left;
        margin: 0;
    }

    #menu ul {
        display: none;
    }

    #icon-menu {
        display: inline;
        width: 80px;
        transform: scaleX(-1);
        justify-self: end;
    }

    #nosotros-cita {
        width: 80%;
        top: 0;
        left: 5%;
        font-size: 80%;
        text-align: left;
    }
        #cita-init::before {
            left: -20px;
        }

        #cita {
            line-height: 18px;
            width: 65%;
        }

        #cita-autor, #cita-gerente {
            margin: 0;
        }

        #cita-autor::after {
            float: none;
            margin-left: 5%;
            margin-top: 0;
        }

    #nosotros img {
        width: 100%;
    }

    #compromiso {
        margin: 80px 0;
        width: 100%;
    }

    #compromiso h2 {
        line-height: 26px;
    }

    #compromiso br{
        display: none;
    }

    #compromiso p {
        text-align: left;
    }

    #compromiso a img  {
        margin-top: 40px;
        width: 30%;
    }

    footer {
        padding: 20px;
    }

    #footer {
        display: block;
    }

    footer ul {
        margin: 20px 0;
    }

    #footer ul li {
        display: inline;
    }


    #footer ul li:not(:last-child)::after {
        content: "·";
        padding-right: 5px;
    }

    .footer-right {
        text-align: center;
    }

    .footer-right a:not(:last-child){
        margin-right: 20px;
    }

    #footer-links {
        line-height: 20px;
        text-align: left;
    }

    #grid-servicios,
    #grid-proyectos {
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: 50px;
        width: 100%;
        margin: 40px 0;
    }

    .grid-servicios-element {
        width: 100%;
        max-width: 350px;
        height: 400px;
    }

    .grid-servicios-element h2 {
        font-size: 1.1em;
        padding-left: 30px;
        /* text-align: center; */
    }

    .grid-servicios-industrial::before {
        background-size: cover;
    }

    #proyecto-slider {
        height: 330px;
    }

    #modal-options {
        margin-top: 55%;
    }

    #modal-img {
        width: 100%;
    }

    iframe {
        width: 100%;
        min-width: inherit;
    }

    #formulario {
        flex-direction: column-reverse;
    }

    input[type="text"],
    input[type="email"],
    input[type="submit"],
    textarea {
        width: 100%;
    }

    #formulario iframe {
        width: 100%;
    }

}

.no-scroll {
    overflow: hidden;
}

#mensaje {
    padding: 1em;
    border-radius: 8px;
    font-weight: bold;
    display: none;
    transition: all 0.3s ease;
}

#mensaje.exito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#mensaje.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}