* {
    box-sizing: border-box;
    margin: 0rem;
    padding: 0rem;
    border: 0rem;
}

body {
    background-color: #ffd6e7;
    margin: 0;
    color: #3f56d6;
    font-family: "Schoolbell", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
}

header {
    background-color: #ffb6d1;
    text-align: center;
    color: white;
    padding-top: 20px;
}

nav {
    background-color: #3f56d6;
    width: 100%;
    border-top: 3px dashed #7082eb;
}

main {
    padding: 40px;
}

button {
    background-color: #ffc4da;
    color: #3f56d6;
    border: 3px dashed #3f56d6;
    padding: 14px 22px;
    font-family: "Schoolbell", cursive;
    font-size: 1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 5px 5px 0px #ff8fb1;
}

button:hover {
    transform: translateY(-4px) rotate(-1deg);
    background-color: #ffb6d1;
    box-shadow: 8px 8px 0px #ff6f9f;
}


h1 {
    margin-top: 0;
}

    h1:first-of-type {
        font-size: 3rem;
        line-height: 1;
    }

.subtitulo {
    margin-top: 19px;
}

.contenedor-botones {
    display: flex;
    gap: 15px;
    margin-top: 19px;
}

.contenedor-section-principal {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 10px;
}

    .contenedor-section-principal figure {
        margin: 0;
        width: auto;
        flex-shrink: 0;
    }

    .contenedor-section-principal > div {
        flex: 1;
    }

    .contenedor-section-principal img {
        width: 280px;
        height: 280px;
        object-fit: cover;
        border: 4px solid #3f56d6;
        outline: 3px dashed #ff8fb1;
        outline-offset: 3px;
        transform: rotate(-1deg);
        box-shadow: 6px 6px 15px rgba(0,0,0,0.15);
        display: block;
        margin: 0;
    }

.contenedor-mascotas h1 {
    margin-top: 20px;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.caja-mascotas figure img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 20px 80px 40px 90px;
    border: 5px dashed #3f56d6;
    background-color: #ffc4da;
    padding: 6px;
    display: block;
    margin: 0 auto;
    transform: rotate(-2deg);
}

.caja-mascotas figure {
    margin-left: 40px;
    margin-right: 40px;
}

nav {
    background-color: #ffc4da;
    width: 100%;
}

    nav ul {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        list-style: none;
        padding: 20px 0;
        margin: 0;
    }

    nav a {
        text-decoration: none;
        color: #3f56d6;
        font-weight: bold;
        padding: 10px 20px;
        border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
        transition: all 0.3s ease;
        display: inline-block;
    }

        nav a:hover {
            background-color: #ff6f9f;
        }

.contenedor-materias {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    flex-wrap: nowrap;
}

.caja-materias {
    background-color: #ffc4da;
    padding: 25px 35px;
    border-radius: 20px;
    width: 33%;
    min-width: 0;
}

    .caja-materias h2 {
        text-align: left;
        margin-bottom: 10px;
        padding-left: 15px;
    }

    .caja-materias ul {
        padding-left: 15px;
        margin-top: 0;
    }

.galeria {
    width: 33.33%;
    position: relative;
    float: left;
    margin: 0 auto;
    text-align: center;
}

.caja-materias li {
    margin-bottom: 8px;
}

