* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5)), url('immagini/2018-03-28_The-rendezvous_by-David-Revoy-scaled.jpg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    animation: slideInFromTop 1s ease-out;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 800px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: slideInFromBottom 1s ease-out 0.3s both;
}

.photo-credit {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border-radius: 5px;
    backdrop-filter: blur(10px);
}

.photo-credit a {
    color: #8ec5ff;
    text-decoration: none;
}

.photo-credit a:hover {
    text-decoration: underline;
}

/* Navigation */
.nav-menu {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-content {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-content a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-content a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.main-content {
    background: white;
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
}

.content-section {
    padding: 3rem;
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-align: center;
}

.content-section h3 {
    color: #764ba2;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.content-section p {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: 1.1rem;
}

/* Vignettes Gallery */
.vignettes-gallery {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 3rem;
}

.vignette-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.vignette-start {
    text-align: center;
    margin: 2rem 0;
}

.start-reading-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.start-reading-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(102, 126, 234, 0.8); }
    100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
}

.vignettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.vignette-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
}

.vignette-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.vignette-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.vignette-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Vignette specifiche */
.vignette-placeholder.vignetta-1 { background-image: url('immagini/vignetta1.png'); }
.vignette-placeholder.vignetta-2 { background-image: url('immagini/vignetta2.png'); }
.vignette-placeholder.vignetta-3 { background-image: url('immagini/vignetta3.png'); }
.vignette-placeholder.vignetta-4 { background-image: url('immagini/vignetta4.png'); }
.vignette-placeholder.vignetta-5 { background-image: url('immagini/vignetta5.png'); }
.vignette-placeholder.vignetta-6 { background-image: url('immagini/vignetta6.png'); }

/* Modal Enhancements */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 95vh;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.modal-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
    flex-shrink: 0;
}

.vignette-counter {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    margin: 1rem 0;
}

.modal-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.reading-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close:hover {
    color: #667eea;
}

/* Consigli Section */
.consigli {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
}

.consigli-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.consiglio-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.consiglio-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.consiglio-card ul {
    list-style: none;
}

.consiglio-card li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.consiglio-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #8ec5ff;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem;
    text-align: center;
}

.footer h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.sostenitori {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.sostenitore {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
    max-width: 200px;
}

.sostenitore:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.sostenitore .logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.sostenitore:hover .logo {
    transform: scale(1.1);
}

.sostenitore span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

.footer-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-links a {
    color: #8ec5ff;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 2rem;
    }
    
    .nav-content {
        gap: 1rem;
    }
    
    .nav-content a {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .start-reading-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .vignettes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        padding: 1rem;
        width: 95%;
        max-height: 98vh;
    }
    
    .modal-navigation {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .nav-btn {
        max-width: none;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .modal-footer {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .vignette-intro {
        font-size: 1rem;
        padding: 0.8rem;
    }
    
    .sostenitori {
        gap: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    
    .sostenitore {
        min-width: 120px;
        max-width: 160px;
        padding: 1rem;
    }
    
    .sostenitore .logo {
        width: 60px;
        height: 60px;
    }
    
    .sostenitore span {
        font-size: 0.8rem;
    }
}

/* Download button */
.download-btn {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    margin: 1rem 0;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

/* Link styling nei contenuti */
.content-section a,
.main-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.content-section a:hover,
.main-content a:hover {
    color: #764ba2;
    border-bottom-color: #667eea;
    transform: translateY(-1px);
}

.content-section a:active,
.main-content a:active {
    transform: translateY(0);
}