/*=====GENERAL=====*/

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

:root {
    --dark-color: #1a1423;
    --light-color: #fdfffc;
    --accent-color: #6D4ECE;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--dark-color);
}

a {
    color: var(--dark-color);
    text-decoration: none;
}


.btn {
    background: var(--accent-color);
    color: var(--light-color);
    padding: 4px 16px;
    border: 2px solid var(--accent-color);
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease;
}

.btn:hover {
    background: #5947de;
    border: 2px solid #5947de;
    color: #ffff;
}

.btn.outlined {
    color: var(--accent-color);
    background: var(--light-color);
}

.btn.outlined:hover {
    background: var(--accent-color);
    color: #fff;
}

.btn.light {
    background: var(--light-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn.light:hover {
    background: var(--accent-color);
    color: var(--light-color);
}

img {
    width: 100%;
    display: flex;
    object-fit: cover;
}

h1 {
    font-size: 60px;
    line-height: 100%;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 16px 0;
    background: linear-gradient(135deg,#6D4ECE 1%, #433798 30%, #1a1423 60%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

h2 {
    font-size: 36px;
    line-height: 120%;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 8px 0;
    background: linear-gradient(90deg, #4437a4 8%, #0f0916 60%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

h3 {
    font-size: 24px;
    line-height: 130%;
    letter-spacing: -1px;
    margin: 8px 0;
}

p {
    font-size: 16px;
    line-height: 160%;
}

section {
    padding: 60px 0;
}

.subtitulo{
    font-size: 18px;
    padding: 10px 0;
}





.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
}

.progress-bar {
    height: 5px;
    width: 0;
    background-color: var(--accent-color);
    transition: width 0.25s ease-out;
}




/*=====Navbar===== */

nav .container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;

    display: flex;
    justify-content: space-between;
    align-items: center;


    max-width: 1200px;
    margin-inline: auto;
    padding: 8px 16px;

    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    --webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 42px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;

    transition: transform all ease-in-out 0.8;
}

nav.hide{
    display: none;
}

/*logo*/
nav .logo {
    font-weight: 700;
    font-size: 32px;
}

nav .logo a img{
    height: 60px;
    width: auto;
}

/*menu*/
nav .menu {
    display: flex;
    align-items: center;
    gap: 40px;
    font-weight: 700;
}

nav .menu a:hover {
    color: var(--accent-color);
}

nav .menu .btn:hover {
    color: var(--light-color);
}

nav .menu .social-media{
    display: flex;
    gap: 20px;
}

nav .menu .social-media a{
    font-size: 14px;
    padding: 4px 12px;
}

nav .menu .social-media a img{
    width: 20px;
}





/*=====Hero Section=====*/

header {
    display: flex;
    align-items: center;
    min-height: 100vh;
    max-height: 100vh;
    padding-top: 60px;
    overflow: hidden;
}

header .container .arriba{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

}

/*izquierda*/
header .arriba .izquierda {
    width: 50%;
}

header .arriba .izquierda .botones {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

/*derecha*/
header .arriba .derecha {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
header .arriba .derecha .img{
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

header .arriba .derecha img {
    width: 400px;
}

header .arriba .derecha .bg-color {
    position:absolute;
    width: 300px;
    height: 300px;
    background: #ad95ff;
    top: 100px;
    z-index: -1;
    border-radius: 50%;
    filter: blur(115px);
}


/*abajo*/


header .abajo{
    height: 60px;
    top: 0px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(7px);
}

header .difuminar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Deja pasar clics al contenido */
    z-index: 5;
}

header .difuminar .fade-izq,
header .difuminar .fade-drch {
    position: absolute;
    top: 0;
    width: 120px; /* ajustar el ancho del difuminado */
    height: 100%;
    z-index: 10;
}

header .difuminar .fade-izq{
    left: 0;
    background: linear-gradient(
        to right,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.95) 20%,
        rgba(255,255,255,0.85) 40%,
        rgba(255,255,255,0.6) 60%,
        rgba(255,255,255,0.3) 80%,
        rgba(255,255,255,0) 100%
    );
}

header .difuminar .fade-drch {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.95) 20%,
        rgba(255,255,255,0.85) 40%,
        rgba(255,255,255,0.6) 60%,
        rgba(255,255,255,0.3) 80%,
        rgba(255,255,255,0) 100%
    );
}



/*infinito*/

header .abajo .infinito {
    margin: 0;
    width: 100%;
    display: flex;
    overflow: hidden;
}

header .abajo .infinito .contenido {
    gap: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scroll 20s linear infinite;
    white-space: nowrap;
    min-width: 100%;
    flex-shrink: 0;
}

header .abajo .infinito .contenido .tarjeta{
    padding: 0 10px;
}

header .abajo .infinito .contenido .tarjeta h2{
    font-size: 24px;
    text-align: center;
}


@keyframes scroll {
    0% {
    transform: translateX(0);
    }
    100% {
    transform: translateX(-50%);
    }
}



/*=====WHY SECTION=====*/

#why{
    background-color: #f5f5f5;
    min-height: 100vh;
}

#why .container{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100%;
}

#why .container .arriba{
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
}

