/* Animación entre diferentes html */
@view-transition {
    navigation: auto;
}

/* Animación al bajar el scroll */
/* @media(max-width: 750px) {
    .section {
        padding-bottom: 0px !important;
    }
    main h2 {
        margin-top: 50px !important;
    }
    main > * {
        animation-range: entry 0% cover 30%;
    }
}
@keyframes show {
    from {
        opacity: 0; scale: 10%;
    }

    to {
        opacity: 1; scale: 100%;
    }
}
main > *:not(:first-child) {
    view-timeline-name: --reveal;

    animation-name: show;
    animation-timing-function: linear;
    animation-fill-mode: both;

    animation-timeline: --reveal;
    animation-range: entry 0% cover 40%;
} */

 /* web */
html {
    scroll-behavior: smooth;
}

body {
    background-image: var(--color-background-infinite);
    display: grid;
    grid-template-columns: 5rem 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
    "sidebar header"
    "sidebar main"
    "sidebar footer";
    min-height: 100dvh;
    transition: all .3s ease-in-out;

    .hero {
        grid-area: header;
    }
    .sidebar {
        grid-area: sidebar;
        min-height: 100dvh;
    }
    main {
        grid-area: main;
        transition: margin-bottom .3s ease-in-out;
    }
    footer {
        grid-area: footer;
    }
}

/* Sidebar */

.sidebar {
    position: fixed;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    width: 300px;
    height: 100dvh;
    max-height: 100%;
    background-color: white;
    z-index: 9998;
    scrollbar-gutter: stable both-edges; /* para que el scroll no modifique mi contenido */
    box-shadow: var(--shadow-sidebar);
    transition: all .3s ease-in-out;

    .sidebar-size-btn {
        border-radius: 50%;
        width: 2rem;
        height: 2rem;
        position: absolute;
        right: -.5rem;
        top: 4rem;
        background-color: white;
        box-shadow: var(--shadow-sidebar);
        cursor: pointer;
        transition: all .3s ease;

    }
    
    .sidebar-logo {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 4rem;
        height: 5rem;
        padding: 0.5rem;
        gap: 1rem;
        overflow: hidden;
        transition: padding-left .3s ease;

        .logo {
            aspect-ratio: 1/1;
            width: 5rem;
            height: 5rem;
        }
        
        .logo-tittle {
            font-size: 1.8rem;
        }
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: min-content;
        height: auto;
        padding: .5rem 1rem;

        .sidebar-links {
            overflow: hidden;
            list-style: none;
            padding: .2rem;

            .sidebar-link-icon {
                width: 2rem;
                height: 2rem;
            }

            .sidebar-link {
                display: flex;
                flex-direction: row;
                justify-content: start;
                align-items: center;
                gap: 0.5rem;
                padding: .3rem;
                text-decoration: none;
                color: var(--color-principal-text);
                font-size: 1.3rem;
                font-weight: 500;
                width: 100%;
                height: 3.3rem;
            }
        }
    }

    .sidebar-links-open {
        margin-left: auto;
        width: 1.3rem;
        height: 1.3rem;
        transition: all .3s ease-in-out;
    }
    
    .sidebar-submenu {
        overflow: hidden;
        width: 100%;
        height: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease-in-out; /* la animación de altura no funciona con valores auto */

        &::before {
            content: "";
            position: absolute;
            height: 100%;
            width: 0.07rem;
            margin-left: 1.25rem;
            background: var(--color-secondary-text);
        }
    
        .submenu-links{
            list-style: none;
            margin-left: 3.5rem;
            padding: .2rem;
            width: fit-content;
            max-width: 13rem;
            
            .submenu-link {
                text-decoration: none; /* Quita el subrayado del enlace */
                color: var(--color-secondary-text); /* Hace que el texto del <a> sea blanco */
                display: block; /* Asegura que el enlace ocupe todo el <li> */
                padding: 8px; 
                font-size: 1.3rem;
                font-weight: 400; 
            }
        }
    }

    .sidebar-user {
        margin-top: auto;
        flex-shrink: 0; /* Evita que la sección del usuario se encoja */
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        height: auto;
        gap: .5rem;
        padding: .5rem 1rem;

        &::before {
            display: block;
            content:"";
            position: absolute;
            top: 0;
            width: 80%;
            height: auto;
            border-top: 1px solid black;
        }

        .user-tittle {
            color: var(--color-principal-text);
        }

        .user-data {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            overflow: hidden;
            width: 100%;
            height: 3rem;
            padding: .3rem;
            gap: 1rem;
            transition: padding-right .3s ease;

            .user-img {
                margin-left: auto;
                width: 2.5rem;
                height: 2.5rem;
                border-radius: 50%;
                object-fit: contain;
            }
        }

        .user-sections {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            overflow: hidden;
            width: 100%;
            height: 3rem;
            padding: .3rem;
            gap: 1rem;

            .user-icons {
                margin-left: auto;
                margin-right: 3px;
                width: 2rem;
                height: 2rem;
                border-radius: 50%;
                object-fit: contain;
            }
        }
    }
}

