/* Estilos básicos */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-size: cover;
    position: relative;
    overflow-x: hidden; /* Solución para evitar desbordamientos horizontales */
}

body::after {
    content: "";
    background-color: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 50%;
    background-attachment: fixed;
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
    border-radius: 10px;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    overflow-x: hidden; /* Contiene cualquier posible desbordamiento */
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #000000;
}

.alternating-sections {
    display: flex;
    flex-direction: column;
    gap: 90px;
}

.section {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1500px; /* Puedes ajustar esto si quieres que sea más ancho */
    margin: 0 auto;
}

/* Sección izquierda con más desplazamiento */
.section.left {
    flex-direction: row;
    text-align: left;
    margin-left: -10px; /* Mueve más hacia la izquierda */
}

/* Sección derecha con más desplazamiento */
.section.right {
    flex-direction: row-reverse;
    text-align: right;
    margin-right: -10px; /* Mueve más hacia la derecha */
}

.section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #0d0d0d;
}

.section p, .section ul {
    line-height: 1.6;
    font-size: 18px;
    text-align: justify;
    font-weight: 500;
}

.section ul {
    list-style: none;
    padding: 0;
}

.section ul li {
    margin-bottom: 10px;
}

.section img {
    width: 350px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    margin-left: 20px;
    margin-right: 20px;
}

/* Media Queries para tabletas */
@media (max-width: 768px) {
    /* Ocultar imágenes */
    .section img {
        display: none;
    }

    /* Centrar texto y reorganizar diseño */
    .section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin: 0 auto; /* Elimina los márgenes laterales */
    }

    .section.left,
    .section.right {
        margin-left: 0;
        margin-right: 0;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .section p, .section ul {
        font-size: 16px;
    }
}

/* Media Queries para móviles */
@media (max-width: 480px) {
    body {
        overflow-x: hidden; /* Refuerzo adicional para móviles */
    }

    h1 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .section h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .section p, .section ul {
        font-size: 14px;
    }

    .section {
        padding: 0 10px; /* Evitar que el contenido toque los bordes */
    }

    .alternating-sections {
        gap: 40px;
    }
}
