/* RESET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* VARIABILI */
:root {
    --bgcolor: #f5f5f0;
    --maintxtcolor: #1a1a1a;
    --widgetcolor: #002b24;
    --widgettxtcolor: #a5d6a7;
    --visitedlinkcolor1: #ad522b;
    --visitedlinkcolor2: #dd6a38;
    --error: #db0000;
}

html, body {
    font-size: 100%;
    font-family: "Atkinson Hyperlegible", Roboto, sans-serif;
    line-height: 1.5em;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bgcolor);
    color: var(--maintxtcolor);
    /*max-width: 1200px;*/
    margin: auto;
    overflow-x: hidden;
}

header, main {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 1em;
}

a:link {
    color: var(--maintxtcolor);
}

a:visited {
    color: var(--visitedlinkcolor1);
}

header {
    padding: 0em 1em;
    margin: 1em auto;
}

#menu {
    background-color: var(--widgetcolor);
    color: var(--bgcolor);
    border-radius: 30px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.2em;
    font-weight: bold;
    justify-content: space-between;
}

#menu .logo, a.logo-menu {
    width: 60px;
    height: 60px;
    min-width: 60px; /* Dimensione fissa perché non vogliamo che rimpicciolisca */
    background-image: url("../img/logo_chiaro.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center left;
    text-indent: -9999em;
    overflow: hidden;
}

#menu ul {
    display: flex;
    overflow-x: hidden;
    gap: 3em;
    list-style: none;
}

#menu a:link {
    color: var(--bgcolor);
}

#menu a:visited {
    color: var(--visitedlinkcolor2);
}

button, a.stile-bottone-1, a.stile-bottone-2, a.stile-bottone-3, .stile-bottone-4 {
    display: inline-block;
    background-color: var(--widgetcolor);
    color: var(--bgcolor);
    font-size: 1em;
    font-weight: bold;
    border: 3px solid var(--widgetcolor);
    border-radius: 30px;
    padding: 0.6rem 1.2rem;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}

button {
    cursor: pointer;
}

button:focus-visible, a.stile-bottone-2:focus-visible {
    outline-offset: 3px;
    outline: 2px solid var(--visitedlinkcolor1);
}

#hamburger {
    display: none;
}

#menu a.stile-bottone-1 {
    background-color: var(--bgcolor);
    color: var(--widgetcolor);
    border: 3px solid var(--bgcolor);
    margin: 0;
}

#menu a.stile-bottone-1:hover {
    background-color: var(--widgetcolor);
    color: var(--bgcolor);
}

#menu a.stile-bottone-1:visited {
    color: var(--visitedlinkcolor1);
}

#menu a.stile-bottone-1:visited:hover {
    color: var(--visitedlinkcolor2);
    background-color: var(--widgetcolor);    
}

.stile-bottone-2:visited {
    color: var(--visitedlinkcolor2);
}

button:hover, .stile-bottone-2:hover {
    background-color: var(--bgcolor);
    color: var(--widgetcolor);
}

.stile-bottone-2:visited:hover {
    color: var(--visitedlinkcolor1);
    background-color: var(--bgcolor);
}

.elimina {
    color: var(--error);
    background-color:var(--bgcolor);
}

#menu .stile-bottone-3 {
    margin: 0;
    border: 3px solid var(--bgcolor);
}

a.stile-bottone-3, .stile-bottone-4 {
    color: var(--widgetcolor);
    background-color: var(--bgcolor);
    border: 6px solid var(--bgcolor);
}

a.stile-bottone-3:hover {
    border: 6px solid var(--visitedlinkcolor2);
}

#bottone-indietro {
    float: left;
}

#breadcrumb {
    display: inline-block;
    white-space: nowrap;
    color: var(--maintxtcolor);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 2em;
    margin-left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    border: 3px solid var(--widgetcolor);
}

#breadcrumb a:link {
    color: var(--maintxtcolor);
}

#breadcrumb a:visited {
    color: var(--visitedlinkcolor1);
}

main {
    padding: 0.8em;
    text-align: center;
}

main h1 {
    font-size: 2.5em;
    padding-bottom: 0.8em;
}

.desc {
    font-size: 1.2em;
}

.desc.uno {
    font-size: 1.3em;
    font-weight: bold;
}

.secondo-contenuto {
    background-color: var(--widgetcolor);
    color: var(--bgcolor);
    padding: 1em 0 2em 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.secondo-contenuto > *, .terzo-contenuto > *, .form-appuntamenti > *, .dettagli-animale > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2em;
    padding-right: 2em;
}

.secondo-contenuto img {
    width: 30%;
    height: auto;
    min-width: 300px;
}