.current {
    background-color: var(--color-secondary-text);
    border-radius: 15px;

    span {
        color: var(--color-text);
    }
    .sidebar-links-open {
        filter: invert(58%) sepia(68%) saturate(466%) hue-rotate(324deg) brightness(93%) contrast(91%);
        transition: all .3s ease-in-out;
    }
}

.active .sidebar-link {
    background: var(--color-background); 
    border-radius: 15px;

    span {
        color: var(--color-principal-text);
    }
}

.sidebar-links.active .sidebar-links-open {
    transform: rotate(180deg);
    transition: all .3s ease-in-out;
}

.sidebar-link:hover {
    background: var(--color-background);
    border-radius: 15px;
    cursor: pointer;

    span {
        color: var(--color-principal-text);
    }
    .sidebar-links-open {
        filter: none;
    }
}

.submenu-links:hover {
    background: var(--color-background);
    border-radius: 15px;
    cursor: pointer;
}

.user-data:hover {
    background: var(--color-background);
    border-radius: 15px;
    cursor: pointer;
}

.user-sections:hover {
    background: var(--color-background);
    border-radius: 15px;
    cursor: pointer;
}

/* Sidebar Minimize */
.minimize{
    width: 4.94rem;
    transition: width .3s ease;
}

.minimize .sidebar-size-btn{
    right: -1.5rem;
    transform: rotate(180deg);
    transition: transform .3s ease;     
}

.minimize .sidebar-logo {
    justify-content: flex-start;
    padding-left: 0;
    transition: padding-left .3s ease;
}

.minimize .user-data {
    padding-right: .23rem !important;    
    transition: padding-right .3s ease;
}

.minimize .sidebar-links:hover,
.minimize .sidebar-links.active/*,
.minimize .sidebar-submenu */{
    overflow: visible;
}
.minimize .sidebar-links:hover span,
.minimize .active .sidebar-link span {
    position: absolute;
    /* height: 5rem; */
    width: max-content;
    left: 5.2rem;
    padding: .5rem;
    background-color: var(--color-secondary-text);
    color: white;
    border-radius: .4rem;
    transition: all .3s ease;
}
.minimize .active .sidebar-links-open,
.minimize .sidebar-links:hover .sidebar-links-open {
    position: absolute;
    left: 3.8rem;
    transition: transform .3s ease-in-out;
}
.minimize .sidebar-submenu {
    position: absolute;
    margin-top: -.2rem;
    width: max-content;
    left: 5.2rem;
    background-color: white;
    border-radius: .4rem;
    transition: all 0.3s ease-in-out;

    &:before {
        width: 0;
    }
    .submenu-links {
        margin: 0 0.5rem;
    }
}
.minimize .active .sidebar-submenu { 
    transition: all 0.3s ease-in-out;

    &::before {
        width: 0;
    }
    .submenu-links {
        margin: 0 0.5rem;
    }
}

/* Ancho del contenido */
main {
    margin-bottom: 50px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
    transition: padding-left .3s ease-in-out;
}

/* Header */

#home .hero {
    width: 100%;
    height: clamp(500px, 78dvh, 820px); /* Ajusta entre 500px y 820px según el viewport */
    min-height: 500px; /* Evita que sea demasiado pequeño */
    max-height: 820px;
    position: relative;
    display: grid;
    grid-template-rows: clamp(50px, 10vh, 100px) 1fr;
    color: var(--color-text);
}

