/* Estilos Generales */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: #f3f3f3;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Aplicando animaciones generales */
h2, h3, h4,
header, .hero, .intro, .mision-vision-valores, .confianza,
.mvv-images img, .confianza-images div {
    animation: fadeInUp 1s ease-in-out;
    animation-fill-mode: both;
    animation-iteration-count: 1;
}

/* Estilos del Header */
header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 30px;
    background: #fafafa;
    width: 100%;
    box-sizing: border-box;
    animation-delay: 0.2s;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.logo img {
    width: 40px;
    margin-right: 10px;
    animation: fadeIn 1s ease-in-out;
}

.gbs-text {
    color: #54B05A;
    font-weight: bold;
    font-size: 1.2em;
    text-decoration: none;
    animation: fadeInUp 1s ease-in-out;
}

/* Navegación */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #54B05A;
    font-weight: bold;
    font-size: 0.9em;
}

/* Hero */
.hero {
    background: white;
    text-align: center;
    padding: 110px 20px;
    font-size: 3.5em;
    font-weight: bold;
    color: #54B05A;
    height: 500px;
    animation-delay: 0.5s;
}

/* Introducción */
.intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    color: white;
    padding: 40px 20px;
    height: 400px;
    animation-delay: 0.6s;
}

.intro-text {
    width: 50%;
    font-size: 2.2em;
    text-shadow: #000000;
    text-align: center;
    padding-left: 10px;
}

.intro-image img {
    width: 75%;
    max-width: 500px;
    border-radius: 8px;
    animation-delay: 0.7s;
}

/* Misión, Visión y Valores */
.mision-vision-valores {
    text-align: center;
    padding: 40px 20px;
    padding-top: 5%;
    animation-delay: 0.8s;
}

.mision_headings { 
    text-align: center;
    width: 80%;
    max-width: 1500px;
    padding-left: 15%;
    padding-bottom: 2%;
    padding-top: 2%;
}
.mvv-images {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.mvv-images img {
    width: 30%;
    border-radius: 8px;
    animation-delay: 1s;
}

/* Confianza */
.confianza {
    background: rgb(255, 255, 255);
    text-align: center;
    padding: 40px 20px;
    color: #000000; 
    font-size: 0.5cm;
    animation-delay: 1.2s;
}

.confianza_header { 
    color: #54B05A; 
    font-size: 1.3cm;
}

.confianza-images {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.confianza-images div {
    width: 30%;
    text-align: center;
    animation-delay: 1.4s;
}

.confianza-images img {
    width: 100%;
    border-radius: 8px;
}

/* Botón de contacto */
.btn-contact {
    background: #54B05A;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.3s ease-in-out;
    margin-left: 20px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    animation-delay: 1.6s;
}

.btn-contact:hover {
    background: #2e7d32;
    color: white; 
}

/* Efecto de hover en los enlaces del menú */
nav ul li a:hover {
    color: #2e7d32;
}

nav ul li a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: #2e7d32;
    transition: width 0.3s ease-in-out;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: #e0f2e9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #54B05A, #2e7d32);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2e7d32, #1b5e20);
}

.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInWithDelay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Aplica la animación a la imagen */
.intro-image img {
    animation: slideInFromLeft 1.5s ease-out forwards;
}

/* Aplica la animación al texto con un leve retraso */
.intro-text {
    opacity: 0;
    animation: fadeInWithDelay 1s ease-out 0.8s forwards;
}

/* Estilo de la sección */
.slideshow-section {
    background: #000;
    color: white;
    padding: 60px 20px;
    text-align: center;
}

/* Contenedor del slideshow */
.slideshow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1300px;
    margin: auto;
    position: relative;
}

/* Flechas de navegación */
.arrow {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.arrow:hover {
    transform: scale(1.2);
}

/* Texto del slideshow */
.slideshow-text {
    flex: 1;
    font-size: 1.3em;
    padding: 20px;
    min-height: 150px;
}

/* Estilos específicos para la última diapositiva (Valores) */
.values-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
    flex-wrap: wrap;
}

.value-item {
    flex: 1;
    min-width: 150px; /* Ajuste para que no se rompa en pantallas pequeñas */
    text-align: center;
}

/* Estilos de los títulos con colores */
.value-title {
    font-weight: bold;
    font-size: 1.4em;
    display: block;
    margin-bottom: 5px;
}

/* Colores distintos para cada título */
.value-item:nth-child(1) .value-title { color:#32CD32;; } /* Rojo anaranjado */
.value-item:nth-child(2) .value-title { color: #32CD32;; } /* Dorado */
.value-item:nth-child(3) .value-title { color: #32CD32; } /* Verde lima */
.value-item:nth-child(4) .value-title { color: #32CD32;; } /* Azul intenso */
.value-item:nth-child(5) .value-title { color: #32CD32;; } /* Púrpura */

.slideshow-text {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-text.active {
    opacity: 1;
}


@media (max-width: 4570px) {
    body { 
        background-color: white;
    }
    .hero { 
        height: 500px !important; 
        padding: 0px 20px;
        font-size: 3em;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    header {
        padding: 10px 20px;
        flex-wrap: wrap;
    }

    .hero {
        font-size: 2.2em;
        height: 400px;
        padding: 80px 20px;
    }

    .intro {
        flex-direction: column;
        height: auto;
        padding: 30px 20px;
    }

    .intro-text {
        width: 100%;
        font-size: 1.8em;
        text-align: center;
    }

    .intro-image img {
        width: 90%;
        max-width: 400px;
    }

    .mvv-images {
        flex-wrap: wrap;
    }

    .mvv-images img {
        width: 45%;
    }

    .confianza-images {
        flex-wrap: wrap;
    }

    .confianza-images div {
        width: 45%;
    }

    .slideshow-text {
        font-size: 1.2em;
    }
}

/* Móviles grandes (hasta 767px) */
@media (max-width: 767px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .hero {
        font-size: 1.5em;
        height: 300px;
        padding: 60px 20px;
    }

    .intro {
        padding: 20px;
        height: auto;
    }

    .intro-text {
        font-size: 1.5em;
        padding-left: 0;
    }

    .intro-image img {
        width: 100%;
        max-width: 350px;
    }

    .mvv-images img {
        width: 90%;
    }

    .confianza {
        font-size: 0.9em;
    }

    .confianza-header {
        font-size: 1.2em;
    }

    .confianza-images div {
        width: 100%;
    }

    .slideshow-container {
        flex-direction: column;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .hero {
        font-size: 1em;
        height: 250px;
        padding: 50px 15px;
    }

    .intro-text {
        font-size: 1.3em;
    }

    .intro-image img {
        max-width: 300px;
    }

    .mvv-images img {
        width: 100%;
    }

    .btn-contact {
        font-size: 0.8em;
        padding: 8px 15px;
        text-align: center;
    }

    .slideshow-text {
        font-size: 1em;
    }
}
