body {
    margin: 0;
    min-width: 700px;
    background: #021051;
    color: #fff3d4;
    font: 16px "Times New Roman", serif;
}

.masthead {
    display: flex;
    align-items: center;
    width: 550px;
    height: 100px;
    margin-left: 35px;
    padding-top: 12px;
    padding-left: 58px;
    box-sizing: border-box;
    background: url("imagenes/cabecera.jpg") no-repeat;
}

.masthead a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layout {
    display: grid;
    grid-template-columns: 159px 521px;
    align-items: start;
    gap: 12px;
    padding: 8px 0 0 7px;
}

.menu {
    display: grid;
    gap: 5px;
}

.menu-item {
    position: relative;
    width: 152px;
    height: 63px;
}

.menu-over,
.menu-down {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.menu-item:hover .menu-over,
.menu-item:focus-visible .menu-over,
.menu-item:active .menu-down,
.menu-item[aria-current="page"] .menu-down {
    opacity: 1;
}

h1 {
    margin: 0 0 4px 24px;
    color: #fee7a4;
    font-size: 25px;
}

.panel {
    box-sizing: border-box;
    width: 490px;
    height: 260px;
    padding: 35px 36px 29px;
    text-align: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.panel-visita { background-image: url("imagenes/cajavisita.jpg"); }
.panel-fiestas { background-image: url("imagenes/cajafiestas.jpg"); }
.panel-novedades { background-image: url("imagenes/cajanovedades.jpg"); }
.panel-contacte { background-image: url("imagenes/cajacontacte.jpg"); }

.panel p {
    margin: 8px 0 0;
    font-size: 14px;
}

.visit-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}

figure {
    margin: 0;
}

.photo img {
    display: block;
    border: 1px solid #e6ce88;
    object-fit: cover;
    margin: auto;
}

.visit-photos img {
    width: 80px;
    height: 59px;
}

.visit-photos figcaption {
    font-size: 14px;
}

.party-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 160px;
}

.party-light {
    width: 113px;
    height: auto;
}

.party-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.party-photos img {
    width: 59px;
    height: 51px;
}

.news {
    display: grid;
    justify-items: center;
    gap: 5px;
}

.news div {
    display: flex;
    align-items: center;
    gap: 24px;
}

.news p {
    margin-top: 0;
}

.contact-form {
    display: grid;
    align-items: center;
    grid-template-columns: 100px 220px;
    justify-content: center;
    gap: 8px;
    text-align: right;
}

.contact-form :is(input, textarea) {
    border: 1px solid #c3837c;
    background: #973e41;
    color: #fff;
    font: inherit;
}

.contact-form button {
    grid-column: 2;
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.contact-form button img {
    display: block;
}

.photo-viewer {
    border: 2px solid #648f76;
    background: #7e2225;
    color: inherit;
    text-align: center;
}

.photo-viewer::backdrop {
    background: rgb(2 10 46 / 85%);
}

.photo-viewer form {
    text-align: right;
    margin-bottom: 8px;
}

.photo-viewer img {
    display: block;
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
}

footer {
    margin: 12px 0 20px 178px;
    font-size: 13px;
    color: #cbd6ff;
}