#home .hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, #000000d7 0%, #0000009f 100% ), url('../../public/images/hero-img.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: brightness(70%); /* Reduce el brillo */
    /* si clip-path tiene un elemento hijo con position fixed, este va a coger como limite el clip-path en vez de fijarse al navegador. Es por eso que lo añadimos en :before */
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 95%, 0 80%); 
    z-index: -1;
}

#lessons .hero, #exercises .hero {
    position: relative;
    width: 100%;
    height: clamp(50px, 8vw, 100px);
    display: grid;
    grid-template-rows: clamp(50px, 10vh, 100px) 1fr;
    color: var(--color-text);

    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
        width: 100%;
        height: 100%;
        background-image: url("../../public/images/hero-img.webp");
        background-position: center;
        background-size: cover;
        filter: brightness(30%);
    }
}

.nav {
    --padding-container: 0;
    height: clamp(50px, 8vw, 100px); /* usar vw para ajustar la altura dinámicamente en móviles */
    display: flex;
    align-items: center;
    border-bottom: 1px solid white;
    position: relative;
    z-index: 999;
}

.nav-logo {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    align-items: center;
    margin-right: auto;

    .logo {
        /* aspect-ratio: 1/1; */
        max-width: 30%;
        width: auto;
        max-height: 100%;
        height: 100%;
        object-fit: contain;
    }

    .nav-tittle {
        font-weight: 400;
        font-size: var(--size-subtittle);
    }
}

.nav-links {
    margin-left: auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 2em;
}

.nav-item {
    list-style: none; /* para quitar los puntos de la <ul> */ 
}

.nav-link {
    padding: 20px 0;
    color: var(--color-text);
    text-decoration: none; /* le quito el subrayado de los links */
    font-size: var(--size-subtittle);

    &:hover {
        color: var(--btn-bg-color);
    }
}

.nav-menu {
    margin-left: auto;
    cursor: pointer;
    display: none; /* oculto excepto para dispositivos móviles */
    z-index: 999;
     &:hover {
        filter: invert(58%) sepia(68%) saturate(466%) hue-rotate(324deg) brightness(93%) contrast(91%);
     }
}

#footer-home {
    position: sticky; 
    bottom: 0;
    width: 100%;
    max-width: 100dvw;
    overflow: hidden;
    z-index: 999;

    .nav-footer {
        width: 100%;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        --padding-container: 20px 30px;

        &::before {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: var(--color-subtittle);
          z-index: -1;
          pointer-events: none;
          opacity: .8;
          backdrop-filter: blur(40px);
        }
    }

    .nav-links {
        margin: 0;
        margin-left: auto;

        .nav-item:nth-child(2)::before {
            position: sticky;
            content: "";
            width: 2px;
            height: 100%;
            border: 1px solid var(--btn-bg-color);
            margin-right: 2rem;    
        }
        .nav-item:nth-child(2)::after {
            position: sticky;
            content: "";
            width: 2px;
            height: 100%;
            border: 1px solid var(--btn-bg-color);
            margin-left: 2rem;    
        }
    }

    .nav-subir {
        position: sticky;
        bottom: 0;
        margin-left: auto;
        cursor: pointer;
        opacity: 0;
        transform: translateY(80px);
        transition: opacity .5s ease-in-out, transform .5s ease-in-out;

        &:hover {
            filter: invert(58%) sepia(68%) saturate(466%) hue-rotate(324deg) brightness(93%) contrast(91%);
        }

      &.visible {
        opacity: 1;
        transform: translateY(0px);
      }
      .arrow-up-circle-animated {
        width: 40px; 
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        /* background: #00000049; */
      }   
      .circle-border {
        /* La circunferencia del círculo con r=49 es 2 * pi * 49 = ~307.87608 */
        --circumference: 307.87608;
        stroke-dasharray: var(--circumference);
        stroke-dashoffset: var(--circumference); /* Empieza completamente oculto */
        stroke: var(--btn-bg-color); /* Color del borde que se rellenará */
        stroke-width: 12; /* Grosor del borde */

        /* Animación basada en scroll */
        animation: draw-circle linear both; 
        animation-timeline: scroll(root); /* Anima con el scroll del documento raíz */
        animation-range: entry 200px cover 100%;
      }
      .arrow-icon {
        stroke: var(--btn-bg-color);
      }
    }
}
@keyframes draw-circle {
    from {
        stroke-dashoffset: var(--circumference); /* Empieza oculto */
    }
    to {
        stroke-dashoffset: 0; /* Termina completamente dibujado */
    }
}

