/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* font-family: sans-serif; */
    line-height: 1.6;
    background-color: #f5f5f5;
    background-image: url('./../images/');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    color: #333;
    padding: 20px;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
}

.h2 {
    color: rgb(117, 70, 228);
    font-size: 2 em;
}



.intro-box a {
    color: orange;
    text-decoration: none;
    font-weight: normal;
    transition: font-weight 0.2s ease;
}

.intro-box a:hover {
    font-weight: bold;
    font-size: large;
}


/* Cursos */
/* Estilos para estructura de carpetas */
.folder {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #ccc;
}

details {
    margin-bottom: 0.5rem;
}

summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    background: #e9f0f4;
    border-radius: 6px;
    transition: background 0.2s;
}

summary:hover {
    background: #6dccf8;
    font-style: italic;
    text-decoration: underline;
}

summary:focus {
    outline: 2px solid #6dccf8;
    outline-offset: 2px;
    background: #6dccf8;
    font-style: italic;
    text-decoration: underline;
}

/* Restaurar estilo cuando el elemento details se cierre */
details:not([open]) summary {
    font-style: normal;
    text-decoration: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('./../images/carpeta.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
    vertical-align: middle;
}

details[open] > summary::before {
    background-image: url('./../images/carpeta-abierta.png');
}

.item {
    padding: 0.3rem 0.6rem;
    margin-left: 1.5rem;
    border-left: 2px dotted #aaa;
    color: #555;
}

.h1_cursos {
    font-size: 1.5em;
    color: #4512ed;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: bold;
    border: 2px solid #4512ed;
    border-radius: 10px;
    padding: 15px;
    background-color: #f7f6fd;
    animation: bounce 2s infinite;
    /* Añade la animación */
}

/* Definición de la animación */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
        /* Posición inicial y final */
    }

    50% {
        transform: translateY(-10px);
        /* Rebote hacia arriba */
    }
}

.linea-delimitadora {
    border: none;
    border-top: 2px solid #ccc;
    margin: 2rem 0;
}

@media (max-width: 768px) {

    body {
        padding: 10px;
        font-size: 0.95em;
    }

    header {
        padding: 10px;
    }

    .about-section {
        flex-direction: column;
        padding: 30px 15px;
        text-align: center;
    }

    .about-img img {
        width: 180px;
        margin: 0 auto;
    }

    .menu-cursos {
        flex-direction: column;
        align-items: center;
    }

    .menu-cursos ul {
        flex-direction: column;
        gap: 15px;
    }

    .menu-cursos li a {
        width: 80%;
        height: auto;
        line-height: 2.5;
        font-size: 1em;
    }

    .form,
    .wrapper {
        width: 95% !important;
    }

    .title {
        font-size: 1.5em;
        width: 90%;
    }

    .about-text {
        padding: 10px;
    }
}

/* Estilo base común para todos los tipos de archivo */
.file-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding-left: 25px;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-position: left center;
    transition: color 0.3s ease;
}

.file-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.pdf-link {
    background-image: url('./../images/pdf.png');
}

.html-link {
    background-image: url('./../images/html.png'); /* Usa un icono HTML */
}

.external-link {
    background-image: url('./../images/internet.png'); /* Icono de enlace externo */
}

.md-link {
    background-image: url('./../images/md.png'); /* Icono markdown */
}

.book-link {
    background-image: url('./../images/book.png'); /* Icono libro */
}

.zip-link {
    background-image: url('./../images/zip.png'); /* Icono ZIP */
}

