:root
{
    --primaryColor: #cbfb1a;
    --secondaryColor: #333;
    --tertiaryColor: white;
}

/* GLOBAL STYLES */

html
{
    overflow-y: scroll; /* crea un scroll lateral asi no exista, util para no dañar la navbar ni footer */
}

html, body
{   
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    scroll-behavior: smooth !important;
}
.front-page /* color de background del body del front-page*/
{
    background-color: var(--secondaryColor);
}

header
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2px 10px;
    font-weight: bold;
    background-color: var(--primaryColor);
    view-transition-name: unique-header !important;
    /*background: rgba(255, 255, 255, 0.5);*/ /* Fondo blanco semitransparente */
    /* backdrop-filter: blur(15px);*/ /* INtensidad del desenfoque del fondo  */
    /* -webkit-backdrop-filter: blur(12px);*/ /* Compatibilidad con Safari */
}

.paragraph, .servicios-info h2 /* estilos del front-page oscuro */
{
    color: white;
}

/* estilos para los h1 gradientes */
.green-gradient
{
    font-size: 50px;
    background: linear-gradient(to right, #cbfb1a, #ebffa1, #d5f36b); /* fondo degradado */
    /* recorta el fondo para que encaje con el texto */
    -webkit-background-clip: text;
    background-clip: text;
    /* pinta el color del texto transparente para que el fondo sea visible */
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ------------ ESTILOS NAVBAR ------------ */

.main-navbar
{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    font-size: 16px; 
}

.links-navbar
{
    display: flex;
    flex-direction: row;
    gap: 2rem; /* espaciado entre elementos */
    transition: all 300ms ease;
}

.links-navbar a, .main-navbar a
{
    color: black;
    text-decoration: none;
    transition: all 200ms;
}/*
.direct-link:hover
{
    opacity: 0.5;
    text-decoration: underline;
} */
.links-navbar li
{
    list-style: none;
}

.direct-link
{
    position: relative;
    cursor: pointer;
    margin: 10px auto;
}
.direct-link::after
{
    content: "";
    position: absolute;
    bottom: -5px;
    height: 1px;
    width: 100%;
    left: 0;
    background-color: var(--secondaryColor);
    transition: 0.3s;
    transition-timing-function: ease-in-out;
    transform: scaleX(0);
}
.direct-link:hover::after
{
    transform: scaleX(1);
    text-decoration: underline;
}

.navbar-main-site img
{
    width: 40px;
    height: 40px;
}

.unique-navbar-link img
{
    width: 20px;
    height: 20px;
}

.responsive-menu-button
{
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* ------------ ESTILOS MAIN SECTION ------------ */

.section-principal
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 150px 20px 100px 20px; /* arriba derecha abajo izq */
    margin: 0;
    /* background-image: url(https://grupoeldf.com/wp-content/themes/grupoeldf-theme/assets/img/main-banner.jpg); */
    background-color: var(--secondaryColor);
}
.section-principal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        to top, 
        var(--secondaryColor),      
        var(--secondaryColor) 5%,    
        rgba(0, 0, 0, 0) 100%     
    ), 
    url(https://grupoeldf.com/wp-content/themes/grupoeldf-theme/assets/img/main-banner.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0; /*la imagen empieza totalmente invisible */
    transition: opacity 1200ms ease-in-out;
    z-index: 2; /* detras del texto */
}

/* Esta es la clase que inyecta js */
.section-principal.bg-loaded::before {
    opacity: 1;
}

/* le doy al resto de elementos mas prioridad para mostrarse encima */
.section-principal > * {
    position: relative;
    z-index: 2; 
}

.main-logo
{
    max-width: 60%;
    height: auto;
}

.section-principal p
{
    font-size: 23px;
    padding: 0 200px;
    text-align: center;
}

.section-principal > :nth-child(1) { transition-delay: 200ms; } /* aqui como no coinciden por etiqueta ningun hijo, les mando un > para indicar que recorra en orden los hijos de section */
.section-principal > :nth-child(2) { transition-delay: 400ms; }

/* ------------ ESTILOS QUIENES SOMOS ------------ */

.section-quienes-somos
{
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-top: 50px;
}

.right-quienes-somos
{
    width: 600px;
    height: 100%;
}
.right-quienes-somos p
{
    margin: 0;               
    text-align: justify;
    font-size: 3vh;
    margin-bottom: 3vh;
}
.right-quienes-somos h1
{
    font-size: 50px;
}

.whatsapp-button-content
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 60px;
    gap: 10px;
    font-size: 2vh;
    font-weight: bold;
    text-decoration: none;
    background-color: #25D366;
    color: black;
    border-radius: 20px;
    transition: all 400ms ease;
}
.whatsapp-button-content img
{
    width: 3vh;
    height: 3vh;
}
.whatsapp-button-content:hover
{
    background-color: #07913a;
}

