/* 
ESTILOS GENERALES 
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    font-family: 'Inter', sans-serif;
}

body {
    width: 100%;
    height: 100%;
    background-color: #f6f6f6;
}

html{
    scroll-behavior: smooth;
}

/* 
SECCIÓN
    INICIO 
*/

.home-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
}

.home-content {
    width: 50%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px;
}

.home-content h2 {
    font-size: 48px;
    font-weight: 900;
    color: #1a584b;
    margin-bottom: 15px;
}

.home-content span {
    font-weight: 600;
}

.home-content p {
    padding-top: 20px;
    font-size: 20px;
    color: #888;
    margin: 20px 0;
}

.home-image {
    width: 50%;
    object-fit: cover;
}

.home-image video {
    width: 100%;
    height: auto;
}

/* Estilos responsivos para pantallas más pequeñas */
@media (max-width: 1400px) {
    .home-container {
        height: 80vh;
        align-items: center;
        padding-top: 50px;
        background-image: url('../images/home/wallpaper.jpg');
        background-size: cover;
        background-position: top;
    }

    .home-content {
        width: 100%;
        height: 100%;
        background-color: #0009;
    }

    .home-content h2 {
        font-size: 36px;
        text-align: center;
        color: #fff;
    }

    .home-content p {
        font-size: 16px;
        text-align: center;
        color: #fff;
    }

    .container-start-links {
        display: flex;
        align-items: center;
        gap: 15px;
        justify-content: center;
    }
    
    .start-link {
        width: auto !important;
        text-align: center;
        background-color: #fff !important;
        color: #1a584b !important;
        fill: #444 !important;
        margin-top: 50px !important;
    }

    .start-link:hover {
        background-color: #1a584b !important;
        color: #fff !important;
        fill: #fff !important;
    }

    .start-link::after{
        display: none !important;
    }

    .home-image {
        display: none;
    }

}

/* Estilos adicionales para dispositivos muy pequeños */
@media (max-width: 480px) {
    .home-content h2 {
        font-size: 28px;
    }

    .home-content p {
        font-size: 14px;
    }

    .start-link {
        width: 90%;
    }
}

/* 
SECCIÓN
    CÓMO FUNCIONA
*/
.how-function-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 0;
    flex-direction: column;
}

.how-function-title {
    font-size: 40px;
    color: #1a584b;
    font-weight: 800;
    text-align: center;
}

.how-function-content {
    width: 90%;
    display: flex;
    margin-top: 100px;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap; 
    gap: 20px; 
}

.step-container {
    width: 20%;
    max-height: 400px;
    min-height: 300px; 
    background-color: #fff; 
    border-radius: 10px;
    box-shadow: 0px 3px 3px 1px rgba(0, 0, 0, 0.01); 
    position: relative; 
    transition: 0.3s; 
}

.step-container:hover {
    transform: translateY(-20px); 
    box-shadow: 0px 5px 7px 1px rgba(0, 0, 0, 0.2); 
}

.step-circle {
    width: 50px;
    height: 50px;
    background-color: #1a584b; 
    border-radius: 50%; 
    display: flex;
    justify-content: center; 
    align-items: center;
    color: #fff; 
    font-weight: 700;
    font-size: 20px;
    position: absolute;
    top: -30px;
    left: -25px; 
}

.step-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    height: 50%; 
    padding: 10px; 
}

.step-info .step-title {
    color: #1a584b; 
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    padding: 10px 0; 
}

.step-info p {
    padding-top: 10px; 
    color: rgba(0, 0, 0, 0.5);
    font-size: 18px;
    transition: color 0.3s;
    padding: 5px; 
    text-align: center;
}

.step-container:hover .step-info p {
    color: rgba(0, 0, 0, 0.6); 
}

.step-image {
    width: 100%;
    height: 200px; 
    margin-top: 10px; 
    background-size: cover;
    background-position: center; 
    border-radius: 0 0 5px 5px; 
}

/* Imágenes específicas para cada paso */
.step-one .step-image {
    background-image: url('../images/how/step1.jpg');
}

.step-two .step-image {
    background-image: url('../images/how/step2.jpg');
}

.step-three .step-image {
    background-image: url('../images/how/step3.jpg');
}

.step-four .step-image {
    background-image: url('../images/how/step4.jpg');
}

