body {
    font-family: 'Lato', Arial, sans-serif;
    /* Testo principale */
    line-height: 1.7;
    font-size: 18px;
    color: #333333;
    background-color: #fafafa;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', Georgia, serif;
    /* Titoli eleganti */
    font-weight: 700;
    color: #003366;
    /* Blu elegante, scientifico */
    letter-spacing: 0.5px;
    margin-top: 0;
}

header {
    display: flex;
    align-items: center;
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    gap: 20px;
    /* spazio tra logo e titolo */
    flex-wrap: wrap;
    /* importante per schermi piccoli */
    justify-content: center;
    text-align: center;
}

header a img {
    height: 30px;
    flex-shrink: 0;
    /* evita che il logo si rimpicciolisca troppo */
}

header h1 {
    flex: 1 1 300px;
    /* cresce e si restringe ma ha una base */
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 2rem);
    /* testo responsivo */
}

header a img {
    height: 30px;
    transition: transform 0.3s ease;
}

header a img:hover {
    transform: scale(1.1);
}

header h1 {
    margin: 0;
    text-align: center;
    flex: 1;
}

main {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.details img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.showcase {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.showcase p {
    text-align: justify;
}

.showcase img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.showcase h2 {
    margin-bottom: 10px;
}

.showcase p {
    margin-bottom: 20px;
}

.showcase ul {
    list-style: none;
    padding: 0;
}

.showcase ul li {
    margin-bottom: 10px;
}

.showcase ul li a {
    color: #4CAF50;
    text-decoration: none;
}

.showcase ul li a:hover {
    text-decoration: underline;
}

.btn-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    padding: 0 20px;
    /* un po’ di padding laterale su schermi piccoli */
}

.btn {
    display: inline-block;
    padding: clamp(12px, 2vw, 18px) clamp(24px, 5vw, 36px);
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 4px 8px rgba(0, 128, 0, 0.3);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.btn:hover,
.btn:focus {
    background-color: #45a049;
    box-shadow: 0 6px 12px rgba(0, 128, 0, 0.5);
    outline: none;
}

footer {
    background-color: #333;
    color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
}

footer .column {
    flex: 1;
    padding: 10px;
    min-width: 200px;
}

footer .column h4 {
    border-bottom: 2px solid #4CAF50;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
    }
    footer .column {
        margin-bottom: 20px;
    }
}

.responsive-img {
    width: 80%;
    height: auto;
    display: block;
    max-width: 80%;
    margin: 0 auto;
}

.mappa-fissa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1000;
    /* sopra agli altri elementi */
}

.mappa-fissa-responsive {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
    z-index: 1000;
}

.author-bar {
    background-color: #f1f1f1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
}

.author-bar a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.author-bar a:hover {
    text-decoration: underline;
}


/*vetrina.html style*/

.gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    text-align: center;
}


/*
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

*/

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    /* per contenere bene la griglia, opzionale */
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}


/*
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}*/


/*.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}*/

.card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #f0f0f0;
}

.card h3 {
    padding: 15px;
    font-size: 1.2rem;
    background-color: #f7f7f7;
}

.card:hover {
    transform: scale(1.03);
}

.card:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.card:hover,
.card:focus {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    outline: none;
}


/* image expand on click*/

.lightbox {
    display: none;
    /* nascosto di default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px #fff;
    border-radius: 8px;
    transition: transform 0.3s;
}

.lightbox img:hover {
    transform: scale(1.02);
}


/* --- Layout immagine a sinistra / testo a destra --- */

.details {
    display: flex;
    /* Layout orizzontale */
    align-items: flex-start;
    /* Allinea in alto */
    gap: 20px;
    /* Spazio tra immagine e testo */
    flex-wrap: wrap;
    /* Mobile friendly */
}

.details-title {
    text-align: center;
    margin-bottom: 20px;
    color: #003366;
    /* stesso blu dei titoli */
    font-family: 'Playfair Display', Georgia, serif;
}

.details-content {
    display: flex;
    /* affianca immagine e testo */
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    /* mobile friendly */
}

.details-content img {
    max-width: 300px;
    flex-shrink: 0;
    border-radius: 8px;
    height: auto;
}

.details-text {
    flex: 1;
    min-width: 250px;
}

.details p {
    color: #3a4a5a;
    /* testo descrittivo leggermente bluastro */
}

a {
    color: #4CAF50;
}

a:hover {
    color: #2d7a2e;
}


/*  nav style   */

.bottom-nav {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1em;
}

.bottom-nav a {
    text-decoration: none;
    color: #2d7a2e;
    margin: 0 10px;
}

.bottom-nav a:hover {
    text-decoration: underline;
}

.bottom-nav .disabled {
    color: #aaa;
    cursor: not-allowed;
    text-decoration: none;
    padding: 6px 12px;
}