:root {
    --primary-color: #ff7e67;
    --secondary-color: #ffa07a;
    --dark-color: #333;
    --light-color: #fff;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

header {
    background: var(--dark-color);
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    color: var(--light-color);
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
}

nav ul li a:hover {
    color: var(--primary-color);
}
#hero {
  height: 100vh;
  background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* Replace 'hero-bg.jpg' with the filename of your image */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: justify; /* sostituire se serve con center; */
  color: var(--light-color);
}
.hero-content {  /* se serve rimuovere questo */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 0.45em;
}

.hero-content p {
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.35em; /* Spazio tra le lettere */
  word-spacing: 1em;     /* Spazio tra le parole */
  padding: 0 0.5em;      /* Padding laterale */
  width: 100%;           /* Occupa tutta la larghezza disponibile */
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-story {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-card {
    background: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
}

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

.card-content {
    padding: 1.5rem;
}

.card-content h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

#gallery h2{
    text-align: center;
}

#gallery {
    background: #f5f5f5;
}

:target::before {
  content: "";
  display: block;
  height: 110px; /* fixed header height*/
  margin: -110px 0 0; /* negative fixed header height */
}

#events {
    background: #f0f0f0;
}

#events h2{
    text-align: center;
}

#contact {
    background: #f5f5f5;
    padding: 4rem 2rem;
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact input,
#contact textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}
#contact button {
  background: var(--primary-color);
  color: var(--light-color);
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

#contact button:hover {
  background: var(--secondary-color);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}
.image-container {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
        .content-grid, .events-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
            padding: 2rem;
        }
        .event-card {
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            overflow: hidden;
            transition: transform 0.3s;
        }
        .event-card:hover {
            transform: translateY(-5px);
        }
        .video-container {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            background: #f0f0f0;
            cursor: pointer;
            overflow: hidden;
        }
        .video-container img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .play-button {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60px;
            height: 60px;
            background: rgba(0, 0, 0, 0.7);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            transition: background 0.3s;
        }
        .video-container:hover .play-button {
            background: rgba(0, 0, 0, 0.9);
        }
        .modal iframe {
            width: 80vw;
            height: 45vw;
            max-width: 1200px;
            max-height: 675px;
        }
        .past-event {
            opacity: 0.7;
        }
        .event-content {
            padding: 1rem;
        }
        .event-date, .event-location {
            color: #666;
            font-size: 0.9em;
            margin: 0.5rem 0;
        }