#why .container .arriba .left{
    width: 50vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    gap: 2rem;
}


#why .container .arriba .left p{
    font-size: 16px;
    margin-top: 20px;
}

#why .container .arriba .right{
    width: auto;
}

#why .container .arriba .right .features-container{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#why .container .arriba .right .feature{
    background-color: white;
    border-radius: 15px;
    transition: all 300ms ease;
}

#why .container .arriba .right .feature:hover{
    transform: scale(1.005);
    box-shadow: 0 3px 80px rgba(0, 0, 0, 0.1);
}


#why .container .arriba .right .feature .titulo .icon{
    width: 3rem;
}

#why .container .arriba .right .feature .titulo h3{
    font-weight: 600;
}

#why .container .arriba .right .feature p{
    padding: 0 10px 0 50px;
}

#why .container .abajo{
    max-width: 10rem;
}

#why .container .abajo .btn{
    width: 100%;
}




/*=====WHAT SECTION=====*/

#what{
    background-color: var(--light-color);
    display: flex;
    align-items: center;
}

#what .container{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

#what .container .arriba{
    width: 70%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#what .container .arriba .titulo{
    font-size: 2rem;;
    margin-bottom: 10px;
}

#what .container .arriba p{
    font-size: 16px;
    margin-top: 20px;
    color: #666;
}

/*carrusel*/
#what .container .carrusel {
    position: relative;
    width: 100%;
    margin: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

/* Fade a la izquierda */
#what .container .carrusel::before,
#what .container .carrusel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 90px; /* ancho del fade */
    height: 100%;
    z-index: 5;
    pointer-events: none; /* para que no bloquee clicks en flechas */
}

#what .container .carrusel::before {
    left: 0;
    background: linear-gradient(to right, white 0%, rgba(255,255,255,0) 100%);
}

#what .container .carrusel::after {
    right: 0;
    background: linear-gradient(to left, white 0%, rgba(255,255,255,0) 100%);
}

#what .container .carrusel-container {
    padding: 0 2rem;
    height: 100%;
    display: flex;
    gap: 20px;
    scroll-behavior: smooth;
    overflow-x: auto;
    overflow-y: hidden; /*fuerza que no aparezca scroll vertical */
    scrollbar-width: none; /* Firefox */
}

#what .container .carrusel-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#what .container .carrusel .servicio {
    flex: 0 0 calc(33.333% - 20px);
    background: linear-gradient(135deg, var(--color1), var(--color2));
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    text-align: center;
    user-select: none;
    transition: all 0.3s ease;
    width: 200px;
    height: 240px;
    border: none;
    
}

#what  .carrusel .servicio:hover {
    box-shadow: 0 3px 80px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

#what .carrusel .servicio h3 {
    margin: 0;
    border-radius: 14px;
    height: 50%;
    
    color: white;
    font-size: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    letter-spacing: 2px;
}

#what .carrusel .servicio p{
    background-color: white;
    font-size: 18px;
    padding: 10px;
    font-weight: 500;
    vertical-align: center;
    color: var(--color2);
    margin: 0 10px 10px 10px;
    border-radius: 6px;
}


#what .flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    z-index: 6;
}
#what .flecha.izquierda { left: 10px; }
#what .flecha.derecha { right: 10px; }
#what .flecha:hover { background: rgba(0,0,0,0.8); }




/*=====CONTACT SECTION=====*/
#contact{
    background: #f5f5f5;
}

#contact .container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#contact .container .arriba{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

