* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

:root {
    --titulo-importante-mobile: 2.5em;
    --titulo-principal-mobile: 1.5em;
    --titulo-secundario-mobile: 1.2em;
    --padding-principal-mobile: 2em 1.5em;
    --movile-p: .9em;

    --titulo-importante-tablet: 3.2em;
    --titulo-principal-tablet: 2.5em;
    --titulo-secundario-tablet: 2em;
    --tablet-p: 1.2em;
    --margen-principal: 1.5em;



    --color-principal: rgb(0, 0, 128);
    --shadow-fondo: 0 0 0 100vmax rgba(0, 0, 0, .5);
    --shadow-sencillo: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.logo-whats {
    max-width: 3.5em;
    position: fixed;
    z-index: 999;
    bottom: 0;
    right: 0;
    margin: 1em;
    padding: .5em;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        scale: 1;
    }

    50% {
        scale: .9;
    }

    100% {
        scale: 1;
    }
}

.no-scroll {
    overflow: hidden;
    /* Desactiva el scroll */
    height: 100%;
    /* Asegura que no haya espacio para desplazarse */
}

.header {
    position: relative;
    z-index: 998;
    display: flex;
    align-items: center;
    padding: 1.5em;
    justify-content: space-between;
}

.header .logo {
    max-width: 7rem;
}

.header .logo-2 {
    display: none;
}

.btn-abrir {
    border: none;
}

.nav {
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    position: absolute;
    top: 0;
    text-align: left;
    right: 0;
    background-color: rgb(255, 255, 255);
    bottom: 0;
    box-shadow: var(--shadow-fondo);
    height: 100vh;
    width: 100%;
}

#nav {
    display: none;
    transition: opacity 0.3s ease;
}

#nav.visible {
    display: block;
    opacity: 1;
}



.logo-bar-mov {
    max-width: 7rem;
}

.logos-nav-res {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 2em 2em 0 2em;
}

.nav.visible {
    opacity: 1;
    visibility: visible;
}

.nav-list {
    width: 100%;
}

.nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
}

.nav li {
    padding: 1em 2em;
}

.nav-list .li-1 {
    background-color: rgba(236, 236, 236, 0.527);
}

.nav-list a {
    text-decoration: none;
    color: var(--color-principal);
    font-size: 1.4rem;
    font-weight: 700;
}

.abrir-menu,
.cerrar-menu {
    border: none;
    background-color: rgba(255, 255, 255, 0);
}

.abrir-menu img,
.cerrar-menu img {
    width: 2.5em;
}

.rol {
    height: 200vh;
}

body {
    background: url(../img/camion-apb.webp) no-repeat center/cover;
    position: relative;
    min-height: 100vh;
}

.div-principal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1em;
    height: 100%;
}

.principal-txt {
    background-color: rgba(146, 146, 146, 0.226);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 1em;
    color: white;
    width: 100%;
    text-align: left;
    height: auto;
    max-height: none;
}

.principal-txt small {
    font-weight: 100;
}

.principal-txt h1 {
    padding: .5em 0;
    font-size: 2.5em;
}

.principal-txt p {
    padding-bottom: .5em;
    line-height: 1.5;
    font-size: var(--movile-p);
}

.principal-txt button {
    padding: .8em;
    border: none;
    border-radius: 15px;
    background-color: white;
    color: var(--color-principal);
    transition: 0.4s ease-in-out all;
}

.principal-txt button:hover {
    color: white;
    background-color: var(--color-principal);
}

@media screen and (min-width: 400px) {
    .principal-grid {
        display: none;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 1em;
        margin-top: 1em;
        min-height: 20em;
        overflow: visible;
        width: 100%;
    }

    .pri-grid {
        border-radius: 15px;
        box-shadow: var(--shadow-sencillo);
        background-size: cover;
        background-position: center;
    }

    .grid-1 {
        background: url(../img/cultivos.webp) no-repeat center/cover;
    }

    .grid-2 {
        background: url(../img/tomate-rojo.webp) no-repeat center/cover;
    }

    .grid-3 {
        background: url(../img/paisaje-tomate-abajo.webp) no-repeat center/cover;
    }

    .grid-4 {
        background: url(../img/evento.webp) no-repeat center/cover;
    }
}


@media screen and (min-width:750px) {

    .logo-whats {
        max-width: 4em;
        margin: 2em;
    }

    .header.sticky {
        background-color: white;
        position: fixed;
        width: 100%;
        color: var(--color-principal);
        padding: 0 0;
        gap: 0;
        justify-content: space-between;
    }

    .header.sticky .logo {
        display: none;
    }

    .header.sticky .logo-2 {
        display: block;
        max-width: 8em;
        margin-left: 4em;
    }

    .header.sticky #nav {
        width: auto;
    }


    .header.sticky .nav-list li a {
        color: var(--color-principal);
        font-size: 1.2em;
    }

    .header.sticky .nav ul {
        padding: 1em;
        justify-content: end;
    }

    .header {
        transition: .4s ease-in-out all;
    }

    .principal-txt h1 {
        font-size: var(--titulo-principal-tablet);
    }

    .principal-txt p {
        font-size: var(--tablet-p);
        max-width: 50em;
    }

    .principal-grid {
        display: none;
        gap: 1em 2em;
        height: auto;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        grid-template-rows: repeat(2, 14em);
    }

    .header .logo {
        max-width: 10rem;
    }
}

@media screen and (min-width:990px) {
    .div-principal {
        display: grid;
        grid-template-columns: 60% 40%;
        gap: 1em;
        align-items: center;
        max-width: 1250px;
        margin: 0 auto;
        height: auto;
        padding: 2em;
    }

    .principal-txt {
        height: auto;
        max-height: none;
        backdrop-filter: blur(5px);
        background-color: rgba(214, 214, 214, 0.342);
        padding: 2em;
        text-align: left;
    }

    /* Cambiar la grilla a 1 columna y 3 filas para pantallas grandes */
    .principal-grid {
        display: grid;
        grid-template-columns: 12em;
        /* 1 columna */
        grid-template-rows: repeat(3, 10em);
        /* 3 filas */
        gap: 2em;
        height: auto;
        justify-content: center;
    }

    .grid-4 {
        display: none;
        /* Hacer que la imagen 4 se muestre en pantallas grandes */
    }

    .header.sticky .nav-list a {
        color: var(--color-principal);
        font-size: 1.2em;
    }
}

@media screen and (min-width:1200px) {
    .header {
        padding: 1em 2em;
        justify-content: space-evenly;
        gap: 4em;
    }

    .header-center p {
        padding: 0em 5em;
    }

    .abrir-menu,
    .cerrar-menu,
    .logo-bar-mov,
    .logos-nav-res {
        display: none;
    }

    #nav {
        display: flex;
        /* Mostrar siempre en desktop */
        opacity: 1;
        /* Mantener visible */
        visibility: visible;
        /* Mantener visible */
        position: static;
        /* Cambiar posición para que no sea absoluta */
        height: auto;
        /* Ajustar altura */
        background-color: rgba(255, 255, 255, 0);
        box-shadow: none;
        flex-direction: row;
    }

    .nav ul {
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
    }

    .nav li {
        padding: 0 1em;
        /* Espaciado en horizontal */
        background-color: rgba(245, 222, 179, 0);
    }

    .nav-list a {
        font-size: 1.4em;
        color: white;
    }

    .nav-list .li-1 {
        background-color: rgba(236, 236, 236, 0);
    }

}