@keyframes footer-animation {
  from{
    transform: scale(1) translateY(0);
    color: var(--color-text);
  } to {
    transform: scale(1.3) translateY(-30px);
    color: var(--btn-bg-color);
  }
}

.nav-img {
    display: block;
    max-width: 30px;
    width: 30px;
    max-height: 30px;
    height: 30px;
}

.nav-close {
    display: none;
}

.hero-container {
    max-width: 842px;
    --padding-container: 0;
    display: grid;
    grid-auto-rows: max-content;
    justify-items: center;
    align-content: center;
    gap: 2rem;
    padding-bottom: 100px;
}

.hero-tittle {
    max-width: 100%;
    font-size: var(--size-tittle);
    text-align: center;
}

.hero-paragraph {
    max-width: 90%;
    margin-bottom: 20px;
    font-size: var(--size-subtittle);
    text-align: center;
}

.btn {
    display: inline-block;
    font-size: var(--size-subtittle);
    font-weight: 400;
    color: var(--color-tittle);
    background-color: var(--btn-bg-color);
    justify-self: center;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 32px;
    transition: all .2s ease;

    &:hover {
        background-color: var(--color-tittle);
        color: var(--btn-bg-color);
    }
}

/* Main */
.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 3rem;
    --padding-container: 50px 0 ;
    padding-bottom: 25px;
    &:first-child {
        padding-top: 0;
    }
    
    .subtittle {
        color: var(--color-text);
        font-size: var(--size-tittle);
        background: var(--bg-gradient);
        max-width: 80%;
        width: max-content;
        height: auto;
        padding: 10px;
        text-align: center;
        margin: 4rem auto 1.5rem;
        border-radius: 10px;
    }

    .section-paragraph {
        color: var(--color-subtittle);
        font-size: var(--size-subtittle);
        max-width: 62ch;
        text-align: center;
        margin-bottom: 4rem;
        border: 1px solid var(--color-tittle);
        border-radius: 10px;
        padding: 2rem;
        /* inset para hacer sombra interior */
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3); 
    }
}

#home .section-main {
    width: 100%;
    display: grid;
    justify-content: center;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: auto;
    gap: 2rem;
}

#lessons .section-main {
    width: 100%;
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    grid-auto-rows: minmax(200px, 1fr);
    gap: 2rem;
}

.section:has(.section-icons) {
    overflow: visible;
}

.section-main a {
    overflow: visible;
    background-color: var(--color-text);
    justify-self: center;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: max-content;
    justify-items: center;
    align-content: center;
    text-align: center;
    border: 2px solid var(--color-tittle);
    position: relative;

    &::after {
        background: inherit;
        position: absolute;
        content: "";
        width: 100%;
        height: 100%;
        filter: blur(25px) saturate(1.5);
        scale: .7;
        z-index: -1;
        transition: all .2s ease; 
    }

    &:hover {
        cursor: pointer;

        &::after {
            scale: 1.03;
        }
    }

    .section-icons {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: fit-content;
        justify-items: center;
        align-content: center;
        text-align: center;
        gap: 0.5rem;
        padding: 20px;
        line-height: 1.2;
    }

    .section-icon {
        min-width: auto;
        width: 3rem;
        min-height: auto;
        height: 3rem;
    }

    .section-tittle {
        font-size: var(--size-tittle);
        color: var(--color-tittle);
    }

    .section-paragraph {
        font-size: var(--size-paragraph);
        font-weight: 400;
        color: var(--color-subtittle);
        margin: 10px auto;
        max-width: 30ch;
        text-align: center;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}
/* para evitar section-icons de home que el <p> sea estrecho */
#home .section-paragraph {
    max-width: 60ch;
}

