body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Calibri', sans-serif;
    color: #000;
    font-size: 12px;
    padding: 0;
    margin: 0;
}

.header {
    position: relative;
    width: 100%;
    height: 500px;
    background: url(img/img1.jpeg) no-repeat center center;
    background-size: cover;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 103, 112, 0.8);
}

.logo, .header h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: fadein 2s forwards;
    z-index: 1;
}

.logo {
    width: 300px;
}

.header h1 {
    margin-top: 100px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
}

.spacing {
    height: 20px;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 0 auto;
    width: 80%;
}

.grid-item {
    margin: 20px;
    text-align: center;
}

.grid-item video {
    width: 100%;
    max-width: 560px;
}

.button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: rgba(47, 103, 112, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.button:hover {
    background-color: rgba(37, 82, 88, 0.8);
}

footer {
    margin-top: auto;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 30px 300px;
}

@keyframes fadein {
    to {
        opacity: 1;
    }
}

/* Aquí definimos que cuando la pantalla sea menor a 800px de ancho, 
   los elementos de la cuadrícula ocuparán el 50% del ancho, menos el margen */
   @media (max-width: 1700px) {
    .grid-item {
        flex: 1 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

/* Y aquí definimos que cuando la pantalla sea menor a 500px de ancho, 
   los elementos de la cuadrícula ocuparán el 100% del ancho, menos el margen */
@media (max-width: 1200px) {
    .grid-item {
        flex: 1 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
}




