* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Neuton', serif;
    color: #006ac0;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, main, footer {
    flex-shrink: 0;
}

main {
    flex-grow: 1;
}

.navbar {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.navbar h1 {
    margin: 0;
    color: #006ac0;
    font-size: 1.5em;
}

.menu {
    list-style: none;
    display: flex;
    margin-left: auto;
}

.menu li {
    margin: 0 15px;
    position: relative;
}

.menu a {
    text-decoration: none;
    color: #006ac0;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.menu a:hover {
    background-color: #006ac0;
    color: #fff;
}

.menu .active > a {
    background-color: #006ac0;
    color: #fff;
    font-weight: bold;
}

.dropdown {
    display: none;
    position: absolute;
    background: #fff;
    list-style: none;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.menu li:hover .dropdown {
    display: block;
}

.dropdown li {
    margin: 5px 0;
}

.dropdown a {
    padding: 5px 10px;
    color: #006ac0;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown a:hover {
    background-color: #006ac0;
    color: #fff;
}

.contenido {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 100px;
}

h1 {
    text-align: center;
    color: #006ac0;
    margin-bottom: 30px;
}

.articulos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tarjeta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
    height: 100%;
}

.tarjeta:hover {
    transform: translateY(-5px);
}

.img-container {
    height: 150px;
    overflow: hidden;
}

.img-cuadrada {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.texto {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
}

.texto h2 {
    color: #006ac0;
    margin: 10px 0;
}

.texto p {
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
    margin-bottom: 20px;
}

.moodle-button {
    display: block;
    margin: auto;
    padding: 10px 20px;
    background-color: #006ac0;
    color: white; /* Asegura que el texto sea blanco */
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Neuton', serif;
    max-width: fit-content;
}

.moodle-button:hover {
    background-color: #0056b3;
    color: rgb(255, 253, 253); /* Mantén el texto blanco al hacer hover */
}

.social-icons {
    position: relative;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-icons a {
    color: #000;
    font-size: 24px;
    transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2) rotate(10deg);
}

.social-icons a:nth-child(1) { color: #25D366; }
.social-icons a:nth-child(2) { color: #3b5998; }
.social-icons a:nth-child(3) { color: #e1306c; }
.social-icons a:nth-child(4) { color: #000000; }
.social-icons a:nth-child(5) { color: #f87408; }

footer {
    text-align: center;
    padding: 20px;
    background: #006ac0;
    color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
    }

    .menu li {
        margin: 10px 0;
        width: 100%;
    }

    .articulos {
        grid-template-columns: 1fr;
    }

    .tarjeta {
        margin: 10px 0;
    }

    .img-container {
        height: 200px;
    }

    .contenido {
        margin: 10px;
        padding: 15px;
        margin-bottom: 50px;
    }

    .social-icons {
        flex-wrap: wrap;
    }
}
