@font-face {
    font-family: 'Playfair Display';
    src: url("./assets/fonts/Playfair_Display/static/PlayfairDisplay-Regular.woff2") format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url("./assets/fonts/Playfair_Display/static/PlayfairDisplay-Medium.woff2") format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url("./assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBold.woff2") format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url("./assets/fonts/Playfair_Display/static/PlayfairDisplay-Bold.woff2") format('woff2');
    font-weight: 700;
    font-style: normal;
}

    @font-face {
    font-family: 'Bricolage Grotesque';
    src: url("./assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-Light.woff2") format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url("./assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-Regular.woff2") format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url("./assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-Medium.woff2") format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url("./assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-SemiBold.woff2") format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url("./assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-Bold.woff2") format('woff2');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section, div, img {
    max-width: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    line-height: 1.6;
    color: #333;
}

header {
    background: #2a131c;
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.section {
    display: flex;
    flex-direction: column;
    padding: 8em 20em 8em 20em;
    gap: 2em;
}

p {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.2em;
    color: #666;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 5em;
    font-weight: 700;
}

h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5em;
    font-weight: 500;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: 3em;
    font-weight: 700;
}

h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5em;
    font-weight: 500;
}

h5 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.2em;
    font-weight: 400;
    color: #666;
}

h6 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1em;
    font-weight: 600;
}

nav {
    max-width: 100vw;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5em;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3em;
}

.logo-img {
    width: 3.5em;
    height: 3.5em;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 0.9em;
    letter-spacing: 0.6px;
}

.logo-subtext {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1em;
    letter-spacing: 0.6px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: #ac828f;
    background: rgba(255,255,255,0.1);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

#hero-section {
    background: linear-gradient(rgba(5, 20, 35, 0.8), rgba(5, 20, 35, 0.8)), url("./assets/immagini/Home/hero_section.jpg");
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    flex-direction: column;
    background-position: center 20%;
    gap: 3em;
    padding: 8em 4em 8em 4em;
}

.hero-title-container {
    gap: 1em;
}

.hero-buttons {
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#biography {
    position: relative;
}

.immagine-sfondo {
    position: absolute;
    opacity: 0.1;
    z-index: -1;
    left: 65%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 80%;
    max-width: 50%;
    object-fit: contain;
}

.button {
    font-family: 'Bricolage Grotesque', sans-serif;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 0.6em;
    cursor: pointer;
    border: none;
    min-width: 180px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    height: 3em;
}

.button-primary {
    background-color: #e1c389;
    color: #45212f;
}

.button-primary:hover {
    background-color: #45212f;
    color: #fff;
}

.button-secondary {
    background-color: transparent;
    color: white;
    border: 0.1em solid #e1c389;
}

.button-secondary:hover {
    background-color: #e1c389;
    color: #45212f;
    border: 0.0em solid #e1c389;
}

#direttore {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4em;   
}

.director-cv {
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: flex-start;
    flex: 1;
    max-width: 800px;
    flex-shrink: 1;
}

.director-image {
    border-radius: 1.25em; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 600px;
    flex-shrink: 1;
}

.director-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.9375em;
    display: block;
}

#galleria {
    background: white;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.gallery-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    font-family: 'Bricolage Grotesque', sans-serif;
    flex: 1;
    height: 10em;
    background: #2a131c;
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-card-content {
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
    gap:1em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 0px;
    box-sizing: border-box;
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.modal-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.modal-images img {
    width: calc(50% - 10px);
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-images img:hover {
    transform: scale(1.03);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #000;
    cursor: pointer;
}

#lightbox-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

#lightbox-modal .close:hover {
    color: #ccc;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    justify-items: center;
}

.thumbnail-grid img {
    width: 150px;
    height: auto;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
}

.thumbnail-grid img:hover {
    transform: scale(1.05);
}

#lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    margin: 0;
    display: block;
}

.prev, .next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    padding: 20px;
    font-size: 40px;
    color: white;
    transform: translateY(-50%);
    user-select: none;
    z-index: 10001;
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

.prev:hover, .next:hover {
    color: #ccc;
}

.section-subtitle {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 40px;
    font-style: italic;
}

.calendar {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

#calendar-title {
    display: flex;
    justify-content: center;
}

.event {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 2em;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    border: 1px solid rgba(42, 19, 28, 0.08);
    border-left: 4px solid #5a3f4c;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04);
}

.event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2a131c 0%, #6b4556 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.event:hover {
    transform: translateY(-4px);
    border-left-color: #2a131c;
    box-shadow:
        0 8px 24px rgba(42, 19, 28, 0.12),
        0 4px 8px rgba(42, 19, 28, 0.08);
}

.event:hover::before {
    opacity: 1;
    display: none;
}

.event-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.event-content {
    flex: 1;
}

.event-date {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    color: #2a131c;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f0e6ec 0%, #e8dce4 100%);
    border-radius: 20px;
    display: inline-block;
}

.event-title-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15em;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    transition: color 0.2s ease;
}
.event:hover .event-title {
    color: #2a131c;
}

.event-subtitle {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.95em;
    color: #5a5a5a;
    line-height: 1.6;
    font-weight: 400;
}

.event-location {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.9em;
    color: #2a131c;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.event-location::before {
    content: '📍';
    font-size: 1em;
}

.social {
    border-top: 0.1em solid #0f3a5e
}

.contact-info {
    border-top: 0.1em solid #0f3a5e
}