.secondo-contenuto ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    padding: 0 2em;
    margin: 0 auto;
    justify-content: center;
}

.secondo-contenuto ol li {
    display: flex;
    flex-direction: column;
    background-color: var(--widgettxtcolor);
    color: var(--maintxtcolor);
    padding: 1em;
    flex: 0 0 300px;
    border-radius: 30px;
    counter-increment: item;
}

.secondo-contenuto ol li::before { /* Marker non permette modifiche di posizione, solo ::before */
    content: counter(item);
    font-size: 2em;
    font-weight: bold;
    color: var(--widgetcolor);
    margin-bottom: 0.5em;
}

.aiuto {
    font-size: 1.3em;
    font-weight: bold;
    position: absolute;
    text-indent: -999em;
}

.aiuto:focus {
    position: static;
    text-indent: 0em;
}

.terzo-contenuto dl, .terzo-contenuto, .form-appuntamenti {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 2em 0;
}

.terzo-contenuto dl div, .terzo-contenuto div, .terzo-contenuto article, .form-appuntamenti div {
    flex: 1 1 300px;
    padding: 1em;
}

.terzo-contenuto dt, .terzo-contenuto li {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.terzo-contenuto, .form-appuntamenti {
    max-width: 80%;
    margin: auto;
}

.terzo-contenuto img, .form-appuntamenti img {
    max-width: 100%;
    height: auto;
    border-radius: 30px;
}

.form-appuntamenti img {
    width: 100%;
}

.terzo-contenuto-sottocontenuto p {
    font-size: 1.1em;
    text-align: left;
    margin-bottom: 0.5em;
}

.separatore::after {
    content: "";
    display: block;
    width: 100%;
    border: 3px solid var(--widgetcolor);
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 3em 0;
}

.piu-info {
    max-width: 50%;
    margin: auto;
}

.piu-info p:first-child {
    font-weight: bold;
    font-size: 1.2em;
    margin: 1em auto;
}

.piu-info span {
    display: block;
}

.elenco-animali {
    margin-top: 1.5em;
}

.galleria {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    justify-content: space-evenly;
    min-height: 400px;
    align-items: center;
}

.elemento-galleria {
    display: flex;
    flex-direction: column;
    margin: 1em;
}

.elemento-galleria img {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
}

.elemento-galleria > div {
    position: relative;
    width: 100%;
    padding: 0.7rem 1.8rem;
    color: var(--bgcolor);
    background-color: var(--widgetcolor);
    border-radius: 0 0 12px 12px;
}

.label-elemento {
    text-align: center;
    font-size: 1.5em;
    margin: 0;
}

.label-elemento a:link {
    color: var(--bgcolor);
}

.label-elemento a:visited {
    color: var(--visitedlinkcolor2);
}

.elemento-galleria .genere {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5em;
    height: 1.5em;
    border-radius: 0px;
}

.no-result {
    margin: auto;
    width: 50%;
    text-align: center;
}

.dettagli-animale {
    max-width: 1200px;
    margin: auto;
    display: flex;
    gap: 30px;
    padding: 20px;
    align-items: center;
}

.dettagli-animale > div:first-child {
    flex-shrink: 0;
}

.dettagli-animale img {
    max-width: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.dettagli-animale > div:last-child {
    flex: 1;
    align-self: baseline;
}

.dettagli-animale dl {
    margin: 0;
    text-align: left;
}

.dettagli-animale dt {
    float: left;
    clear: left;
    font-weight: bold;
    margin-right: 1em;
}

.dettagli-animale dd {
    margin-bottom: 0.5em;
}

.wave {
    position: relative;
    margin-top: 10%;
    margin-bottom: 10%;
}

footer {
    color: var(--bgcolor);
    background-color: var(--widgetcolor);
    padding: 1.5em;
    text-align: center;
    position: relative;
    margin-top: 8%;
    clear: both;
}

footer > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

footer .stile-bottone-3 {
    margin-bottom: 3em;
}

footer::before, .wave::before, .wave::after {
    content: "";
    position: absolute;
    top: 0.12em;
    left: 0;
    width: 100%;
    padding-top: 7%;
    background-image: url("../img/wave.svg");
    background-size: cover;
    background-position: bottom;
    transform: translateY(-100%);
}

.wave::after {
    top: auto;
    left: 50%;
    transform: translate(-50%, 100%) rotate(180deg);
    bottom: 0.12em;
}

.torna-su::before {
    content: "";
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    background-image: url("../img/freccia-su.webp");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 0.5em;
}

footer .crediti {
    color: var(--bgcolor);
}

.crediti:visited {
    color: var(--visitedlinkcolor2);
}

form {
    border: 3px solid var(--widgetcolor);
    border-radius: 30px;
    padding-top: 1em;
    padding-bottom: 1em;
    margin: auto;
    margin-top: 1em;
    max-width: 600px;
}

form label {
    font-size: 1.1em;
    display: block;
    text-align: left;
    width: 50%;
    margin: auto;
    margin-top: 1.3em;
    font-weight: bold;
}

input, textarea {
    display: block;
    margin: auto;
    width: 50%;
    border: 2px solid var(--widgetcolor);
    border-radius: 10px;
    padding: 0.8em 1em;
}

textarea {
    resize: vertical;
    min-height: 5em;
}

.info-form, .form-errors ul li {
    width: 50%;
    margin: auto; 
    text-align: left;
    font-size: 0.9em;
    line-height: 1.4em;
    list-style-position: inside;
}

.form-errors ul li {
    width: 90%;
    text-align: center;
    font-size: 1em;
}

form .req, .form-errors {
    color: var(--error);
}

#logout-form {
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
}

#logout-form button {
    background-color: var(--visitedlinkcolor1);
    border: 3px solid var(--visitedlinkcolor1);
    color: var(--bgcolor);
}

