
:root {
    --bg: #f5e8d0; /* Carta antica puntinata */
    --section-bg: #fff8ef; /* Sezioni leggermente piÃ¹ chiare */
    --card-bg: #fff9f0; /* Card chiara */
    --text: #4b3524; /* Testo scuro */
    --accent: #8b5a33; /* Accenti e link */
    --shadow: rgba(75,53,36,0.12);
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px);
    background-size: 15px 15px;
    background-position: 0 0, 7.5px 7.5px;
    color: var(--text);
    line-height: 1.6;
}

h2 {
  scroll-margin-top: 80px; /* altezza dell'header sticky */
}


a {
    color: var(--accent);
    text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; }

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-120%);
    background: var(--accent);
    color: #fff;
    padding: 10px;
    z-index: 2000;
    transition: transform 0.25s ease;
}
.skip-link:focus { transform: translateY(0); }

/* HEADER tipo 3 */
header {
    height: 45vh;
    background: url('../imgs/header.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
	min-height:270px;
}
header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(245,232,208,0.55);
}
header .content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    background: rgba(245,232,208,0.7); /* Sfondo semi-trasparente dietro testo */
    border-radius: 10px;
}
header h1 { margin: 0; font-size: 2.6rem; color: var(--text); }
header p { font-size: 1.2rem; margin-top: .5rem; color: var(--text); font-weight: bold;}

header .passions {
    font-size: 1rem;
    color: #8b5a33; /* o un colore piÃ¹ chiaro rispetto al titolo */
    margin-top: 0.5rem;
    font-style: italic; /* opzionale per distinguere dalle professioni */
    font-weight: normal;
}


/* Skip link nascosto, visibile solo a focus */
/* Skip link */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#skip-main-menu
{
    position: absolute;
    top: 20px;
}

#skip-link-a
{
     background: var(--section-bg);
}

/* Mostra il menu quando un link interno riceve focus */
#skip-main-menu:focus-within {
  position: absolute;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* Quando il link riceve focus, diventa visibile */
.sr-only:focus {
  position: absolute;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  top: 0;
  z-index: 10;
}


#skip-main-menu {
  position: absolute;
  left: -9999px;   /* nasconde */
  top: 20px;
  background: var(--section-bg);
  z-index: 9999;
}

/* Stato VISIBILE quando premi Alt+M */
#skip-main-menu.show {
  left: 0;         /* lo riporta sullo schermo */
}



header, #main
{
    position: relative;
    z-index: 0;
}


/* NAV */
nav {
    position: sticky;
    top: 0;
    background: var(--section-bg);
    z-index: 1500;
    border-bottom: 1px solid #e0cbb0;
}
nav .nav-inner {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: center;
    padding: .5rem 1rem;
    list-style: none;
}
nav a {
    margin: 0 .8rem;
    font-weight: 500;
}

/* Hamburger mobile */
.hamburger-wrap {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 1rem;
}
.hamburger-name { font-weight: bold; font-size: 1.2rem; color: var(--text);}
.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text);
}
nav ul#mobile-menu {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}
nav ul#mobile-menu.open { display: flex;  }

nav ul#mobile-menu li { padding-top: 10px; padding-bottom:10px; }

/* SECTIONS */
section {
    max-width: 1100px;
    padding: 3rem 1rem;
    margin: 2rem auto;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
}
section h2 { margin-top: 0; }

/* GRIGLIA PORTFOLIO E CARDS */
.container-grid,
.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* massimo 3 card per riga */
    gap: 1.2rem;
    margin: 0 auto;
}

/* CARD SINGOLA */
.item {
    background-color: #f8e6d1; /* caldo e leggermente piÃ¹ scuro del bianco */
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px), /* puntini */
        linear-gradient(45deg, rgba(75,53,36,0.01) 25%, transparent 25%, transparent 50%, rgba(75,53,36,0.01) 50%, rgba(75,53,36,0.01) 75%, transparent 75%, transparent 100%);
    background-size: 15px 15px, 20px 20px;
    background-position: 0 0, 0 0;
    
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 14px var(--shadow);
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;

    display: flex;
    flex-direction: column;
    color: var(--text); /* mantiene il contrasto per accessibilitÃ  */
}




.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;           /* prende tutto lo spazio disponibile */
    justify-content: space-between; /* testo in alto, pulsante in basso */
}

.card-text {
    /* puoi usare min-height se vuoi uniformare ulteriormente le card */
}

/* Titoli delle card */
.item h3 {
    font-size: 1.2rem;       /* leggermente piÃ¹ grande */
    font-weight: 700;        /* piÃ¹ marcato */
    color: var(--accent);    /* colore a contrasto con il testo normale */
    margin: 0.5rem 0;        /* spazio sopra e sotto */
    line-height: 1.3;        /* piÃ¹ compatto */
}

