.mainIndex {
    margin-top: 135px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(auto, max-content); /* Se ajusta a su contenido */
}
.mainIndex > div {
    width: 100%;
    aspect-ratio: 1 / 1; /* Hace que sean cuadrados */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(1, 69, 26, 0.7); /* Color de fondo opcional */
   
    overflow: hidden;
}
.mainIndex img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.section1{
    padding: 20px;
    color: white;
    gap: 1rem;
    line-height: 1.5;
}
.section1 h2,.section4 h2{
    color: white;
    font-size: 2rem;
    font-family: Lucida Calligraphy ;
}
.section1 p{
    font-size: 1.2rem;
}
.section4 ul li{
    list-style: none;
    text-align: left;
    color: white;
    font-size: 1.2rem;
    line-height: 1.2;
}
.section4 a,
.section1 a{
    text-decoration: none;
    padding: 12px 50px;
    margin: 20px;
    color: white;
    background-color: #34845f; /* Un poco más claro */
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0  20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}


.section4 a:before,
.section1 a:before{
   content: '';
   position: absolute;
   top: 2px;
   left: 2px;
   bottom: 2px;
   width: 50%;
   background-color: rgba(225, 225, 225, 0.05);
    
}
.section4 a span:nth-child(1),
.section1 a span:nth-child(1){
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #efefef, #83eab0);
    animation: animate1 2s linear infinite;
}
@keyframes animate1{ 0%{
    transform: translateX(-100%)
}
100%{
    transform: translateX(100%);
}
}
.section4 a span:nth-child(2),
.section1 a span:nth-child(2){
    position: absolute;
    top: 0px;
    right: 0px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #efefef, #83eab0);
    animation: animate2 2s linear infinite;
    animation-delay: 1s ;
}
@keyframes animate2{ 0%{
    transform: translateY(-100%)
}
100%{
    transform: translateY(100%);
}
}
.section4 a span:nth-child(3),
.section1 a span:nth-child(3){
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 100%;
    height: 2px;
    background: linear-gradient(to left, #efefef, #83eab0);
    animation: animate3 2s linear infinite;
    
}
@keyframes animate3{ 0%{
    transform: translateX(100%)
}
100%{
    transform: translateX(-100%);
}
}

.section4 a span:nth-child(4),
.section1 a span:nth-child(4){
    position: absolute;
    top: 0px;
    left: 0px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #efefef, #83eab0);
    animation: animate4 2s linear infinite;
    animation-delay: 1s ;
}
@keyframes animate4{ 0%{
    transform: translateY(100%)
}
100%{
    transform: translateY(-100%);
}
}
@media screen and (max-width:550px) {
    /* Adaptar el layout principal a columna */
    .mainIndex {
        margin-top:130px ;
        display: flex;
        flex-direction: column; /* Esto asegura que las secciones estén una debajo de otra */
    }
    .section1 {
        height: 500px;
        order: 1;
    }
    .section2 {
        order: 2;
    }
    .section4 {
        order: 3;
    }
    .section3 {
        order: 4;
    }
    .section1 h2{     
        margin-top: 20px;
    }
.section1 a{
    font-size: 12px; /* cambia el tamaño aquí */
}
    /* Ajustes de texto */
    .section1 h2, .section4 h2 {
        font-size: 1rem; 
    }
    .section1 p, .section4 ul li {
        font-size: 1rem; /* Reducir el tamaño de fuente */
    }
    .section4 a {
        padding: 10px 30px; /* Ajustar los botones para móvil */
        font-size: 1rem; /* Reducir tamaño de fuente del botón */
    }}