/*formulario*/
#contact .container form{
    background: var(--accent-color);
    color: var(--light-color);
    padding: 2rem;
    border-radius: 16px;
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
#contact .container form .grupo,
#contact .container form .message{
    display: flex;
    gap: 1rem;
    width: 100%;
}


#contact .container form .grupo input,
#contact .container form textarea {
    width: 100%;
    padding: 10px 24px;
    background: #fff;
    border: none;
    font-size: 16px;
    border-radius: 15px;
}

#contact .container form textarea {
    height: 200px;
    resize: none;
}

#contact .container form .btn{
    margin-top: 2rem;
    width: 25%;
    font-weight: bold;
}






/*=====FOOTER=====*/
footer {
    background: #0a0a0a;
    color: #f1f1f1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

footer .container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 60px 0;
}

/*marca*/
footer .marca {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 0 10px;
}

footer .marca .logo img {
    width: 220px;
    margin-bottom: 10px;
}

footer .marca .logo .slogan {
    font-size: 20px;
    font-style: italic;
    color: #bbb;
}

footer .marca .social {
    text-align: center;
}

footer .marca .redes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

footer .marca .redes img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s, filter 0.3s;
}


/*menú*/
footer .menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 4rem;
}

footer .menu .grupo {
    gap: 5px;
    display: flex;
    flex-direction: column;
}

footer .menu .grupo p {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
    text-align: center;
}

footer .menu .grupo hr{
    width: 15%;
    margin: 0 0 20px 0;
    border: none;
    background-color: #fff;
    height: 2px;
    align-self: center;
}

footer .menu .contenido {
    display: grid;
    grid-template-rows: repeat(8, auto); /* siempre 4 filas */
    grid-auto-flow: column; /* llena primero las filas, luego crea otra columna */
    column-gap: 2rem;
}

footer .menu .contenido a {
    display: block;
    color: #bbb;
    text-decoration: none;
    font-size: 14px;
    margin: 5px;
    padding: 5px;
    transition: color 0.3s;
}

footer .menu .contenido a:hover {
    color: var(--light-color);
}


/* WhatsApp verde */
footer .redes img.whatsapp:hover {
    transform: scale(1.1);
    filter: invert(55%) sepia(78%) saturate(533%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

/* Instagram rosa */
footer .redes img.instagram:hover {
    transform: scale(1.1);
    filter: invert(34%) sepia(75%) saturate(6400%) hue-rotate(317deg) brightness(95%) contrast(90%);
}

/* TikTok morado */
footer .redes img.tiktok:hover {
    transform: scale(1.1);
    filter: invert(70%) sepia(100%) saturate(1438%) hue-rotate(236deg) brightness(100%) contrast(95%);
}

/*copyrighting*/
footer .copyright{
    white-space: normal;
    bottom: 0;
    width: 100%;
    background-color: #333;
    color: var(--light-color);
    text-align: center;
    padding: 5px 0;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 2px;
}

footer .copyright a{
    color: var(--light-color);
    font-weight: 600;
}

footer .copyright a:hover{
    color: var(--accent-color);
}



/*media querys (responsive)*/

/*===== MÓVIL PEQUEÑO (<=576px) =====*/
@media (max-width: 576px) {
    /* Navbar */
    nav .container {
        padding: 12px 16px;
        gap: 12px;
    }
    nav .logo a img {
        height: 40px;
    }
    nav .menu a {
        display: none;
    }
    nav .menu .btn{
        display: block;
    }

    /* Hero */
    header .arriba {
        flex-direction: column;
        gap: 24px;
    }
    header .arriba .izquierda,
    header .arriba .derecha {
        width: 100%;
        text-align: center;
    }
    header .arriba .derecha .bg-color {
        width: 230px;
        height: 230px;
    }
    header .arriba .derecha img {
        width: 200px;
    }

    header .abajo{
        top: -40px;
    }

    /* WHY */
    #why .container .arriba {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    #why .container .arriba .left,
    #why .container .arriba .right {
        width: 100%;
    }

    /* WHAT carrusel */
    #what .container .arriba {
        width: 100%;
    }
    #what .container .carrusel .servicio {
        flex: 0 0 100%;
    }

    #what .flecha{
        display: none;
    }

    /*=====CONTACT SECTION=====*/
    #contact .container form {
        width: 100%;
        padding: 1.5rem;
    }

    #contact .container form .grupo{
        flex-direction: column;
    }

    #contact .container form .btn{
        width: 100%;
    }

    /*=====FOOTER=====*/
    footer {
        padding: 0;
    }

    footer .container {
        flex-direction: column;
        justify-content: space-between;
        gap: 40px;
        padding: 30px 10px;
    }

    footer .marca .logo img {
        width: 160px;
    }
    footer .marca .logo .slogan {
        font-size: 16px;
    }

    footer .menu {
        grid-template-columns: 1fr; /* una sola columna */
        gap: 2rem;
        text-align: center;
    }

    footer .menu .contenido {
        grid-auto-flow: row;
        grid-template-rows: none;
        grid-template-columns: 1fr;
    }

    footer .menu .contenido a {
        font-size: 16px;
    }

    footer .copyright{
        margin-bottom: 0;
        font-size: 12px;
    }
}


