:root {
    --bone: #f4f1e8;
    --ink: #263746;
    --blue-ink: #19364b;
    --metal-gradient: linear-gradient(115deg, #8caabc 0%, #e1ebf0 46%, #9bb6c5 100%);
    --metal-button: linear-gradient(115deg, #9bb8c8 0%, #dce8ed 52%, #86a8ba 100%);
    --metal-hover: linear-gradient(115deg, #88a8bb 0%, #cedfe7 52%, #789db2 100%);
    --blue-hover: rgba(25, 54, 75, 0.12);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bone);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
header {
    background: var(--metal-gradient);
    color: var(--blue-ink);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-brand h2 {
    margin: 0;
    font-size: 1.2rem;
}
nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
nav a {
    color: var(--blue-ink);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
nav a:hover {
    background-color: var(--blue-hover);
}
main {
    flex: 1;
    padding: 120px 20px 80px 20px; /* added top and bottom padding for fixed header and footer */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
footer {
    background: var(--metal-gradient);
    color: var(--blue-ink);
    text-align: center;
    padding: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}
ul, p {
    line-height: 1.6;
}
a.button-link {
    display: inline-block;
    padding: 10px 15px;
    background: var(--metal-button);
    color: var(--blue-ink);
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}
a.button-link:hover {
    background: var(--metal-hover);
}
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--metal-gradient);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    width: max-content;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    z-index: 999;
}
.submenu a {
    display: block;
    color: var(--blue-ink);
    white-space: nowrap;
}
.desplegable {
    position: relative;
    list-style: none;
}
.submenu a:hover {
    background: var(--blue-hover);
}

.desplegable:hover .submenu,
.desplegable:focus-within .submenu {
    display: flex;
}

@media (max-width: 900px) {
    header {
        position: sticky;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .header-brand {
        justify-content: center;
    }

    nav {
        justify-content: center;
        gap: 4px;
    }

    main {
        padding: 20px 12px 80px;
    }
}

@media (max-width: 480px) {
    .header-brand {
        gap: 8px;
    }

    .header-brand h2 {
        font-size: 1rem;
    }

    nav {
        gap: 2px;
    }

    nav a {
        padding: 5px 6px;
        font-size: 0.85rem;
    }
}