/* Fonts */

/* Titles */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham-Black.otf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Titles 2 */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham-Book.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Body */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/source-sans-pro.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Body Bold */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/source-sans-pro.black.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Body Italic */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/source-sans-pro.italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

/* Body Semibold */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/source-sans-pro.semibold-italic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

/* Loader */

.loader-wrapper {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #122e48;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

.loader-wrapper.show {
    opacity: 1;
    visibility: visible;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body */

body {
    font-family: 'Source Sans Pro', sans-serif;
    margin: 0;
}

button, input, textarea {
    font-family: 'Source Sans Pro', sans-serif;
}

/* Navbar */

.navbar {
    background-color: #122e48; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    height: 75px;
    position: sticky;
    width: -webkit-fill-available;
    top: 0px;
    z-index: 3;
}

#navbar-logo {
    margin-left: 2rem;
    height: 65px;
}

.navbar-left-a {
    text-decoration: none;
}

.navbar-right {
    display: flex; 
    gap: 1rem; 
    align-items: center;
}

.nav-button {
    font-family: 'Source Sans Pro', sans-serif;
    background: transparent;
    color: white; 
    padding: 0.5rem 1rem; 
    border-radius: 4px;
    text-decoration: none;
    position: relative;
}

.nav-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: white;
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}

.nav-button:hover::after {
    width: 100%;
}

.login-button {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: bold;
    background-color: white; 
    color: #122e48; 
    border: 2px solid transparent; 
    padding: 0.5rem 1rem; 
    border-radius: 4px; 
    margin-left: 1rem;
    margin-right: 1rem;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.login-button:hover {
    background-color: #122e48;
    color: white;
    border: 2px solid white;
}

/* Footer */

footer {
    background-color: #122e48;
    color: white;
    padding: 0.8rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo-text {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-text {
    flex-grow: 1;
    text-align: center;
    color: #00b2e3;
    margin-right: 127px;
}

footer p {
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
}

#buap-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: bold;
    color: #00b2e3;
}

.footer-info-button {
    height: auto;
    width: auto;
    border: none;
    border-radius: 100%;
    cursor: pointer;
    background: none;
    color: #00b2e3;
}

/* Password toggle */
.password-field-wrapper {
    position: relative;
    width: 100%;
    display: block;
    margin: -28.5px 5px 0 0;
    padding: 0;
}

.password-field-wrapper input {
    width: 100%;
    padding-right: 40px; /* Espacio para el botón */
}

.password-field-wrapper .password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 46, 72, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(18, 46, 72, 0.2);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(18, 46, 72, 0.2);
}

.password-toggle svg {
    width: 16px;
    height: 16px;
    color: #122e48;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.password-toggle:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 2rem;
    z-index: 10;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar-right {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        max-width: 300px;
        background: #122e48;
        flex-direction: column;
        padding: 100px 2rem 2rem 2rem;
        transition: 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .navbar-right.active {
        z-index: 2;
        right: 0;
    }

    .nav-button {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .login-button {
        width: calc(100% - 2rem);
        text-align: center;
        margin: 1rem 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .footer-logo-text {
        flex-direction: column;
    }

    .footer-text {
        margin-right: 0;
    }

    .menu-toggle.active span:first-child {
        transform: rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:last-child {
        transform: rotate(-45deg);
    }

    .password-field-wrapper {
        margin: -25.17188px 5px 0 0
    }
}

@media screen and (max-width: 480px) {
    #navbar-logo {
        height: 50px;
        margin-left: 1rem;
    }

    .footer-logo {
        height: 45px;
    }

    .footer-text {
        font-size: 0.9rem;
    }
}

/* Custom Scrollbar */
@media screen and (any-pointer: fine) {
    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    ::-webkit-scrollbar-track {
        background: rgba(18, 46, 72, 0.1);
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #122e48, #09b5e2, #122e48);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #09b5e2;
    }

    ::-webkit-scrollbar-corner {
        background: transparent;
    }
}