/*===== TABLET (577px – 768px) =====*/
@media (min-width: 577px) and (max-width: 840px) {
    /* Navbar */
    nav .menu {
        gap: 20px;
    }

    /* Hero */
    header .arriba {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    header .arriba .izquierda,
    header .arriba .derecha {
        width: 100%;
    }

    header .arriba .derecha .bg-color{
        top: 600px;
    }

    header .arriba .derecha .img {
        width: 100%;
        height: 100%;
    }

    header .abajo{
        top: -0;
    }

    /*=====WHY=====*/
    #why {
        min-height: auto; /* que se ajuste al contenido */
    }

    #why .container {
        gap: 2rem; /* separación vertical */
    }   

    #why .container .arriba {
        flex-direction: column; /* apilar izquierda + derecha */
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    #why .container .arriba .left {
        width: 100%; /* ocupa todo el ancho */
        gap: 1.5rem;
    }

    #why .container .arriba .left p {
        font-size: 15px; /* un poco más pequeño */
    }

    #why .container .arriba .right {
        width: 100%; /* ocupa todo el ancho */
    }

    #why .container .arriba .right .features-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    #why .container .arriba .right .feature {
        flex: 1 1 calc(50% - 1rem); /* 2 por fila */
        padding: 1rem;
    }

    #why .container .abajo {
        max-width: 100%;
        display: flex;
        justify-content: center;
    }

    #why .container .abajo .btn {
        width: auto; /* que no se estire a todo el ancho */
        padding: 0.8rem 2rem;
    }
    



    /* WHAT carrusel */
    #what .container .carrusel .servicio {
        flex: 0 0 calc(50% - 20px);
    }

    #what .flecha{
        display: none;
    }

    /* Contact */
    #contact .container form {
        width: 90%;
    }


    /*=====FOOTER=====*/
    footer {
        height: auto;
        padding: 0;
    }

    footer .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 50px;
    }

    footer .marca .logo img {
        width: 180px;
    }

    footer .menu {
        gap: 4rem;
        text-align: center;
    }
}


/*===== PORTÁTIL (769px – 1279px) =====*/
@media (min-width: 841px) and (max-width: 1279px) {
    nav .container {
        padding: 8px 16px;
    }

    /* Hero */
    header .arriba .izquierda,
    header .arriba .derecha {
        width: 50%;
    }
    header .arriba .derecha img {
        width: 350px;
    }

    /* WHY */
    #why .container .arriba {
        flex-direction: row;
        gap: 2rem;
    }
    

    /* WHAT carrusel */
    #what .container .carrusel .servicio {
        flex: 0 0 calc(33.333% - 20px);
    }

    /* Contact */
    #contact .container form {
        width: 70%;
    }


    /*=====FOOTER=====*/
    footer {
        height: auto;
        padding: 50px 0;
    }

    footer .container {
        gap: 40px;
        padding: 50px 20px;
        flex-direction: column;
        align-items: center;
    }

    footer .menu {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas */
        gap: 3rem;
    }

    footer .menu .contenido a {
        font-size: 14px;
    }
}


/*===== DESKTOP NORMAL (1280px – 1535px) =====*/
@media (min-width: 1280px) and (max-width: 1535px) {
    header .arriba .derecha img {
        width: 400px;
    }
    #contact .container form {
        width: 60%;
    }
}


/*===== DESKTOP GRANDE (>=1536px) =====*/
@media (min-width: 1536px) {
    nav .container {
        max-width: 1400px;
    }
    header .arriba .derecha img {
        width: 500px;
    }
    #why .container .arriba .left p {
        font-size: 18px;
    }
    #contact .container form {
        width: 50%;
    }
}