/* Aggiunta di un piccolo effetto decorativo */
.item h3::after {
    content: "";
    display: block;
    width: 40px;               /* sottolineatura corta */
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 4px;
}




.item img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: .8rem;
}

.item .img-container {
    width: 100%;
    height: 200px; /* altezza fissa per tutte le card */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.item .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* mantiene proporzioni e riempie il container */
    display: block;
}



.item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px var(--shadow);
}

.item:focus {
    outline: 3px solid rgba(196,154,108,0.5);
    outline-offset: 4px;
}


/* --- CERTIFICATIONS GRID MIGLIORATA --- */

#certifications .container-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 1.5rem;   /* spazio orizzontale */
    row-gap: 4rem;      /* spazio VERTICALE maggiore */
    align-items: stretch;
}

/* CARD */
#certifications .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%, 
                        transparent 50%, rgba(75,53,36,0.015) 50%, 
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Migliora accessibilitÃ  */
#certifications .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* HOVER soft e professionale */
#certifications .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

/* IMMAGINI UNIFORMATE */

/* CONTENITORE IMMAGINE */
#certifications .item .img-box {
    width: 100%;
    height: 160px; /* dimensione uniforme */
    background: #fff7ec;
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);
    display: flex;
    justify-content: center;   /* centra orizzontalmente */
    align-items: center;       /* centra verticalmente */
    overflow: hidden;          /* impedisce sbordo */
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

/* IMMAGINE */
#certifications .item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;       /* mantiene proporzioni */
    display: block;
}

/* TITOLI */
#certifications .item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    margin: .8rem 0 .5rem;
    line-height: 1.3;
    min-height: 48px; /* uniforma due righe max */
}

#certifications .item h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: var(--accent);
    margin-top: 5px;
    border-radius: 2px;
}

/* LINK */
#certifications .item a {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;
    font-size: .9rem;
    transition: background .25s, box-shadow .25s;
}

#certifications .item a:hover,
#certifications .item a:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    #certifications .container-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    #certifications .container-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 550px) {
    #certifications .container-grid { grid-template-columns: 1fr; }
}

/* --- PORTFOLIO GRID MIGLIORATA --- */

#portfolio .container-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1.5rem;   /* spazio orizzontale */
    row-gap: 4rem;      /* spazio VERTICALE maggiore */
    align-items: stretch;
}


/* CARD */
#portfolio .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%,
                        transparent 50%, rgba(75,53,36,0.015) 50%,
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;

    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s, box-shadow .25s, background-color .25s;

    display: flex;
    flex-direction: column;
    height: 100%;
}

/* FOCUS ACCESSIBILE */
#portfolio .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* HOVER */
#portfolio .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

/* --- IMMAGINI PERFETTAMENTE CENTRATE --- */
#portfolio .img-container {
    width: 100%;
    height: 250px;
    background: #fff7ec;
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* impedisce sbordo */
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

#portfolio .img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    object-position: left top;
}

/* TITOLI */
#portfolio h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: .8rem 0 .6rem;
    line-height: 1.3;
}

#portfolio h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* LINK */
#portfolio .item a {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;
    font-size: .9rem;
    transition: background .25s, box-shadow .25s;
}

#portfolio .item a:hover,
#portfolio .item a:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    #portfolio .container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #portfolio .container-grid {
        grid-template-columns: 1fr;
    }
}


/* --- SEZIONE MUSICA --- */
#music {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 3rem 1rem 2rem;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
}

/* GRIGLIA */
#music .music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne */
    column-gap: 1.5rem;   /* spazio orizzontale */
    row-gap: 4rem;        /* spazio verticale maggiore */
    align-items: stretch;
}

/* CARD */
#music .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%,
                        transparent 50%, rgba(75,53,36,0.015) 50%,
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;

    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s, box-shadow .25s, background-color .25s;

    display: flex;
    flex-direction: column;
    height: 100%;
}

#music .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

#music .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

/* IMMAGINE CENTRATA */
#music .img-box {
    width: 100%;
    height: 250px;
    background: #fff7ec;
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

#music .img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    object-position: left top;
}

/* TITOLI CARD */
#music h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: .8rem 0 .6rem;
    line-height: 1.3;
}

#music h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: var(--accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* LINK CARD - bottone */
#music .item a {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;
    font-size: .9rem;
    transition: background .25s, box-shadow .25s;
}

#music .item a:hover,
#music .item a:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
}

/* LINK FINALE AL CANALE YOUTUBE - solo testuale */
#music .music-channel {
    margin-top: 4rem;
}

#music .music-channel a {
    color: var(--accent);
    font-weight: 500;
    transition: color .25s;
}

