@import url(colores.css);
@import url(tipografias.css);
@import url(../modules/apunte.module.css);

@import url(../modules/footer.module.css);

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

/* ===== Main ===== */
body {
    background-color: var(--bg-body);
    scroll-behavior: smooth;
}

*::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}


main {
    padding: 1em 3em;
}

/* ===== Header ===== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-header);
    padding: .6em 1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
}

/* Logo */
header .contenedor_logo_secundario {
    width: 110px;
    height: auto;
    overflow: hidden;
}

header .contenedor_logo_secundario img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Perfil */
header .perfil {
    width: 110px;
    height: 40px;
    display: flex;
    justify-content: end;
}

header .perfil img {
    overflow: hidden;
    border-radius: 50%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

/* Barra de navegación */
header .barra_navegacion {
    padding: 12px 24px;
    display: flex;
    gap: 3em;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

header .barra_navegacion a {
    color: var(--txt-negro);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
}

header .barra_navegacion a:hover {
    color: var(--txt-celeste);
}

/* ===== Navegación móvil ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #ccc;
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom);
    /* Para dispositivos con notch */

}

.mobile-nav a {
    font-size: 20px;
    color: #333;
}

@media (max-width: 768px) {
    header .barra_navegacion {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    main {
        padding: 1em 1em !important;
    }

    .buscador_subir_apunte {
        padding: 10px 0px !important;
    }

    /* Ajustar posición de toasts en móvil para no tapar la navegación */
    .swal2-toast.swal2-top-right {
        top: 20px !important;
        right: 20px !important;
    }

    .swal2-toast.swal2-bottom-right {
        bottom: 80px !important;
        /* Espacio para la navegación móvil */
        right: 20px !important;
    }
}

/* ===== Desplegable de perfil ===== */
.perfil {
    position: relative;
    display: inline-block;
}

#perfil-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

#menu-desplegable {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 150px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

#menu-desplegable li a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: black;
}

#menu-desplegable li a:hover {
    background: #f0f0f0;
}

.oculto {
    display: none;
}

/* ===== Buscador ===== */
.buscador_subir_apunte {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    padding: 10px 20px;
}

.buscador_subir_apunte .contenedor_buscador {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buscador_subir_apunte .contenedor_buscador h2 {
    font-weight: lighter;
    font-size: 20px;
}

.buscador_subir_apunte .contenedor_buscador .input_buscador {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.buscador_subir_apunte .contenedor_buscador .input_buscador:focus {
    outline: none;
    border-color: var(--bg-celeste);
}

/* ===== Botón Subir Apunte ===== */
.boton_subir_apunte button {
    background-color: var(--bg-boton-verde);
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.boton_subir_apunte button:hover {
    background-color: #92b723;
}

.boton_subir_apunte button:active {
    background-color: #7e9c1d;
}

/* ===== Apuntes ===== */
.contenedor_apuntes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1em;
    margin: 1em 0;
    place-items: center;
}

.contenedor_apuntes>a {
    text-decoration: none;
    height: 100%;
}