:root {
    --bone: #f4f1e8;
    --ink: #263746;
    --blue-ink: #19364b;
    --blue-deep: #193d5b;
    --blue-hover: #2c5878;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bone);
    color: var(--ink);
    font-family: Arial, sans-serif;
}

header {
    position: fixed;
    z-index: 10;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    background: var(--blue-deep);
    color: #fffdf8;
    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;
    flex-wrap: wrap;
    gap: 8px;
}

nav a {
    display: block;
    padding: 5px 8px;
    border-radius: 4px;
    color: #fffdf8;
    font-weight: bold;
    text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
    background: var(--blue-hover);
}

.inicio-practica {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 4px;
    background: var(--metal-button);
    color: var(--blue-ink);
    font-weight: bold;
    text-decoration: none;
}

.inicio-practica:hover,
.inicio-practica:focus-visible {
    background: var(--metal-hover);
}

.desplegable {
    position: relative;
    list-style: none;
}

.submenu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 11;
    display: none;
    width: max-content;
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 6px 0;
    overflow-x: auto;
    list-style: none;
    background: var(--blue-deep);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.submenu a {
    white-space: nowrap;
}

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

main {
    flex: 1;
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 120px 20px 110px;
}

main img {
    max-width: 100%;
    height: auto;
}

footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 15px 20px;
    background: var(--blue-deep);
    color: #fffdf8;
    text-align: center;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

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

    nav {
        justify-content: center;
    }

    main {
        padding: 24px 12px 32px;
    }

    footer {
        position: static;
        margin-top: auto;
    }
}

@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;
    }

    footer {
        padding: 12px 8px;
    }

    footer p {
        font-size: 0.78rem;
    }
}
