/* Stili Generali e Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #2c3e50;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Canvas di Sfondo */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Header e Navigazione */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

nav a {
    margin-right: 20px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 600;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #800020;
}

.lang-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-selector a {
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    color: #718096;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-selector a:hover, .lang-selector a.active {
    background: #800020;
    color: #fff;
}

/* Layout Contenuti */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

h1 {
    color: #800020;
    font-size: 2.5rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f2f6;
    padding-bottom: 10px;
}

h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 30px 0 15px 0;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Grafica di Presentazione (Cards delle attrazioni) */
.attraction-card {
    background: #fff;
    border-left: 4px solid #800020;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.attraction-card h3 {
    color: #800020;
    margin-bottom: 5px;
}

/* Form di Upload */
.form-box {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #800020;
}

button {
    background: #800020;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s ease;
}

button:hover {
    background: #a30029;
}

/* Media Grid Animato della Galleria */
.top-bar {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 30px auto;
}

.grid-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
}

.grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.grid-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-card:hover img {
    transform: scale(1.04);
}

.grid-caption {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

/* Modale Zoom */
.zoom-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay.active {
    display: flex;
    opacity: 1;
}

.zoom-content {
    background: #fff;
    width: 90%;
    max-width: 750px;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.zoom-content img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 6px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    cursor: pointer;
    color: #a0aec0;
}

.close-btn:hover {
    color: #2c3e50;
}