.left-quienes-somos
{
    display: flex;
    flex-direction: column;
}
.left-quienes-somos button, .right-quienes-somos button
{
    align-self: left;
    margin-top: 20px;
    height: 40px;
    width: 130px;
}
.left-logo
{
    border-radius: 50px;
    margin-bottom: 3vh;
    box-shadow: 0 0 10px 5px rgba(203, 251, 26, 0.5);
    /* box-shadow: 5px 5px 5px 5px rgba(203, 251, 26, 0.5); */
}

.instagram-button-content
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 60px;
    gap: 10px;
    font-size: 2vh;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(60deg, #6228d7, #ee2a7b, #f9ce34);
    color: var(--tertiaryColor);
    border-radius: 20px;
    transition: all 400ms ease;
    background-size: 300% 100%;
    transition: background-position 0.5s ease-in-out, transform 0.2s;
}
.instagram-button-content img
{
    overflow: visible;  
    height: 30px;
    width: 30px;
}
.instagram-button-content:hover
{
    background-position: 100% 0;
}

/* ------------ ESTILOS SERVICIOS ------------ */

.section-servicios
{
    color: var(--tertiaryColor);
    padding-bottom: 9vh;
    z-index: 3;
}

.servicios-title, .portafolio-title /* aprovecho estos estilos para el otro titulo */
{
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Centra horizontalmente */
    align-items: center; /* centra verticalmente */
    margin-bottom: 3vh;
}

.servicios-title p
{
    font-size: 23px;
    padding: 0 100px;
    text-align: center;
}

.servicios-title > :nth-child(1){ transition-delay: 200ms;}
.servicios-tile > :nth-child(2){transition-delay: 900ms;}

.servicios-grid-3
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30vh, 1fr)); /* se ajusta solo */
    gap: 20px;
    list-style: none; /* elimina el punto del estilo del ul */
    padding: 0;
    margin: 0 auto;
    width: 85%; /* deja margen lateral adaptable */
}
/* estilos para escritorio del servicios-grid */
@media (min-width: 1024px) {

    .servicios-grid-3
    {
        grid-template-columns: repeat(3, 1fr); 
        width: 80%;
    }
}

/* estilos para el borde con gradiente y animacion de movimiento */
.servicios-content
{
    min-height: 20vh;
    align-items: center;
    display: flex;
    flex-direction: row;
    /*la base del borde transparente y bordes redondeados  antes de modificar con lso gradientes*/
    border: 2px solid transparent; 
    border-radius: 10px; 
    /*capas de fondo superpuestas */
    background-image: 
        linear-gradient(var(--secondaryColor), var(--secondaryColor)), /*fondo interno (pintado en las tarjetas) */
        linear-gradient(45deg, #cbfb1a, #495e01, #bceb12, #ebffa1, #d5f36b); /* el degradado */
    /*recorte para simular el borde */
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    /*se apmplia el tamaño del fondo degradado para que tenga espacio para moverse 400% */
    background-size: 100% 100%, 400% 400%;
    /* 5. se crea una animacion llamada "fluirColores", dura 6 segundos, es fluida (linear) e infinita */
    animation: fluirColores 6s linear infinite;
}

/*Definicion del movimiento de los colores con keyframes ??? */
@keyframes fluirColores {
    0% {
        background-position: 0% 0%, 0% 50%;
    }
    50% {
        background-position: 0% 0%, 100% 50%;
    }
    100% {
        background-position: 0% 0%, 0% 50%;
    }
}
/* animacion para el fondo del texto */
@keyframes fluirTexto {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.servicios-content img
{
    width: 70px !important;
    height: 70px !important;
    /* height: 15vh; */ /* La imagen se limita a sus 250px */
    /* object-fit: cover; */
    margin: 0px 15px 15px 15px;
}

.servicios-info p
{
    text-align: left;
}

.servicios-info h2
{
    color: black;
    background-size: 400% 400%;
    background-image: linear-gradient(45deg, #cbfb1a, #ebffa1, #d5f36b);
    animation: fluirTexto 6s linear infinite;
}

/* ------------ ESTILOS PORTAFOLIO ------------ */

.section-portafolio
{
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.portafolio-content
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 2fr)); /* se ajusta solo */
    row-gap: 25px;
    margin: 0px 0; /* 0 pixeles (arriba abajo) (izq der) */
    padding: 0;
}

.portafolio-card
{
    justify-self: center;
    border-radius: 20px;
    box-shadow: 0 2px 5px 0 black;
    transition: all 400ms ease;
    overflow: hidden;
}
.portafolio-card:hover
{
    box-shadow: 0 0 10px 5px rgba(203, 251, 26, 0.5);
    transform: translateY(-3%); /* se  trasladan un 3% hacia arriba */
}
.portafolio-card a img
{
    display: block;
    height: 250px;
    width: 250px;
    border-radius: 15px;
}
.portafolio-card a
{
    text-decoration: none;
}

/* ------------ ESTILOS FOOTER ------------ */

.main-footer
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    background-color: black;
    color: var(--tertiaryColor);
    margin-top: 40px;
}
.main-footer a
{
    text-decoration: none;
    color: var(--tertiaryColor);
}