#music .music-channel a:hover,
#music .music-channel a:focus-visible {
    color: #704725; /* colore hover/focus */
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    #music .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #music .music-grid {
        grid-template-columns: 1fr;
    }
}



/* --- SEZIONE POESIE --- */
#poems {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 3rem 1rem 4rem;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
}

/* GRIGLIA */
#poems .container-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne */
    column-gap: 1.5rem; /* spazio orizzontale */
    row-gap: 4rem;      /* spazio verticale tra righe */
}

/* CARD */
#poems .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%,
                        transparent 50%, rgba(75,53,36,0.015) 50%,
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;

    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s, box-shadow .25s, background-color .25s;

    display: flex;
    flex-direction: column;
    height: 100%;
}

#poems .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

#poems .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* IMMAGINE CARD */
/* CONTAINER IMMAGINE CARD */
#poems .img-container {
    width: 100%;
    height: 250px;         /* altezza fissa */
    background: #fff7ec;   /* colore di sfondo leggero */
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 0.8rem;
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

#poems .img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    object-position: left top;
}


/* TITOLI CARD */
#poems .item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0.6rem 0 0.5rem;
    line-height: 1.3;
}

#poems .item h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: var(--accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* TESTO CARD */
#poems .item p.libro-par {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

/* LINK TESTO */
#poems .item a.link_orange {
    color: var(--accent);

    transition: color .25s;
}

#poems .item a.link_orange:hover,
#poems .item a.link_orange:focus-visible {
    color: #704725;
    outline: none;
    text-decoration: underline;
}

/* PULSANTE LEGGI POESIA */
#poems .item button.open-modal {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .25s, box-shadow .25s;
    border: none; /* rimuove eventuali bordi di default */
}

#poems .item button.open-modal:hover,
#poems .item button.open-modal:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
    outline: none;
}


#poems .open-modal {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, box-shadow .25s;
    border: none; /* rimuove eventuali bordi di default */
}

/* MODALE POESIE */
#poem-modal .modal-content {
    max-height: 80vh; /* altezza massima */
    overflow-y: auto;  /* scroll se il testo Ã¨ lungo */
    padding: 1.5rem;
}

/* MODALE POESIE */
#poem-modal .modal-content img {
    width: 100%;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    #poems .container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #poems .container-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SEZIONE CUCINA --- */
#cooking {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 3rem 1rem 2rem;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
}

/* GRIGLIA */
#cooking .cooking-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne */
    column-gap: 1.5rem;
    row-gap: 4rem; /* spazio verticale tra le righe */
}

/* CARD */
#cooking .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%,
                        transparent 50%, rgba(75,53,36,0.015) 50%,
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s, box-shadow .25s, background-color .25s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#cooking .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

#cooking .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

/* IMMAGINE CENTRATA */
#cooking .img-box {
    width: 100%;
    height: 250px;
    background: #fff7ec;
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

#cooking .img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    object-position: left top;
}

/* TITOLI CARD */
#cooking h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: .8rem 0 .6rem;
    line-height: 1.3;
}

#cooking h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: var(--accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* LINK CARD */
#cooking a {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;

    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, box-shadow .25s;
    border: none;
}

#cooking a:hover,
#cooking a:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
    outline: none;
}

/* LINK FINALE AL CANALE COMPLETO - SOLO TESTO */
/* LINK FINALE ALLA RACCOLTA COMPLETA */
#cooking .cooking-channel {
    margin-top: 4rem;
}

#cooking .cooking-channel a {
    color: var(--accent);
    font-weight: 500;
    transition: color .25s;
    background: none;
}

#cooking .cooking-channel a:hover,
#cooking .cooking-channel a:focus-visible {
    color: #704725; /* colore hover/focus */
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    #cooking .cooking-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #cooking .cooking-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SEZIONE FOTOGRAFIA --- */
#photography {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 3rem 1rem 2rem;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
}

/* GRIGLIA */
#photography .photography-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1.5rem;
    row-gap: 4rem;
}

/* CARD */
#photography .item {
    background-color: #f8e6d1;
    background-image: 
        radial-gradient(rgba(75,53,36,0.05) 1px, transparent 1px),
        linear-gradient(45deg, rgba(75,53,36,0.015) 25%, transparent 25%,
                        transparent 50%, rgba(75,53,36,0.015) 50%,
                        rgba(75,53,36,0.015) 75%, transparent 75%, transparent 100%);
    background-size: 14px 14px, 22px 22px;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 14px var(--shadow);
    transition: transform .25s, box-shadow .25s, background-color .25s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#photography .item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

#photography .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow);
    background-color: #f3dcc0;
}