/* Responsividad */
@media screen and (max-width: 1224px) {
    .step-container {
        width: 45%; 
        margin-top: 20px;
    }

    .step-circle {
        top: -20px;
        left: -20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step-info .step-title {
        font-size: 18px;
    }

    .step-info p {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .how-function-content {
        flex-direction: column;
    }

    .step-container {
        width: 100%;
        margin: 15px 0;
    }

    .step-circle {
        top: -15px;
        left: -15px;
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-info .step-title {
        font-size: 16px;
    }

    .step-info p {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .how-function-title {
        font-size: 28px;
    }

    .step-info .step-title {
        font-size: 14px;
    }

    .step-info p {
        font-size: 12px;
    }
}


/* 
SECCIÓN 
    SERVICIOS
*/

.services-container {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    background-image: url('../images/services/wallpaper_service.jpg');
    background-size: cover;
    background-position: center;
}

.content-services {
    width: 100%;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.title-services {
    font-size: 60px;
    color: #fff;
}

.services-content {
    width: 90%;
    height: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 100px;
    flex-wrap: wrap;
    gap: 20px;
}

.card-service {
    width: 100%;
    max-width: 300px;
    min-height: 400px;
    background-color: transparent;
    backdrop-filter: blur(5px);
    position: relative;
    transition: 0.5s;
    border-radius: 10px;
    margin: 30px auto;
}

.card-service::after{
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 10px;
    right: -10px;
    background-color: transparent;
    border: 2px solid #fff;
    transition: 0.5s;    
    z-index: -500;
    border-radius: 10px;
}

.card-service:hover::after{
    top: 0px;
    right: 0px;
}

.card-service:hover {
    transform: translateY(-20px);
}

.triangle {
    width: 100%;
    height: 100%;
    position: absolute;
    clip-path: polygon(0 0, 100% 0, 0 100%); /* forma de triángulo */
    background-color: #fff;
    transition: 0.5s;
    border-radius: 10px;
}

.triangle-bottom {
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 100%, 0 100%, 100% 0); /* forma de triángulo invertido */
}

.card-service:hover .triangle {
    width: 100px;
    height: 100px;
}

.triangle .fa-solid {
    color: #222;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 55px;
}

.info-service {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.info-service h3 {
    font-size: 30px;
    color: #fff;
    font-weight: 800;
    padding: 10px;
}

.info-service p {
    color: #fff;
    font-size: 20px;
    padding: 15px;
    text-align: center; 
}

.info-service a {
    background-color: #fff;
    border: none;
    text-decoration: none;
    padding: 10px 20px;
    margin-top: 20px;
    color: #1a584b;
    font-weight: 700;
    transition: 0.3s;
    border-radius: 5px;
}

.fa-arrow-right {
    margin-left: 10px;
    transition: 0.3s;
}

.info-service a:hover .fa-arrow-right {
    margin-left: 20px;
}

/* --- Media Queries para Responsividad --- */

@media (max-width: 1400px) {
    .title-services {
        font-size: 60px;
        padding-top: 20px;
    }
}

/* Pantallas medianas (tablets y laptops pequeñas) */
@media (max-width: 768px) {
    .title-services {
        font-size: 40px;
    }
    
    .services-content {
        flex-direction: column; /* Cambiar a columna */
        align-items: center;
    }

    .card-service {
        width: 80%; /* Tarjetas ocupan más espacio */
        margin: 20px 0; /* Espaciado superior e inferior */
    }
}

/* Pantallas pequeñas (teléfonos) */
@media (max-width: 480px) {

    .card-service {
        width: 90%; /* Ocupa casi todo el ancho */
    }

    .info-service h3 {
        font-size: 20px;
    }

    .info-service p {
        font-size: 16px;
    }

    .info-service a {
        font-size: 16px;
        padding: 8px 15px; /* Botones más compactos */
    }
}

/*
SECCIÓN
    SOBRE NOSOTROS
*/

/* SECCIÓN SOBRE NOSOTROS */
.about-container {
    width: 100%;
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.about-title {
    font-size: 40px;
    color: #1a584b;
    font-weight: 800;
}

.about-content {
    width: 90%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 100px;
}

.about-images {
    width: 40%;
}

.about-image-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    top: 60px;
    left: calc(50% - 300px);
}

.about-image-card {
    width: 400px;
    height: 400px;
    background-color: #17141d;
    border-radius: 10px;
    box-shadow: 0px 3px 3px 1px #0001;
    transition: background-image 0.5s ease, transform 0.4s ease-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: imageTransition 5s infinite linear;
}

@keyframes imageTransition {
    0% { transform: translateY(-20px); left: 20px; }
    25% { transform: translateY(-40px); left: 30px; }
    50% { transform: translateY(-60px); left: 40px; }
    75% { transform: translateY(-40px); left: 30px; }
    100% { transform: translateY(-20px); left: 20px; }
}

/* Configuración de imágenes de fondo */
.about-image-card.card1 {
    background-image: url('../images/about/column1.jpg');
    animation-delay: 0s;
}
.about-image-card.card2 {
    background-image: url('../images/about/column2.jpg');
    animation-delay: 1s;
}
.about-image-card.card3 {
    background-image: url('../images/about/column3.jpg');
    animation-delay: 2s;
}
.about-image-card.card4 {
    background-image: url('../images/about/column4.jpg');
    animation-delay: 3s;
}
.about-image-card.card5 {
    background-image: url('../images/about/column5.jpg');
    animation-delay: 4s;
}
.about-image-card.card6 {
    background-image: url('../images/about/column6.jpg');
    animation-delay: 5s;
}

/* Hover effects */
.about-image-card.card1:hover { background-image: url('../images/about/man_farmer.jpg'); }
.about-image-card.card2:hover { background-image: url('../images/about/female_farmer.jpg'); }
.about-image-card.card3:hover { background-image: url('../images/about/man_farmer2.jpg'); }
.about-image-card.card4:hover { background-image: url('../images/about/female_farmer2.jpg'); }
.about-image-card.card5:hover { background-image: url('../images/about/man_farmer3.jpg'); background-position: left; }
.about-image-card.card6:hover { background-image: url('../images/about/female_farmer3.jpg'); }

.about-image-card:not(:first-child) {
    margin-left: -10px;
}

.about-text {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.about-text p {
    color: #888;
    font-size: 20px;
    padding: 20px;
    text-align: justify;
}

/* Responsive Styles */
@media screen and (max-width: 1400px) {
    .about-image-card {
        width: 350px;
        height: 350px;
    }
    
    .about-image-container {
        left: calc(50% - 250px);
    }
}

@media screen and (max-width: 1200px) {
    .about-image-card {
        width: 300px;
        height: 300px;
    }
    
    .about-image-container {
        left: calc(50% - 200px);
    }
    
    .about-text p {
        font-size: 18px;
    }
}

@media screen and (max-width: 992px) {
    .about-container {
        padding: 60px 0;
    }
    
    .about-title {
        font-size: 36px;
    }
    
    .about-content {
        margin-top: 60px;
    }
    
    .about-image-card {
        width: 250px;
        height: 250px;
    }
    
    .about-text p {
        font-size: 16px;
        padding: 15px;
    }
}

@media screen and (max-width: 768px) {
    .about-container {
        padding: 40px 0;
    }
    
    .about-title {
        font-size: 32px;
    }

    .about-content {
        margin-top: 40px;
        flex-direction: column;
        width: 100%;
    }

    .about-images {
        width: 80%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin: none;
    }

    .about-image-container {
        left: 0 !important;
        top: 10px;
        margin: 20px 0;
    }

    .about-image-card {
        width: 200px;
        height: 200px;
    }

    .about-text{
        margin-top: 30px;
        width: 80%;
    }
    
    .about-image-card {
        width: 200px;
        height: 200px;
    }
    
    .about-image-container {
        left: calc(50% - 150px);
        top: 40px;
    }
}

@media screen and (max-width: 576px) {
    .about-image-card {
        width: 150px;
        height: 150px;
    }
    
    .about-text p {
        font-size: 14px;
        padding: 10px;
    }
}

/*
SECCIÓN
    CARRUSEL DE TESTIMONIOS
*/

.testimonials-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.testimonials-title {
    font-size: 40px;
    color: #1a584b;
    font-weight: 800;
    text-align: center;
}

.carousel {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 50px;
}

.carousel-container {
    width: 90%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 20px;
}

.carousel-item {
    width: calc(33.333% - 20px);
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 3px 3px 1px #0001;
    transition: .5s;
    position: relative;
}

.carousel-item:hover {
    transform: translateY(-10px);
    box-shadow: 0px 5px 4px 3px #0002;
}

.carousel-image {
    width: 100%;
    height: 200px;
    border-radius: 10px 10px 0px 0px;
    overflow: hidden;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-text {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.carousel-text h3 {
    font-size: 24px;
    color: #1a584b;
    font-weight: 800;
    padding: 10px;
    text-align: center;
}

.carousel-text p {
    color: #888;
    font-size: 16px;
    padding: 15px;
    text-align: center;
}

.carousel-controls {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.prev-button, .next-button {
    background-color: #1a584b;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: .3s;
}

.prev-button:hover, .next-button:hover {
    background-color: #fff;
    color: #1a584b;
}

.prev-button .fa-chevron-left, .next-button .fa-chevron-right {
    font-size: 20px;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .carousel-item {
        width: calc(50% - 20px);
    }
    
    .testimonials-title {
        font-size: 32px;
    }
}

@media screen and (max-width: 768px) {
    .carousel-container {
        width: 95%;
    }
    
    .carousel-item {
        width: 100%;
    }
    
    .carousel-text h3 {
        font-size: 20px;
    }
    
    .carousel-text p {
        font-size: 14px;
    }
    
    .testimonials-title {
        font-size: 28px;
    }
}

/*
SECCIÓN
    CONTACTO
*/
.contact-container{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 100px;
}

.title-contact{
    font-size: 40px;
    color: #1a584b;
    font-weight: 800;
}

.content-contact{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin-top: 25px;
}

.form-contact-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px 0px;
    margin: 0px 20px;
    width: 40%;
    height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: center;    
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 2px 3px 1px #0001;
    transition: 0.5s;
}

.form-contact-container::after{
    content: '';
    width: 200px;
    height: 200px;
    position: absolute;
    border-radius: 50%;
    top: -200px;
    left: -200px;
    background-color: #1a584b;
    transition: .5s;
}

.form-contact-container::before{
    content: '';
    width: 200px;
    height: 200px;
    position: absolute;
    border-radius: 50%;
    bottom: -200px;
    right: -200px;
    background-color: #1a584b;
    transition: .5s;
    z-index: 410;
}

.form-contact-container:hover{
    transform: translateY(-10px);
    box-shadow: 0px 5px 7px 1px #0002;
}

.form-contact-container:hover::after{
    top: -100px;
    left: -100px;
}

.form-contact-container:hover::before{
    bottom: -100px;
    right: -100px;
}

.image-contact{
    width: 60%;
    height: auto;
}

.form-contact-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #1a584b;
}

.form-contact-container .form {
    width: 60%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.group {
    position: relative;
}

.form .group label {
    font-size: 14px;
    color: rgb(99, 102, 102);
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #fff;
    transition: all .3s ease;
}

.form .group input,
.form .group textarea {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    outline: 0;
    width: 100%;
    background-color: transparent;
}

.form .group input:placeholder-shown+ label, 
.form .group textarea:placeholder-shown +label {
    top: 10px;
    background-color: transparent;
}

.form .group input:focus,
.form .group textarea:focus {
    border-color: #1a584b;
}

.form .group input:focus+ label, 
.form .group textarea:focus +label {
    top: -10px;
    left: 10px;
    background-color: #fff;
    color: #1a584b;
    font-weight: 600;
    font-size: 14px;
}

.form .group textarea {
    resize: none;
    height: 200px;
}

.form button {
    background-color: #1a584b;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30%;
}

.image-contact img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media Queries */
@media (max-width: 1200px) {
    .form-contact-container {
        width: 45%;
    }
    
    .form-contact-container .form {
        width: 70%;
    }

    .image-contact {
        width: 55%;
    }
}

@media (max-width: 992px) {
    .content-contact {
        width: 90%;
    }

    .form-contact-container {
        width: 50%;
        margin: 0 15px;
    }

    .form button {
        width: 40%;
    }
}

@media (max-width: 768px) {
    .content-contact {
        flex-direction: column;
        gap: 30px;
    }

    .title-contact {
        font-size: 32px;
    }

    .form-contact-container {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 40px 0;
    }

    .form-contact-container .form {
        width: 80%;
    }

    .form button {
        width: 50%;
        align-self: center;
    }

    .image-contact {
        width: 100%;
        max-width: 500px;
        order: -1; /* Mueve la imagen arriba del formulario */
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding-top: 60px;
    }

    .title-contact {
        font-size: 28px;
    }

    .form-contact-title {
        font-size: 20px;
    }

    .form-contact-container::after,
    .form-contact-container::before {
        width: 170px;
        height: 170px;
    }

    .form-contact-container .form {
        width: 90%;
    }

    .form button {
        width: 60%;
    }

    .form .group textarea {
        height: 150px;
    }
}

/* Hover effects solo para dispositivos que lo soporten */
@media (hover: none) {
    .form-contact-container:hover {
        transform: none;
    }
}

/* 
SECCIÓN
    ALIANZAS CON ASOCIACIONES
*/
.partners-container{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 80px;
}

.partners-title{
    font-size: 40px;
    color: #1a584b;
    font-weight: 800;
}

.partners-content{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin-top: 25px;
}

.partners{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.partners img{
    width: 100px;
    filter: grayscale(100%) opacity(0.5) drop-shadow(0px 0px 5px #0005);
}

/* Ocultar los duplicados por defecto */
.partners img.duplicate {
    display: none;
}

@media (max-width: 1024px) {
    .partners img {
        width: 80px;
    }
}

@media (max-width: 768px) {
    .partners-title {
        font-size: 32px;
    }

    .partners-content {
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    .partners {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 25px;
        gap: 40px;
        animation: scroll 25s linear infinite;
        width: fit-content;
    }

    /* Mostrar los duplicados en responsive */
    .partners img.duplicate {
        display: block;
    }

    .partners img {
        width: 70px;
        flex-shrink: 0;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-70px * 6 - 40px * 6));
        }
    }
}

@media (max-width: 480px) {
    .partners-title {
        font-size: 28px;
    }
    
    .partners {
        gap: 30px;
    }

    .partners img {
        width: 60px;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-60px * 6 - 30px * 6));
        }
    }
}

@media (hover: hover) {
    .partners:hover {
        animation-play-state: paused;
    }
}