.footer-contacto
{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.footer-contacto img
{
    width: 20px;
    height: 20px;
    margin-top: .5vh;
}

.footer-text
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* ------------ ESTILOS BOTON FLOTANTE DE WHATSAPP ------------ */
.float-whatsapp-btn
{
    display: none;
    position: fixed;
    width: 50px;
    height: 50px;
    line-height: 55px;
    bottom: 30px;
    right: 30px;
    background-color: #65cf72;
    border-radius: 50px;
    z-index: 9999;
}
.float-whatsapp-btn img
{
    width: 33px;
    height: 33px;
}

/* ------------ ESTILOS EFECTO DE CARGA FADE IN ------------ */

/* estado inicial se oculta y desplaza 50px hacia abajo */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform; /* Optimiza el rendimiento del navegador */
}
/* Estado activo: cuando el js detecta que entro a la pantalla */
.fade-in-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Retrasos individuales para que aparezcan en fila uno tras otro (para los servicios) */
.servicios-grid-3 li:nth-child(1) { transition-delay: 200ms; }
.servicios-grid-3 li:nth-child(2) { transition-delay: 400ms; }
.servicios-grid-3 li:nth-child(3) { transition-delay: 600ms; }
.servicios-grid-3 li:nth-child(4) { transition-delay: 800ms; }
.servicios-grid-3 li:nth-child(5) { transition-delay: 1000ms; }
.servicios-grid-3 li:nth-child(6) { transition-delay: 1200ms; }
/* Los mismos retrasos pero para el portafolio */
.loading-active figure:nth-child(1) { transition-delay: 200ms; }
.loading-active figure:nth-child(2) { transition-delay: 400ms; }
.loading-active figure:nth-child(3) { transition-delay: 600ms; }
.loading-active figure:nth-child(4) { transition-delay: 800ms; }
.loading-active figure:nth-child(5) { transition-delay: 1000ms; }
.loading-active figure:nth-child(6) { transition-delay: 1200ms; }
/* los demas retrasos que configure, iran en su respectiva seccion de estilos */

/* ------------ ESTILOS RESPONSIVOS DESKTOP FIRST ------------ */

@media(max-width: 1400px)
{
    /* ESTILOS SERVICIOS */

    .servicios-content
    {
        display: flex;
        /* padding: 2vh; */ /* para darle relleno al interior de la caja */
    }
}