/* Titles bg blur */
.blur {
    position: relative;
    width: max-content;
    height: auto;
    padding: 10px;
    font-size: var(--size-tittle);
    font-weight: 500;
    margin: 13px auto 40px;
    background: var(--bg-gradient);
    text-align: center;
    border-radius: 10px;
    color: var(--color-text);
    opacity: 0;
    animation: fadeIn 1s forwards;
    box-shadow: 0 0 20px 3px rgba(33, 88, 151, 0.7);
}
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Tabla Verb Tenses */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    gap: 20px
}
th {
    font-size: var(--size-subtittle);
    padding: 8px;
    text-transform: uppercase;
    height: 3.5rem;

    &:first-child {
        border-top-left-radius: 10px;
    }
    &:last-child {
        border-top-right-radius: 10px;
    }
}
thead tr {
    height: 4.5rem;
    background: linear-gradient(to right, white 0%, #e0e0e0 40%, #cccccc 50%, #e0e0e0 60%, white 100%);
}
tbody tr {
    height: 3.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* para safari */

    &:last-child {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
}
tr:nth-child(even) {
    td {
        color: rgb(29, 228, 152);
    }
}
tr:nth-child(odd) {
    td {
        color: rgb(229, 255, 0);
    }
}
td {
    font-size: var(--size-paragraph);
    border: 1px solid var(--color-text);
    padding: 8px;
    text-align: left;
}
.verb-col {
    width: 27%;
    background: var(--color-tittle);
}
td:nth-child(1) {
    font-weight: 500;
    border-bottom-left-radius: 10px;
}
.structure-col {
    width: 35%;
    background: var(--color-subtittle);
}
td:nth-child(2) {
    text-align:center;
    word-spacing: 5px; /* aumenta el espacio entre palabras */
}
.example-col {
    width: 38%;
    background: var(--color-tittle);
}
td:nth-child(3) {
    border-bottom-right-radius: 10px;
}
/* Sections Main Margins */
#verb-tenses,
#modals-auxiliary-verbs,
#conditionals-passive-voice {
    margin-top: 100px;

    h3:not(:first-of-type) {
        margin: 90px auto 30px;
    }
    h3:first-of-type {
        margin: 0 auto 30px;
    }
}
@media(max-width:1200px) {
    #verb-tenses,
    #modals-auxiliary-verbs {
        margin-top: 50px;
}
}