#logout-form button:hover {
    background-color: var(--bgcolor);
    color: var(--visitedlinkcolor1);
}

#filtri {
    float: left;
    width: 20%;
    margin-top: 2em;
    box-sizing: border-box;
    margin-bottom: 6em;
    min-width: 250px;
}

#filtri h2 {
    margin: 0 0 1em;
    font-size: 1.3em;
}

#filtri details {
    border-bottom: 1px solid #ddd;
    padding: 0.8em;
}

#filtri legend {
    position: absolute;
    width: 1em;
    height: 1em;
    padding: 0;
    margin: -1em;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

#filtri summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 1em;
}

#filtri fieldset {
    border: none;
    padding: 0;
}

#filtri input[type="radio"] {
    flex-shrink: 0;
    margin: 0;
}

#filtri label {
    display: flex;
    align-items: center;
    gap: 0.6em;
    cursor: pointer;
    font-weight: normal;
    text-align: left;
    width: 100%;
    margin: 0 0 0.8em 0;
    padding: 0.3em;
    border-radius: 5px;
    transition: background-color 0.2s;
    justify-content: center;
}

#filtri label:hover {
    background-color: rgba(0, 43, 36, 0.05);
}

#filtri input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
    border: 2px solid var(--widgetcolor);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s;
}

#filtri input[type="radio"]:checked {
    background-color: var(--widgetcolor);
    border-color: var(--widgetcolor);
}

#filtri input[type="radio"]:checked::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5em;
    height: 0.5em;
    background-color: var(--bgcolor);
    border-radius: 50%;
}

#filtri input[type="radio"]:hover {
    border-color: var(--visitedlinkcolor1);
}

#filtri input[type="radio"]:focus-visible {
    outline: 2px solid var(--visitedlinkcolor1);
    outline-offset: 2px;
}

#toggle-filtri, #chiudi-filtri, #overlay-filtri {
    display: none;
}

.piu-info {
    clear: both;
}

.prenotazioni {
    width: 60%;
    min-width: 450px;
    margin: auto;
    text-align: left;
}

.prenotazioni ul {
    list-style: none;
    padding: 0;
}

.prenotazioni li {
    border: 2px solid #ddd;
    padding: 1.2em;
    padding-left: 2em;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prenotazioni li div:first-child {
    flex: 0 0 200px;
}

.prenotazioni p:first-child {
    font-size: 1.4em;
    font-weight: bold;
}

.prenotazioni li p {
    margin: 0.3rem 0;
}

.profilo-contenitore {
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
}

.account-buttons {
    margin: 0;
    text-align: end;
}

.profilo {
    text-align: center;
    margin-right: 10em;
}

.profilo img {
    width: 120px;
    height: 120px;
    padding: 0.5rem;
    margin-right: 2em;
    display: inline-block;
    vertical-align: middle;
}

.profilo div {
    display: inline-block;
    vertical-align: middle;
    text-align: left;
}

.profilo p {
    font-size: 1.2em;
    margin: 0;
    padding-bottom: 1em;
}

.profilo p:first-child {
    font-weight: bold;
    font-size: 1.4em;
}

.success {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--error);
    margin-bottom: 1.5em;
}

.appuntamenti {
    margin-top: 3em;
}

.importante {
    font-weight: bold;
}

dialog {
    border: none;
    border-radius: 30px;
    max-width: 1200px;
    width: 90%;
    padding: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

dialog[open] {
    display: flex;
}

.dialog-content {
    padding: 2em;
    width: 100%;
}

#form-elimina-profilo {
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
}

.note {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}