.nav-botones {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.boton-nav {
    background-color: #ffc4da;
    color: #3f56d6;
    border: 3px dashed #3f56d6;
    padding: 14px 22px;
    font-family: "Schoolbell", cursive;
    font-size: 1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 5px 5px 0px #ff8fb1;
}

    .boton-nav:hover {
        transform: translateY(-4px) rotate(-1deg);
        background-color: #ffb6d1;
        box-shadow: 8px 8px 0px #ff6f9f;
    }


footer {
    background-color: #ffb6d1;
    padding: 20px;
    text-align: left;
    margin-top: 15px;
}


.carousel-section {
    margin-top: 80px;
}

.caja-dibujos h1 {
    margin-top: 20px;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}


    .slide img {
    width: 100%;
    object-fit: cover;
    display: block;
    outline: 3px dashed #ff6f9f;
    outline-offset: 3px;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.slide img:hover {
    transform: scale(1.05) rotate(1deg);
}

    
/*DESKTOP*/

@media (min-width: 769px) {

    main {
        max-width: 1400px;
        margin: 0 auto;
    }

    .contenedor-section-principal {
        display: grid;
        grid-template-columns: 320px 1fr;
        align-items: center;
        gap: 60px;
        margin-top: 40px;
    }

        .contenedor-section-principal img {
            width: 320px;
            height: 320px;
        }

    .contenedor-botones {
        flex-wrap: wrap;
    }

    .contenedor-mascotas {
        margin-top: 80px;
    }

    .caja-mascotas {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }

        .caja-mascotas h1 {
            width: 100%;
            margin-bottom: 10px;
            text-align: left;
        }

        .caja-mascotas figure {
            margin: 0;
        }

           .caja-mascotas figure img {
                width: 320px;
                height: 320px;
            }

    .carousel-section {
        width: 100%;
        margin-top: 70px;
    }

    .caja-dibujos {
        width: 100%;
    }

        .caja-dibujos h1 {
            margin-top: 20px;
            font-size: 1.6rem;
            margin-bottom: 1.5rem;
            text-align: left;
        }

    .carousel {
        display: flex;
        gap: 25px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding: 20px 10px;
        width: 100%;
    }

    .slide {
        flex: 0 0 auto;
        width: 320px;
    }

        .carousel::-webkit-scrollbar {
            height: 12px;
        }

        .carousel::-webkit-scrollbar-track {
            background: #ffc4da;
            border-radius: 20px;
        }

        .carousel::-webkit-scrollbar-thumb {
            background: #3f56d6;
            border-radius: 20px;
        }

    .slide img {
        width: 100%;
        height: 320px;
        object-fit: cover;
        display: block;
        outline: 3px dashed #ff6f9f;
        outline-offset: 3px;
        border: 4px solid #3f56d6;
        box-shadow: 8px 8px 20px rgba(0,0,0,0.15);
        transform: rotate(-1deg);
        transition: transform 0.3s ease;
    }

            .slide img:hover {
                transform: scale(1.05) rotate(1deg);
            }

    .contenedor-materias {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        align-items: start;
    }

    .caja-materias {
        width: 100%;
        height: 100%;
    }


    section:has(.galeria) {
        margin-top: 70px;
    }

    .galeria {
        font-size: 1.2rem;
    }

        .nav-botones {
            flex-direction: row;
            justify-content: center;
        }

        .boton-nav {
            min-width: 220px;
        }

        .datos_academicos {
            margin-top: 90px;
        }

            .datos_academicos .contenedor-materias {
                grid-template-columns: repeat(3, 1fr);
            }
    }

/* animaciones */

.contenedor-botones a {
    opacity: 0;
    transform: translateX(-40px);
    animation: aparecerDesdeIzquierda 0.8s ease forwards;
}

.caja-materias {
    transform: translateX(-40px);
    animation: aparecerDesdeIzquierda 0.8s ease forwards;
}

.contenedor-botones a:nth-child(1) {
    animation-delay: 0.2s;
}

.contenedor-botones a:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes aparecerDesdeIzquierda {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {

    body > img {
        display: block;
        width: 45%;
        max-width: 160px;
        height: auto;
        margin: 20px auto 0;
    }

    nav ul li {
        justify-content: center;
        width: 25%;
        text-align: center;
        color: #3f56d6;
    }

    main {
        width: 100%;
        padding: 20px;
    }

        main section,
        article {
            width: 100%;
        }

    .contenedor-section-principal {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

        .contenedor-section-principal figure {
            margin: 0;
        }

        .contenedor-section-principal img {
            width: 260px;
            height: 260px;
            object-fit: cover;
            border: 4px solid #3f56d6;
            outline: 3px dashed #ff8fb1;
            outline-offset: 3px;
            transform: rotate(-1deg);
            box-shadow: 6px 6px 15px rgba(0,0,0,0.15);
            display: block;
        }

    .contenedor-botones {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }

        .contenedor-botones a,
        .contenedor-botones button {
            display: block;
            width: 100%;
            font-size: 21px;
            text-decoration: none;
        }

    .contenedor-materias {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        margin-top: 30px;
    }

    .caja-materias {
        width: 100%;
        padding: 20px;
    }

    footer {
        width: 100%;
        margin-top: 30px;
    }

    .caja-mascotas {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .carousel {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 10px 14px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #3f56d6 #ffc4da;
    }


       .carousel::-webkit-scrollbar {
            height: 8px;
        }

        .carousel::-webkit-scrollbar-track {
            background: #ffc4da;
            border-radius: 999px;
        }

        .carousel::-webkit-scrollbar-thumb {
            background: #3f56d6;
            border-radius: 999px;
        }

        .carousel::-webkit-scrollbar-button {
            display: none;
            width: 0;
            height: 0;
        }


    .slide {
        flex: 0 0 auto;
        width: 250px;
    }
        .slide img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            display: block;
        }

        .nav-botones {
            flex-direction: column;
            width: 100%;
        }

        .boton-nav {
            width: 100%;
        }
    }

@media (max-width: 480px) {

    main {
        padding: 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    p,
    li,
    a,
    button,
    footer {
        font-size: 1rem;
    }
}

.datos_academicos {
    margin-top: 40px;
    margin-bottom: 0;
    padding-bottom: 0;
}

section:has(.galeria) {
    margin-bottom: 20px;
}

.datos_academicos .caja-materias {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 20px;
}

.datos_academicos img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin: 0 auto 5px;
    display: block;
    align-self: center;
}

.datos_academicos h2 {
    margin-bottom: 3px;
}

.datos_academicos h5 {
    margin-bottom: 10px;
}

.datos_academicos ul {
    list-style: none;
    padding-left: 0;
}

.datos_academicos li {
    margin-bottom: 8px;
}

    .datos_academicos li::before {
        content: "✦ ";
    }