/* Cards */
.card-sections {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.card-container {
    cursor: pointer;
    width: clamp(300px, 50dvw, 550px);
    height: 300px;
    perspective: 1000px; /* tiene que estar en el elemento padre del que rota */
    &:hover .card {
        transform: rotateY(180deg);
    }
}
.card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
    background: linear-gradient(to bottom,
                rgba(0, 0, 0, .4) 0%,
                rgba(0, 0, 0, 0) 50%,
                rgba(0, 0, 0, .4) 100%
        );
    transform-style: preserve-3d; /* tiene que estar en el elemento que rota para que sea 3d */
    transition: transform .3s ease;
    
    h4 {
        padding: 5px;
        font-size: 2.5rem;
        background: var(--text-gradient);
        -webkit-background-clip: text; 
        -webkit-text-fill-color: transparent; 
        background-clip: text; 
        color: transparent; 
    }
    p {
        font-size: 1.5rem;
        text-align: left;
        color: var(--color-text);        
        border-radius: 5px;
        strong:nth-child(1) {
            background: var(--text-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text; 
            color: transparent;
        }
        strong:nth-child(n+2) {
            color: var(--color-principal-text);
        }
    }
}
.front-card,
.back-card {
    padding: 2.5rem;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    backface-visibility: hidden; /* tiene que estar en el elemento que esta dado la vuelta para que no se vea */
}
.back-card {
    transform: rotateY(180deg);
}
@media(max-width: 640px) {
    .card-container {
        width: 75dvw;
        height: 200px;
      }
    .card {
        h4 {
            font-size: 2rem;
        }
        p {
            font-size: 1rem;
        }
    }
    .front-card {
        padding: 2rem;
    }
}

/* Conditionals Section & Passive voices Section */
.section:has(.conditionals-container, .passive-voice-container) {
    overflow: visible;
}
.conditionals-container,
.passive-voice-container {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: left;
    width: clamp(300px, 80dvw, 550px);
    height: clamp(360px, 45dvh, 500px);
    /* min-height: fit-content; */
    gap: 20px;
    padding: 30px;
    border-radius: 12px;
    color: var(--color-text);
    background: #b0b0b0;
    isolation: isolate; /* aisla el elemento (stacking context), es la clave para que el background quede al fondo de todos los demas elementos */
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
    transition: transform .2s ease;
    &:hover {
        transform: scale(1.1) translateY(-10px);
        z-index: 999;
    }
    h4 {
        padding: 5px;
        font-size: 2rem;
        background: var(--text-gradient);
        -webkit-background-clip: text; /* Clip del fondo al texto */
        -webkit-text-fill-color: transparent; /* Hace el texto "transparente" para que se vea el fondo */
        background-clip: text; /* Para navegadores compatibles */
        color: transparent; /* Por si acaso, como fallback */
    }
    p {
        position: relative;
        text-align: left;
        font-size: 1.3rem;
        color: var(--color-text);
        padding: 5px;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, .6) 0%,
                rgba(0, 0, 0, 0) 100%
        );
        border-radius: 5px;
        strong:nth-child(1) {
            background: var(--text-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text; 
            color: transparent;
        }
        strong:nth-child(n+2) {
            color: var(--color-principal-text);
        }
    }
    &::before,
    &::after {
        content: "";
        position: absolute;
    }
    &::before {
        background-image: conic-gradient(
            var(--color-tittle) 0deg,
            transparent 60deg,
            transparent 180deg,
            var(--btn-bg-color) 180deg,
            transparent 240deg
        );
        inset: -60%; /* para que se expanda por fuera de la card */
        z-index: -3;
        animation: border 8s linear infinite;
    }
    &::after {
        --inset: 0.25rem;
        background: linear-gradient(135deg, #d1d1d1 0%, #e3e3e3 25%, #b0b0b0 50%, #e3e3e3 75%, #d1d1d1 100%);
        inset: var(--inset);
        border-radius: calc(12px - var(--inset)); 
        z-index: -2;
    }
}
@keyframes border {
    to {
        transform: rotateZ(-360deg);
    }
}

@media (max-width: 1266px) {
    .last-row {
        grid-column: 1/-1;
    }
}

@media (max-width: 1030px) {
    main {
        margin-bottom: 0;
    }

    #footer-home .nav-footer {
        visibility: hidden;
        pointer-events: none;

        .nav-subir {
            position: sticky;
            bottom: 0;
            visibility: visible;
            pointer-events: visible;
        }
    }
    .nav-footer .nav-links {
        display: none;
    }
}

@media (max-width: 932px) {
    .nav .nav-menu {
        display: block;
        position: fixed;
        right: 2.5rem;
        background: #00000049;
        border-radius: 50%;

        img {
            border: .13rem solid var(--color-text);
            border-radius: 50%;
        }
    }

    .nav-links-menu {
        display: flex;
        position: fixed;
        background-color: #000;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        padding: 3rem;
        z-index: 9999;
        visibility: hidden;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none; /* para que no reconozca el mouse */
        transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0s linear 0.4s; /* le metemos un delay a visibility para que se vea la transición de las otras propiedades */
    }

    .nav-links-show {
        visibility: visible;
        transform: translateY(0%);
        opacity: 1;
        pointer-events: unset; /* valor original */
        transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0s linear 0s;
    }

    .nav-links-no-transition {
        transition: none !important; /* evita la transición en el cambio de tamaño de la pantalla */
    }

    .nav-close{
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        margin: 2rem;
        width: 30px;
        height: 30px;
        cursor: pointer;
        transition: filter .3s ease-in-out;

        &:hover {
            filter: invert(58%) sepia(68%) saturate(466%) hue-rotate(324deg) brightness(93%) contrast(91%);
        }
    }
}

@media (max-width: 600px) {
    body {
        grid-template-areas: 
        "header header"
        "main main"
        "footer footer";
    }
    #sidebar {
        transition: all .3s ease-in-out;
    }
    .conditionals-container,
    .passive-voice-container {
    width: clamp(300px, 80vw, 550px);
    height: clamp(415px, 45vh, 500px);
    min-height: fit-content;
    padding: 20px;
    };
}