.info-contact {
    display: flex;
    flex-direction: row;
    gap: 100px;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    margin-top: 10px;
    position: relative;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.contact-item i {
    font-size: 1.2rem;
    color: #858b8f;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.contact-item span {
    font-size: 1rem;
    color: #555;
    font-weight: 400;
}

.subsection-subtitle {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: #666;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #2a131c;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.social-link.instagram {
    color: white;
}

.social-link.facebook {
    color: white;
}

.social-link.youtube {
    color: white;
}

.social-link i {
    font-size: 1.2rem;
}

footer {
    background: #2c1810;
    color: white;
    text-align: center;
    padding: 2rem;
}

.slideshow-container {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.slide {
    display: none;
    width: 100%;
    border-radius: 8px;
}

#modal-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: left;
}

#thumbnails-container img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

#thumbnails-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@media (min-width: 1600px) {
    .calendar {
        padding: 0 15em;
    }
}

@media (max-width: 1600px) {
    .immagine-sfondo {
        display:none
    }

    .section {
        display: flex;
        flex-direction: column;
        padding: 4em 10em;
        gap: 1em;
    }

    #direttore {
        flex-direction: column;
        align-items: center;
        gap: 2em;
    }

    .calendar {
        padding: 0 5em;
    }
}

@media (max-width: 1200px) {
    .immagine-sfondo {
        display:none
    }

    .section {
        padding: 4em 5em;
    }

    .gallery-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-item {
        width: 100%;
    }

    .calendar {
        padding: 0;
    }
}

@media (max-width: 800px) {
    .immagine-sfondo {
        display:none
    }

    nav {
        padding: 0 2.5em;
        width: 100%;
    }

    .logo-img {
        width: 2.5em;
        height: 2.5em;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-subtext {
        font-size: 0.85rem;
    }

    h1 { font-size: 2.5em; }
    h2 { font-size: 1.2em; }
    h3 { font-size: 2em; }
    h4 { font-size: 1.3em; }
    p  { font-size: 1em; }

    .section {
        padding: 4em 2.5em;
        gap: 1.5em;
    }

    #hero-section {
        padding: 6em 2.5em;
        gap: 2em;
    }

    #calendario {
        padding: 4em 2.5em;
    }

    .calendar {
        padding: 0;
        margin: 0;
    }

    .button {
        min-width: 140px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    #direttore {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
    }

    .director-cv {
        order: 1;
        max-width: 100%;
        width: 100%;
    }

    .director-image {
        order: 2;
        max-width: 100%;
        width: 100%;
    }

    .event {
        padding: 1.5em;
        width: 100%;
        margin: 0;
    }

    .event-title { font-size: 1.3em; }
    .event-subtitle { font-size: 1em; }
    .event-date,
    .event-location { font-size: 0.9em; }

    .info-contact {
        flex-direction: column;
        gap: 2em;
        width: 100%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: #45212f;
        position: absolute;
        top: 60px;
        right: 20px;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .modal-content {
        padding: 15px;
        width: 95%;
        max-width: 95%;
    }

    #thumbnails-container img {
        width: 120px;
        height: 120px;
    }

    .prev, .next {
        font-size: 30px;
        padding: 15px;
    }

    .prev { left: 10px; }
    .next { right: 10px; }

    .gallery-grid,
    .gallery-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .immagine-sfondo {
        display:none
    }

    nav { padding: 0 2em; }

    .logo-img {
        width: 2em;
        height: 2em;
    }

    .logo-text { font-size: 0.85rem; }
    .logo-subtext { font-size: 0.75rem; }

    h1 { font-size: 1.8em; line-height: 1.2; }
    h2 { font-size: 1em; line-height: 1.3; }
    h3 { font-size: 1.5em; }
    h4 { font-size: 1.1em; }

    p {
        font-size: 0.95em;
        overflow-wrap: break-word;
    }

    .section { padding: 3em 2em; }
    #hero-section { padding: 5em 2em; }
    #calendario { padding: 3em 2em; }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.8em;
    }

    .button {
        width: 100%;
        max-width: 280px;
        font-size: 0.85rem;
    }

    .event {
        padding: 1.5em;
        gap: 0.8em;
        margin: 0;
    }

    .event-title { font-size: 1.1em; }
    .event-subtitle { font-size: 0.95em; }
    .event-date,
    .event-location { font-size: 0.85em; }

    .gallery-grid { gap: 1rem; }

    .gallery-item {
        padding: 1.5rem 1rem;
        min-height: 7em;
        width: 100%;
        flex: none;
    }

    .gallery-card-content {
        gap: 0.8em;
        text-align: center;
        font-size: 0.9em;
    }

    .gallery-card-content i {
        font-size: 1.5em;
    }

    .contact-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.2em;
        font-size: 0.9em;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .modal-content {
        padding: 10px;
        width: 98%;
        margin: 10px;
    }

    #modal-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    #thumbnails-container img {
        width: 80px;
        height: 80px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    #lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }

    .prev, .next {
        font-size: 24px;
        padding: 10px;
    }

    .prev { left: 5px; }
    .next { right: 5px; }

    #direttore {
        flex-direction: column;
    }

    .director-cv {
        order: 1;
    }

    .director-image {
        order: 2;
    }
}

@media (max-width: 360px) {
    .immagine-sfondo {
        display:none
    }

    h1 { font-size: 1.5em; }
    h3 { font-size: 1.3em; }

    .section { padding: 2.5em 1.5em; }
    #hero-section { padding: 4em 1.5em; }
}