@import "../../js/glidejs/glide.core.css";

.about {
	margin-top: 79px;
}

/* Clases de visibilidad */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.grid-about {
	display: grid;
	grid-template-columns: repeat(2, auto);
	grid-template-rows: repeat(3, 1fr);
	align-items: stretch;
	justify-content: center;
	padding: 50px 0px;
	max-width: 1000px;
	min-height: 600px;
	max-height: 824px;
	margin: 0 auto;
}

.col-1 {
    grid-column: 1;
}

.col-2 {
    grid-column: 2;
}

.col-3 {
    grid-column: 3;
}

.row-full {
    grid-row: 1 / span 3;
}

.row-1 {
    grid-row: 1;
}

.row-2 {
    grid-row: 2;
}

.grid-about .text-container {
    padding: 20px 60px;
    height: auto;
    box-shadow: 0px 2px 30px 0px rgba(176, 177, 180, 0.49);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grid-about .text-container .title-slide {
	font-size: 24px;
	margin-bottom: 10px;
}
.grid-about .text-container p {
	font-size: 16px;
	line-height: 1.5;
	margin-bottom: 20px;
}

.grid-about .text-container p:last-child {
	margin-bottom: 0;
}

.grid-about .img-about {
	object-fit: cover;
	object-position: center;
	width: 100%;
	height: 100%;
	min-height: 250px;
	max-height: 266px;
	max-width: 300px;
}

.grid-about .img-about.large {
	width: 100%;
	max-width: unset;
	height: 100%;
	object-fit: cover;
	object-position: center;
	min-height: 250px;
	max-height: 800px;
}

.glide-about .glide__bullets {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
	z-index: 10;
}

.glide-about .glide__bullet {
	z-index: 10;
	width: 60px;
	height: 4px;
	background-color: #666666;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.3s ease;
}

.glide-about .glide__bullet--active {
	background-color: var(--chery-red);
}

/* Nuevo estilo para el contenedor de controles */
.controllers-container {
    display: flex;
    justify-content: center;
    margin: 30px auto;
}

/* Estilos para las flechas de navegación */
.glide-about .glide__arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.glide-about .glide__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
    padding: 0;
    z-index: 2;
}

.glide-about .glide__arrow:hover {
    color: var(--chery-red);
}

.glide-about .glide__arrow--right svg {
	transform: rotate(180deg);
}

/* Reposicionar los bullets para que estén en el centro entre las flechas */
.glide-about .glide__arrows .glide__bullets {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Eliminar estilos que ya no son necesarios */
.glide-about .glide__arrows::before,
.glide-about .glide__arrows::after {
    display: none;
}

/* Nuevas clases para reemplazar estilos inline */
.text-container-mission,
.text-container-design {
    grid-row: 1 / span 2;
}

.picture-slide2-bottom {
    grid-row: 3 / span 1;
}

.picture-slide3-bottom {
    grid-row: 3 / span 1;
    grid-column: 1 / span 2;
    max-width: 100%;
}

/* ===== ESTILOS PARA MOBILE SECTION ===== */
.about-mobile {
    margin-top: 79px;
}

.glide-about-mobile {
	margin-top: 20px;
}

.mobile-slide-content {
    display: flex;
    flex-direction: column;
}

.mobile-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
}

.mobile-images-grid .image-item:nth-child(1) { grid-column: 1; grid-row: 1; }
.mobile-images-grid .image-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.mobile-images-grid .image-item.image-full { grid-column: 1 / span 2; grid-row: 2; }

.mobile-images-mission .image-item:nth-child(1) { grid-column: 1; grid-row: 1; }
.mobile-images-mission .image-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.mobile-images-mission .image-item:nth-child(3) { grid-column: 1; grid-row: 2; }
.mobile-images-mission .image-item:nth-child(4) { grid-column: 2; grid-row: 2; }

.image-item {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

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

.mobile-text-container {
    background: white;
    padding: 20px 10px;
}

.mobile-text-container .title-slide {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.mobile-text-container .subtitle-slide {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.mobile-text-container p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: justify;
}

.mobile-text-container p:last-child {
    margin-bottom: 0;
}

/* Estilos para glide mobile */
.glide-about-mobile .glide__bullets {
    display: none;
}

.glide-about-mobile .glide__bullet {
    z-index: 10;
    width: 60px;
    height: 4px;
    background-color: #666666;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.glide-about-mobile .glide__bullet--active {
    background-color: var(--chery-red);
}

.glide-about-mobile .glide__arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.glide-about-mobile .glide__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
    padding: 0;
    z-index: 2;
}

.glide-about-mobile .glide__arrow:hover {
    color: var(--chery-red);
}

.glide-about-mobile .glide__arrow--right svg {
    transform: rotate(180deg);
}

.glide-about-mobile .glide__arrows .glide__bullets {
	display: none;
}

@media (max-width: 768px) {
    /* Intercambiar visibilidad */
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .grid-about {
        display: flex;
        flex-direction: column;
        min-height: auto;
        padding: 20px;
        gap: 20px;
    }

    /* Contenedor de imágenes aparece primero */
    .grid-about picture {
        order: 1;
        width: 48%;
        display: inline-block;
        margin-bottom: 10px;
    }

    /* Cada dos imágenes forman una fila */
    .grid-about picture:nth-child(2n-1) {
        margin-right: 4%;
    }

    /* Imágenes grandes ocupan todo el ancho */
    .grid-about picture.picture-slide2-bottom,
    .grid-about picture.picture-slide3-bottom {
        width: 100%;
        margin-right: 0;
    }

    /* Texto aparece al final */
    .grid-about .text-container {
        order: 2;
        padding: 20px;
        width: 100%;
    }

    .grid-about .img-about {
        width: 100%;
        height: 120px;
        object-fit: cover;
        max-height: 120px;
    }

    .grid-about .img-about.large {
        height: 150px;
        max-height: 150px;
    }

    /* Resetear las clases específicas en mobile */
    .text-container-mission,
    .text-container-design {
        grid-row: auto;
    }
}


