* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #222;
    line-height: 1.6;
}


header {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header img {
    width: 100px;
    transition: transform 0.3s ease;
}

header img:hover {
    transform: scale(1.05);
}

header nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

header a {
    text-decoration: none;
    color: #222;
    font-weight: bold;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    font-size: 0.95rem;
}

header a:hover,
header a.active {
    color: #0077cc;
    border-bottom: 2px solid #0077cc;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #222;
}

button {
    background-color: #0077cc;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #005fa3;
    transform: scale(1.05);
}


main {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.autores {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.autor {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.autor:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.autor img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.autor img:hover {
    transform: scale(1.03);
}

.autor h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.autor p {
    font-size: 15px;
    line-height: 1.5;
    color: #444;
}

footer {
    background-color: #0077cc;
    color: #fff;
    padding: 40px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-section {
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e0f2ff;
}

footer .copyright {
    font-size: 14px;
    color: #f0f0f0;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background-color: #0077cc;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

#scrollTopBtn.show {
    display: flex;
}

#scrollTopBtn:hover {
    background-color: #005fa3;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.autor {
    position: relative;
}

.favorito-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
    z-index: 10;
}

.favorito-btn.favoritado {
    color: #ff4757;
}

.favorito-btn:hover {
    color: #ff6b81;
}

.favorito-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.favoritos-info {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.favoritos-info.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dark-mode .favorito-btn {
    color: #666;
}

.dark-mode .favorito-btn.favoritado {
    color: #ff4757;
}

.high-contrast .favorito-btn {
    color: #000;
    border: 2px solid #000;
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.high-contrast .favorito-btn.favoritado {
    color: #fff;
    background: #000;
    border-color: #000;
}

body.dark-mode {
    background-color: #121212;
    color: #f4f4f4;
}

body.dark-mode header {
    background-color: #1e1e1e;
}

body.dark-mode header a {
    color: #f4f4f4;
}

body.dark-mode header a:hover,
body.dark-mode header a.active {
    color: #80cbc4;
    border-bottom-color: #80cbc4;
}

body.dark-mode .autor {
    background-color: #1e1e1e;
}

body.dark-mode .autor h2 {
    color: #80cbc4;
}

body.dark-mode .autor p {
    color: #f4f4f4;
}

body.dark-mode footer {
    background-color: #1e1e1e;
    color: #f4f4f4;
}

body.dark-mode .footer-section ul li a {
    color: #f4f4f4;
}

body.high-contrast {
    background-color: #000;
    color: #fff;
    font-weight: bold;
}

body.high-contrast header {
    background-color: #000;
}

body.high-contrast header a {
    color: #fff;
}

body.high-contrast header a:hover,
body.high-contrast header a.active {
    color: #ff0;
    border-bottom-color: #ff0;
}

body.high-contrast .autor {
    background-color: #000;
}

body.high-contrast .autor h2 {
    color: #ff0;
}

body.high-contrast .autor p {
    color: #fff;
}

body.high-contrast footer {
    background-color: #000;
    color: #fff;
}

body.high-contrast .footer-section ul li a {
    color: #fff;
}

body.protanopia {
    filter: url(#protanopia);
}

body.deuteranopia {
    filter: url(#deuteranopia);
}

body.tritanopia {
    filter: url(#tritanopia);
}

body.dark-mode .menu-toggle {
    color: #f4f4f4;
}

body.high-contrast .menu-toggle {
    color: #fff;
}

body.dark-mode .menu-toggle:hover,
body.high-contrast .menu-toggle:hover {
    color: #80cbc4;
}

body.dark-mode header nav.open {
    background-color: #1e1e1e;
}

body.dark-mode header nav.open a {
    color: #f4f4f4;
}

body.dark-mode header nav.open a:hover,
body.dark-mode header nav.open a.active {
    color: #80cbc4;
}

body.high-contrast header nav.open {
    background-color: #000;
}

body.high-contrast header nav.open a {
    color: #fff;
}

body.high-contrast header nav.open a:hover,
body.high-contrast header nav.open a.active {
    color: #ff0;
}

body.protanopia header nav.open,
body.deuteranopia header nav.open,
body.tritanopia header nav.open {
    filter: inherit;
}

@media (max-width: 1000px) {
    .autores {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .autores {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
    }

    header nav a {
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    header nav.open {
        display: flex;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    footer .copyright {
        text-align: left;
    }

    #scrollTopBtn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    #scrollTopBtn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
}