@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('footer.css');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
}

html{ scroll-behavior: smooth; }

body{
    font-family: "Montserrat", sans-serif;
    background-color: #121212;
    color: #eee;
    overflow-x: hidden;
    position: relative;

    /* padding: 0.8rem; */
}
a{ text-decoration: none; }
li{ list-style: none; }

header{
    /* background-color: aqua; */
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100px;

    .logo{
        display: flex;
        align-items: center;
        gap: 1rem;
        /* background-color: red; */

        img{ width: 100px; border-radius: 15px; }
        p{
            font-size: clamp(1.1rem, 1.4vw, 1.2rem);
            font-weight: 500;
            line-height: 1.1;
        }
    }
    nav{
        ul{
            display: flex;
            justify-content: space-around;
            gap: 1rem;
            /* background-color: blue; */

            .secciones, .barra{
                display: flex;
                align-items: center;
                position: relative;
                font-size: 0.85rem;
                text-decoration: none;
                list-style: none;
                padding: 1rem 1.5rem;
                cursor: pointer;
                font-weight: 600;
                transition: all 0.2s ease-in-out;

                a{ z-index: 1; }
            }

            .secciones::after{ opacity: 0; }
            .barra{ display: none; }
            .servicios{ text-shadow: 2px 2px 10px white; }
            .secciones::after{
                content: '';
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                background-color: transparent;
                border-bottom: solid;
                /* opacity: 1; */
                transition: all 0.3s ease-in-out;
            }
            .servicios::after{
                content: '';
                position: absolute;
                left: 0;
                top: 0;
                opacity: 1;
                width: 100%;
                height: 100%;
                background-color: transparent;
                border-bottom: solid;
            }
            .secciones:hover::after, .secciones:hover,
            .secciones:active::after, .secciones:focus::after{ opacity: 1;  text-shadow: 2px 2px 10px white;}
        }
        .sidebar{
            position: fixed;
            /* display: flex; */
            display: none;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            top: 0;
            right: 0;
            height: 100vh;
            width: 250px;
            z-index: 999;
            backdrop-filter: blur(8px);
            box-shadow: -10px 0 10px rgba(0, 0, 0, 0.5);
            /* padding: 1rem 0 0 0; */
            .secciones, .cerrar_sidebar{ display: flex; align-items: center; width: 100%; height: 60px; }
            .seecciones a{ width: 100%; }
            .cerrar_sidebar{
                cursor: pointer;
                z-index: 1000;
                padding: 1rem 1.5rem;
            }
        }
    }
}

.seccion_servicios{
    width: 100%;
    padding: 4rem 1.5rem;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    border-top: solid 1px;

    .servicios_header{
        text-align: center;

        h2{ font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
        p{ font-size: clamp(0.85rem, 1.5vw, 1rem); color: #bcbcbc; }
    }

    .servicios_info{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
        padding: 1.2rem 0;
        width: 80%;

        .servicio_card{
            background: #181818;
            border: 1px solid #222;
            border-radius: 16px;
            padding: 2rem 1rem;
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;

            .icono{
                font-size: 2.2rem;
                display: block;
                margin-bottom: 1rem;
            }
            h3{
                font-size: clamp(1.1rem, 2vw, 1.3rem);
                margin-bottom: 0.6rem;
            }
            p{
                font-size: clamp(0.8rem, 1.5vw, 0.9rem);
                line-height: 1.5;
                color: #d0d0d0;
            }
        }
        .servicio_card:hover{
            transform: translateY(-6px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.6);
        }
    }

    .servicios_btn{
        width: 100%;
        display: flex;
        justify-content: center;

        a{
            background-color: #191A1D;
            color: #fff;
            border: none;
            padding: 1rem 2rem;
            font-size: 0.9rem;
            border-radius: 50px;
            cursor: pointer;
            box-shadow: 0 0 0 rgba(255, 255, 255, 0.8);
            transition: box-shadow 0.4s, transform 0.2s;
        }
        a:hover{
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
            transform: scale(1.05);
        }
    }
}

@media (min-width: 1213px) and (max-width: 1607px){
    .servicios_info{
        
        .servicio_card:nth-child(4){ grid-column: 2 / 3; }
    }
}


@media (max-width: 800px){
    #menu{ display: none; }
    header nav ul .barra{ display: block; }

}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px){
    .seccion_servicios{
        .servicios_info{
            .servicio_card:hover, .servicio_card:active{
                transform: translateY(-6px);
                box-shadow: 0 10px 30px rgba(0,0,0,0.6);
            }
        }

        .servicios_btn{
            a{ box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); transition: transform 0.3s; }
            a:hover, :active{ transform: scale(1.1); }
        }
    }


}

