*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --brand: #194b7d;
    --panel: #eff6fd;
    --text: #212529;
}

html {
    font-family: Calibri, Carlito, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: #fff;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.macon_main {
    background-color: var(--panel);
    width: 80vw;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

header img {
    width: 400px;
    max-width: 90%;
    height: auto;
    padding: 4px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px;
}

.navigation-item {
    margin: 5px;
    padding: 4px;
    text-align: center;
    border: 3px solid var(--panel);
    border-radius: 5px;
    color: var(--brand);
    text-decoration: none;
}

.navigation-item:hover {
    border-color: lightblue;
    color: gray;
    box-shadow: 5px 5px 10px;
}

main {
    padding: 1rem;
    flex: 1;
}

h1, h2, h3 {
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 .5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.6rem; margin-top: 1rem; }
h3 { font-size: 1.75rem; }

p { margin: 0 0 1rem; }

a { color: var(--brand); }

hr {
    margin: 0 auto;
    width: 50%;
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}

footer {
    text-align: center;
    padding: 1em 0;
}

/* Contact form */

.form-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

button {
    margin: 5px;
    padding: 10px 20px;
    color: #fff;
    background-color: var(--brand);
    font: inherit;
    font-size: large;
    font-weight: bold;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    color: var(--brand);
    background-color: #fff;
}

button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

progress[hidden],
.progressvalue[hidden] {
    display: none;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 1rem 0 0;
    border-bottom: 1px solid #c7d6e6;
}

.tabs button {
    margin: 0;
    padding: .5rem 1rem;
    font-size: 1rem;
    font-weight: normal;
    color: var(--brand);
    background: transparent;
    border-radius: 6px 6px 0 0;
}

.tabs button[aria-selected="true"] {
    background: #fff;
    border-color: #c7d6e6 #c7d6e6 #fff;
    margin-bottom: -1px;
}

.grid {
    display: grid;
    grid-template-columns: minmax(9rem, 1fr) 5fr;
    gap: .5rem 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.grid.two {
    grid-template-columns: minmax(9rem, 1fr) 2fr minmax(9rem, 1fr) 2fr;
}

.grid label {
    text-align: left;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: .375rem .75rem;
    font: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25);
}

input[type="checkbox"] {
    justify-self: start;
    width: 1.1rem;
    height: 1.1rem;
}

.stack label {
    display: block;
    margin-top: .75rem;
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

.files label {
    display: block;
    margin: 1rem 0;
}

.inputfile {
    position: absolute;
    width: .1px;
    height: .1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.inputfile + label {
    margin-left: 2em;
    font-weight: 300;
    font-style: italic;
    color: var(--brand);
    cursor: pointer;
}

.inputfile:focus-visible + label {
    outline: 2px solid var(--brand);
}

.inputfile + label .chosen {
    font-style: normal;
    font-weight: bold;
}

.hint {
    font-size: .9rem;
    color: #555;
}

.hp {
    position: absolute;
    left: -10000px;
}

.contactResult {
    font-size: large;
    font-weight: bold;
    margin: 2rem 0 2rem 20%;
}

.contactResult.error {
    color: #a00;
}

/* Cookie banner */

.cookie-dialog {
    width: min(500px, calc(100vw - 32px));
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: .3rem;
    color: var(--text);
}

.cookie-dialog::backdrop {
    background: rgba(0, 0, 0, .5);
}

.cookie-dialog h2 {
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    font-size: 1.25rem;
    border-bottom: 1px solid #dee2e6;
}

.cookie-dialog p {
    font-size: 15px;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .25rem;
}

.cookie-actions button {
    padding: .25rem .5rem;
    font-size: .875rem;
    font-weight: normal;
    border-radius: .2rem;
}

.cookie-actions .secondary {
    background-color: #6c757d;
}

.cookie-actions .primary {
    background-color: #007bff;
}

.cookie-actions button:hover {
    color: #fff;
    filter: brightness(.9);
}

@media (max-width: 760px) {
    .macon_main { width: 100%; }
    main { padding: 1rem 16px; }
    h1 { font-size: 1.9rem; }
    h3 { font-size: 1.4rem; }
    .grid,
    .grid.two { grid-template-columns: 1fr; gap: .25rem; }
    .grid label { margin-top: .5rem; }
    .contactResult { margin-left: 0; }
}