/* IMMAGINE CENTRATA */
#photography .img-box {
    width: 100%;
    height: 250px;
    background: #fff7ec;
    border-radius: 8px;
    border: 1px solid rgba(75,53,36,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem 0.5rem 0.2rem 0.5rem;
    box-sizing: border-box;
}

#photography .img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    object-position: left top;
}

/* TITOLI CARD */
#photography h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: .8rem 0 .6rem;
    line-height: 1.3;
}

#photography h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: var(--accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* LINK CARD */
#photography a {
    margin-top: auto;
    background: var(--accent);
    color: white;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-align: center;

    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, box-shadow .25s;
    border: none;
}

#photography a:hover,
#photography a:focus-visible {
    background: #704725;
    box-shadow: 0 0 0 3px rgba(139,90,51,0.35);
    outline: none;
}

/* LINK FINALE ALLA RACCOLTA COMPLETA */
#photography .photography-channel {
    margin-top: 4rem;
}

#photography .photography-channel a {
    color: var(--accent);
    font-weight: 500;
    transition: color .25s;
    background: none;
}

#photography .photography-channel a:hover,
#photography .photography-channel a:focus-visible {
    color: #704725; /* colore hover/focus */
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    #photography .photography-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #photography .photography-grid {
        grid-template-columns: 1fr;
    }
}



/* SKILLS aggiornato: background piÃ¹ visibile */
.skills-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.skills-list li { 
    background: #e0c1a0;
    padding: .5rem 1rem; 
    border-radius: 15px; 
    color: var(--text);
}

/* MODALE con animazione */
.modal[hidden] { display: none; }
.modal {
    position: fixed;
    inset: 0;
    background: rgba(75,53,36,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 5000;
}
.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh; /* massima altezza pari all'80% della finestra */
    padding: 1.5rem;
    border-radius: 10px;
    outline: none;
    box-shadow: 0 10px 22px rgba(0,0,0,.15);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.35s ease, transform 0.35s ease;

    overflow-y: auto; /* aggiunge scroll verticale se il contenuto Ã¨ lungo */
    box-sizing: border-box; /* include padding dentro max-height */
}

.modal.show .modal-content {
    opacity: 1;
    transform: scale(1);
}
.close-btn {
    margin-top: 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    padding: .6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

/* CONTACTS */
.contact-image { max-width: 45px; }

/* Contenitore della lista */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

/* Singolo elemento della lista */
.contact-list li {
  margin-bottom: 0.7rem;
}

/* Link del contatto */
.contact-list a {
  display: flex;
  align-items: center;
  font-size: 1rem;
  gap: 0.5rem; /* spazio tra icona e testo */
}

/* Stato hover e focus (accessibile) */
/* Icone */
.contact-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  opacity: 0.9;
}

/* Migliora accessibilitÃ  per chi usa tastiera */
.contact-list a:focus-visible {
  outline: 3px solid #005bb5;
  border-radius: 4px;
}

/* MOBILE */
@media (max-width: 800px) {
    nav .nav-inner { display: none; }
    .hamburger-wrap { display: flex; }
    nav ul{ padding: 1rem; border-top: 1px solid #e0cbb0; }
    nav ul#mobile-menu.open { display: flex;  }
}

@media (max-width: 900px) {
    .container-grid,
    .grid-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 card per riga su tablet */
    }
}

@media (max-width: 600px) {
    .container-grid,
    .grid-cards {
        grid-template-columns: 1fr; /* 1 card per riga su mobile */
    }
}


footer {
    background: var(--section-bg);
    color: var(--text);
    padding: 2rem 1rem 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
    margin-top: 3rem;
    font-size: 0.95rem;
    text-align: center;
}

.footer-content p {
    margin: 0;
    line-height: 1.5;
    margin-bottom: 15px;
}

.footer-bottom {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(75,53,36,0.7);
}

.iubenda-embed:not(.no-brand):not(.iubenda-nostyle):focus
{
    outline: 2px solid #005bb5 !important;
    outline-offset: 2px !important;
}





/* pulsante torna su */
/* Bottone Torna su */
#backToTop {
position: fixed;
bottom: 1rem;
right: 1rem;
width: 44px;
height: 44px;
border-radius: 50%;
border: none;
background-color: #222;
color: #fff;
font-size: 1.2rem;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease, transform 0.3s ease;
z-index: 1000;
}

#backToTop:focus-visible {
outline: 3px solid #4d90fe;
outline-offset: 3px;
}

#backToTop.show {
opacity: 0.85;
pointer-events: auto;
transform: translateY(0);
}

#backToTop:hover {
opacity: 1;
}

/* Più grande e distanziato su desktop */
@media (min-width: 768px) {
#backToTop {
bottom: 1.5rem;
right: 1.5rem;
}
}