/* Teléfonos (general) */
@media (max-width: 768px){
    body{ width: 100%; overflow-x: hidden; }

    header{
        .logo{ gap: 0.5rem; }
        nav{ ul{ gap: 0.5rem; .secciones:active, .secciones:active::after{ opacity: 1;  text-shadow: 2px 2px 10px white; } } }
    }
    #menu{ display: none; }
    header nav ul .barra{ display: block; }

    .seccion_servicios{
        .servicios_info{
            .servicio_card:hover, .servicio_card:active{
                transform: translateY(-6px);
                box-shadow: 0 10px 30px rgba(0,0,0,0.6);
            }
        }

        .servicios_btn{
            a{ box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); transition: transform 0.3s; }
            a:hover, :active{ transform: scale(1.1); }
        }
    }

}

/* Teléfonos pequeños */
@media (max-width: 480px){

    body{ width: 100%; overflow-x: hidden; }

    header{
        width: 100%;
        height: 80px;
        .logo{
            gap: 0.5rem;
            img{ width: 70px; }
            p{ font-size: 0.9rem; }
        }
        nav{
            ul{ .barra{ font-size: 0.1rem; padding: 0; } }
            .sidebar{
                width: 50%;
                height: 200vh;
                position: fixed;
                .secciones, .cerrar_sidebar{ height: 50px; padding: 0 1rem; }
                .cerrar_sidebar{ padding: 2rem 1rem; }
            }
        }
    }

    .seccion_servicios{
        .servicios_header{
            text-align: center;

            h2{ font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 0.7rem; }
            p{ font-size: clamp(0.85rem, 1.5vw, 1rem); color: #bcbcbc; }
        }

        .servicios_info{
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 2rem;

            .servicio_card{
                background: #181818;
                border: 1px solid #222;
                border-radius: 16px;
                padding: 2rem 1.5rem;
                text-align: center;
                transition: transform 0.3s ease, box-shadow 0.3s ease;

                .icono{
                    font-size: 2.2rem;
                    display: block;
                    margin-bottom: 1rem;
                }
                h3{
                    font-size: clamp(1.1rem, 2vw, 1.3rem);
                    margin-bottom: 0.6rem;
                }
                p{
                    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
                    line-height: 1.5;
                    color: #d0d0d0;
                }
            }
            .servicio_card:hover{
                transform: translateY(-6px);
                box-shadow: 0 10px 30px rgba(0,0,0,0.6);
            }
        }

        .servicios_btn{
            width: 100%;
            display: flex;
            justify-content: center;

            a{
                background-color: #191A1D;
                color: #fff;
                border: none;
                padding: 1rem 2rem;
                font-size: 0.9rem;
                border-radius: 50px;
                cursor: pointer;
                box-shadow: 0 0 0 rgba(255, 255, 255, 0.8);
                transition: box-shadow 0.4s, transform 0.2s;
            }
            a:hover{
                box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
                transform: scale(1.05);
            }
        }
    }

    .seccion_servicios{
        .servicios_info{
            .servicio_card:hover, .servicio_card:active{
                transform: translateY(-6px);
                box-shadow: 0 10px 30px rgba(0,0,0,0.6);
            }
        }

        .servicios_btn{
            a{ box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); transition: transform 0.3s; }
            a:hover, :active{ transform: scale(1.1); }
        }
    }
}