@media(max-width: 1090px)
{
    header 
    {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        box-sizing: border-box; /* Evita que el padding extra desplace el header */
    }

    body
    {
        margin-top: 60px;
    }
    /*  ESTILOS QUIENES SOMOS */

    .section-quienes-somos
    {
        /* background-color: skyblue; */
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* ESTILOS NAVBAR */

    .main-navbar
    {
        justify-content: space-between;
        margin: 10px 0px;
    }

    .responsive-menu-button
    {
        display: block;
    }

    /* contenido para observar */
    .links-navbar
    {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        background-color: var(--primaryColor);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        clip-path: circle(0px at 90% -10%);
        pointer-events: none;
    }

    .links-navbar.active
    {
        clip-path: circle(1000px at 90% -10%);
        pointer-events: all;
    }

    .links-navbar li
    {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .links-navbar.active li
    {
        opacity: 1;
        transform: translateY(0);
    }

    /* agregar cada uno por cada opcion de menu nueva */
    .links-navbar li:nth-child(1)
    {
        transition-delay: 0.1s;
    }
    .links-navbar li:nth-child(2)
    {
        transition-delay: 0.2s;
    }
    .links-navbar li:nth-child(3)
    {
        transition-delay: 0.3s;
    }
    .links-navbar li:nth-child(4)
    {
        transition-delay: 0.4s;
    }
    .links-navbar li:nth-child(5)
    {
        transition-delay: 0.5s;
    }
    .links-navbar li:nth-child(6)
    {
        transition-delay: 0.6s;
    }
    /* grid para portafolio */
}

@media(max-width: 1615px) /* adaptabilidad para que no se rompan los cuadros de los servicios */
{
    /* ESTILOS MAIN SECTION */
    .section-principal
    {
        padding: 100px 0 0 0;
    }

    .medium-br
    {
        display: none;
    }
    
    

    /* ESTILOS QUIENES SOMOS */

    .left-quienes-somos img
    {
        height: 300px;
    }

    .right-quienes-somos
    {
        width: 300px;
        align-items: center;
    }
    .right-quienes-somos p
    {
        font-size: 20px;
    }
    .right-quienes-somos h1
    {
        font-size: 40px;
    }
    
    .whatsapp-button
    {
        display: flex;
        justify-content: center;
    }

    .instagram-button
    {
        display: none;
    }

    /* ESTILOS SERVICIOS */

    .servicios-title p
    {
        font-size: 23px;
        padding: 0 20px;
        text-align: left;
    }

    .servicios-content
    {
        display: flex;
        flex-direction: column;
        justify-content: center !important;
        align-items: center;
        align-self: center;
    }
    .servicios-content img
    {
        margin-top: 10px;
    }

    .servicios-info h2, .servicios-info p
    {
        padding: 5px;
        text-align: center;
    }

    /* portafolio */

    /* ESTILOS DEL FOOTER */
    .footer-whatsapp
    {
        display: none;
    }

    /* ESTILOS BOTON FLOTANTE WHATSAPP */
    .float-whatsapp-btn
    {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    /* por si se desea mostrar el boton 
    .instagram-button-content img
    {
        width: 35px;
        height: 35px;
    } */

    /* EFECTOS DE CARGA RESPONSIVE */
    /* Servicios */
    .servicios-grid-3 li:nth-child(1) { transition-delay: 200ms; }
    .servicios-grid-3 li:nth-child(2) { transition-delay: 300ms; }
    .servicios-grid-3 li:nth-child(3) { transition-delay: 400ms; }
    .servicios-grid-3 li:nth-child(4) { transition-delay: 500ms; }
    .servicios-grid-3 li:nth-child(5) { transition-delay: 600ms; }
    .servicios-grid-3 li:nth-child(6) { transition-delay: 800ms; }
    /* portafolio */
    .loading-active figure:nth-child(1) { transition-delay: 200ms; }
    .loading-active figure:nth-child(2) { transition-delay: 300ms; }
    .loading-active figure:nth-child(3) { transition-delay: 400ms; }
    .loading-active figure:nth-child(4) { transition-delay: 500ms; }
    .loading-active figure:nth-child(5) { transition-delay: 600ms; }
    .loading-active figure:nth-child(6) { transition-delay: 700ms; }
}


@media(max-width: 1805px)
{
    .portafolio-content
    {
        grid-template-columns: repeat(3, minmax(200px, 300px));
        row-gap: 25px;
        column-gap: 100px;
        margin: 0px 100px;
        place-content: center
    }
}

@media (max-width: 915px)
{

    /* ESTILOS MAIN-SECTION */
    
    .section-principal p
    {
        font-size: 20px;
        padding: 0 25px;
        text-align: left;
    }

    .main-logo
        {
            max-width: 90%;
            height: auto;
        }
    
    .br-responsive
    {
        display: none;
    }

    /* ESTILOS PORTAFOLIO */
    .portafolio-card
    {
        margin-bottom: 20px
    }
    .portafolio-card a img
    {
        width: 20vh;
        height: 20vh;
        border-radius: 15px;
    }

    .portafolio-content
    {
        grid-template-columns: repeat(3, 0.5fr);
        margin: 0;
        gap: 10px;
    }
}

@media(max-width: 460px)
{

    .portafolio-content
    {
        grid-template-columns: repeat(auto-fit, minmax(150px, 2fr)); /* se ajusta solo */
        margin: 0;
        gap: 10px;
    }

}

@media(max-width: 350px)
{
    
    .portafolio-card a img
    {
        width: 12vh;
        height: 100%;
    }
}

/* Evita que el contenedor temporal de la animación intente estirar o encoger el header */
::view-transition-group(unique-header) {
  animation-duration: 0s;
  mix-blend-mode: none;
}


/* transicion suave para cambiar entre paginas */
@view-transition
{
    navigation: auto;
}