*{
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
    margin: 0;
    padding: 0;
    font-size: 22px;
}
body{
    position: relative;
    background: url('img/fondo\ gris.jpg') no-repeat center fixed;
    background-size: cover;
}
.titulocentral h2 {
    text-align: center;
    margin-bottom: 50px; /* Aumenta el margen inferior para más espacio */
    color: #000;
    font-size: 40px;
    margin-top: 30px; /* Aumenta el margen superior para bajar el título */
}
.header {
    width: 100%;
    height: 100px;
    background-color: #8B0000;
    overflow: hidden;
    position: relative;
}

.header-layer {
    position: absolute;
    width: 120%;
    height: 50px;
    transform: skewY(-5deg);
}

.header .layer1 {
    background: linear-gradient(to right, #5C0000, #8B0000);
    top: 0;
    left: 0;
}

.header .layer2 {
    background: linear-gradient(to right, #A00000, #C00000);
    top: 20px;
    left: -10px;
    transform: skewY(-5deg);
}

.header .layer3 {
    background: linear-gradient(to right, #D02020, #FF3030);
    top: 40px;
    left: -20px;
    transform: skewY(-5deg);
}

.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
}
.logo img {
    height: 70px;
    border-radius: 50%;
    margin-left: -50px;
    margin-right: 300px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-grow: 1;
    justify-content: center;
    gap: 40px;
    padding: 0;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    font-size: 16px;
    transition: background 0.3s ease-in-out;
}

.nav-links li:last-child {
    margin-left: auto;
    margin-right: 40px;
}

.nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Hover casi transparente (10% de opacidad) */
    border-radius: 10px;
}


.footer {
    position: relative;
    width: 100%;
    height: 100px;
    background-color: #1b3d0f;
    overflow: hidden;
    margin-top: auto;
}

.footer-layer {
    position: absolute;
    width: 120%;
    height: 60px;
    transform: skewY(-5deg);
}

.footer .layer1 {
    background: linear-gradient(to right, #0d330d, #136c13);
    bottom: 0;
    left: 0;
}

.footer .layer2 {
    background: linear-gradient(to right, #1f7a1f, #3ea93e);
    bottom: 20px;
    left: -10px;
    transform: skewY(-5deg);
}

.footer .layer3 {
    background: linear-gradient(to right, #3ca73c, #5cc75c);
    bottom: 40px;
    left: -20px;
    transform: skewY(-5deg);
}

.infofooter {
    font-size: 15px;
    font-weight: bold; /* Cambiado de 300 a bold */
    color: white;
    text-align: center;
    display: block;
    width: 100%;
    position: relative;
    z-index: 10;
    line-height: 15px;
}

.destacada {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.destacada video {
    width: 1000px;
    height: 500px;
    object-fit: contain;
    display: block;
    background-color: #000;
}


.destacada p {
    background: linear-gradient(to right, red, green);
    color: white;
    padding: 20px;
    margin: 0;
    font-weight: bold;
    font-size: 20px;
}

.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 por fila */
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    background: rgba(187, 184, 184, 0.5);
    padding: 20px;
    box-sizing: border-box;
}

/* Tarjetas */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover {
    transform: scale(1.05);
}
.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.card p {
    background: linear-gradient(to right, red, green);
    color: white;
    padding: 10px;
    margin: 0;
    font-weight: bold;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Media query para pantallas de hasta 1024px */
@media screen and (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* 2 tarjetas por fila */
    }

    .header {
        height: auto;
        padding-bottom: 3px; /* Reducimos un poco el padding inferior */
    }

    .navbar {
        padding: 6px 0; /* Reducimos el padding vertical */
    }

    .logo img {
        height: 40px; /* Reducimos la altura del logo */
    }
}

/* Media query para pantallas de hasta 768px */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px; /* Reducimos el gap */
        padding: 6px 0; /* Reducimos el padding vertical */
    }

    .logo img {
        height: 40px; /* Reducimos la altura del logo */
        margin: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 6px; /* Reducimos el gap */
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 8px 0; /* Reducimos el padding vertical de los enlaces */
        background-color: #8B0000;
        border-radius: 5px;
        font-size: 14px; /* Opcionalmente, reducimos el tamaño de la fuente */
    }

    .nav-links a:hover {
        background-color: rgba(0, 0, 0, 0.1); /* Hover casi transparente */
    }

    .destacada video {
        width: 100%;
        height: auto;
    }

    .header {
        height: auto;
        padding-bottom: 3px; /* Reducimos un poco el padding inferior */
    }
}


/* Media query para pantallas de hasta 600px */
@media (max-width: 768px) {
    * {
        font-size: 16px;
    }

    body {
        font-size: 16px;
    }

    .header {
        height: auto; /* Permite que la altura se ajuste al contenido */
        padding-bottom: 3px; /* Reducimos el padding inferior del header */
        position: relative;
    }

    .header-layer {
        height: 15px; /* Reducimos la altura de las capas */
        position: absolute;
        width: 100%;
        left: 0;
        transform: skewY(-5deg);
    }

    .header .layer1 {
        background: linear-gradient(to right, #5C0000, #8B0000);
        top: 0;
    }

    .header .layer2 {
        background: linear-gradient(to right, #A00000, #C00000);
        top: 3px; /* Ajustamos la posición de la capa */
        left: -2px; /* Ajustamos la posición de la capa */
    }

    .header .layer3 {
        background: linear-gradient(to right, #D02020, #FF3030);
        top: 6px; /* Ajustamos la posición de la capa */
        left: -2px; /* Ajustamos la posición de la capa */
    }

    .logo img {
        height: 35px; /* Reducimos la altura del logo */
        margin-left: 0;
        margin-right: 0;
        display: block;
        margin: 3px auto; /* Reducimos los márgenes */
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 3px; /* Reducimos el padding del navbar */
        position: relative;
        z-index: 100;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0;
        gap: 2px; /* Reducimos el espacio entre los enlaces */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 8px 0; /* Reducimos el padding vertical de los enlaces */
        box-sizing: border-box;
        font-size: 14px; /* Reducimos el tamaño de la fuente */
        font-weight: bold;
        text-decoration: none;
        color: white;
        border-radius: 2px;
        transition: background-color 0.3s ease;
    }

    .nav-links a:hover {
        background-color: rgba(0, 0, 0, 0.1); /* Mantenemos el hover */
        border-radius: 5px; /* Reducimos el radio del borde */
    }
}

/* Media query para pantallas aún más pequeñas (ejemplo) */
@media screen and (max-width: 480px) {
    .logo img {
        height: 35px; /* Reducimos aún más el logo */
    }

    .nav-links a {
        font-size: 12px; /* Reducimos aún más la fuente */
        padding: 6px 0; /* Reducimos aún más el padding */
    }

    .destacada p {
        font-size: 16px;
        padding: 10px;
    }

    .card p {
        font-size: 14px;
        padding: 8px;
    }

    .header {
        padding-bottom: 2px; /* Reducimos aún más el padding inferior */
    }

    .navbar {
        padding: 4px 0; /* Reducimos aún más el padding */
    }
}
