/* ==========================================================================
   Sentiero delle Croci di Azzarino - Main Stylesheet
   ========================================================================== */

/* Variables */
:root {
    --primary-color: #8B4513;
    --secondary-color: #CD853F;
    --accent-color: #A0522D;
    --text-color: #2c3e2c;
    --background-color: #f5f1e8;
    --background-light: #fafafa;
    --background-gradient: linear-gradient(135deg, #f5f1e8 0%, #e8ddd0 100%);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --border-radius: 15px;
    --border-radius-small: 10px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--background-gradient);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}
ul {
    margin-left:3rem;
}
/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px var(--shadow-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Navigation */
.navigation {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navigation a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
}

.navigation a:hover,
.navigation a.active {
    background: var(--primary-color);
    color: white;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    background: linear-gradient(rgba(139, 69, 19, 0.7), rgba(160, 82, 45, 0.5)),
    linear-gradient(135deg, #654321 0%, #8B4513 25%, #A0522D 50%, #CD853F 75%, #228B22 100%);
    background-attachment: fixed;
    background-size: cover;
    margin-top: 80px;
}

/* Hero con immagine specifica */
.hero[style*="background-image"] {
    background: linear-gradient(rgba(139, 69, 19, 0.7), rgba(160, 82, 45, 0.5)),
    var(--hero-image, linear-gradient(135deg, #654321 0%, #8B4513 25%, #A0522D 50%, #CD853F 75%, #228B22 100%));
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px var(--shadow-dark);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: white;
}

.hero-content p {
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px var(--shadow-dark);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 150px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Main Content */
.main-content {
    margin-top: 0;
}

/* Sections */
.section {
    padding: 4rem 2rem;
    margin: 2rem 0;
    background: white;
    box-shadow: 0 10px 30px var(--shadow-light);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section h2::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section h3 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 2rem 0 1rem 0;
   /* border-left: 4px solid var(--secondary-color);*/
    padding-left: 0.5rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.card h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, #f4e5d3, #e6d3c1);
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.highlight-box::before {
    content: '✦';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-radius: 50%;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

/*.timeline::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    left: 15px;*/
/*    top: 0;*/
/*    bottom: 0;*/
/*    width: 3px;*/
/*    background: var(--secondary-color);*/
/*}*/

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-small);
    box-shadow: 0 5px 15px var(--shadow-light);
}

/*.timeline-item::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    left: -6px;*/
/*    top: 1.5rem;*/
/*    width: 15px;*/
/*    height: 15px;*/
/*    background: var(--primary-color);*/
/*    border-radius: 50%;*/
/*    border: 3px solid white;*/
/*    box-shadow: 0 0 0 3px var(--secondary-color);*/
/*}*/

.timeline-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Highlights Section Improvements */
.highlights-section {
    margin: 3rem 0;
}

.highlights-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Timeline item per highlights con layout orizzontale */
.timeline-item.highlight-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

.timeline-item.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Layout interno dell'highlight */
.highlight-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0;
}

.highlight-text {
    flex: 1;
    padding: 2rem;
}

.highlight-text h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.highlight-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* Sezione immagine highlight */
.highlight-image {
    flex: 0 0 300px;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.highlight-image figure {
    margin: 0;
    height: 100%;
}

.highlight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.highlight-image:hover img,
.highlight-image:hover .highlight-img {
    transform: scale(1.05);
}

.highlight-image .image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    margin: 0;
}

/* Placeholder per immagini mancanti negli highlights */
.highlight-image .image-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8ddd0, #d4c5b8);
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.highlight-image .image-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* Layout alternato per gli highlights */
.timeline-item.highlight-item:nth-child(even) .highlight-content {
    flex-direction: row-reverse;
}

.timeline-item.highlight-item:nth-child(even) {
    border-left: none;
    border-right: 4px solid var(--secondary-color);
}

/* Waypoint specifici */
.waypoint-image {
    margin: 1rem 0;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.waypoint-image img {
    width: 100%;
    height: auto;
    display: block;
}

.waypoint-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.waypoint-coordinates,
.waypoint-elevation,
.waypoint-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--primary-color);
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.waypoint-coordinates i,
.waypoint-elevation i,
.waypoint-duration i {
    font-size: 0.8rem;
}

/* Didascalie immagini */
.image-caption {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    margin-top: -1px;
}

/* Punti di Interesse / Highlights */
.waypoint-highlights {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f8f0, #e8f5e8);
    border-radius: var(--border-radius-small);
    border-left: 4px solid #228B22;
}

.waypoint-highlights h5 {
    color: #228B22;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.waypoint-highlights h5 i {
    color: #FFD700;
}

/* Lista highlights trasformata in card */
.waypoint-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.waypoint-highlights li {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius-small);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #32CD32;
    position: relative;
    transition: var(--transition);
}

.waypoint-highlights li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.waypoint-highlights li::before {
    content: '✦';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #32CD32;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
}

/* Se ci sono molti highlights, li organizziamo in colonne */
.waypoint-highlights ul:has(li:nth-child(4)) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Stili specifici per highlights importanti */
.waypoint-highlights li:first-child {
    border-left-color: #FFD700;
    background: linear-gradient(135deg, #fffef7, #fefdf0);
}

.waypoint-highlights li:first-child::before {
    background: #FFD700;
    content: '★';
}

/* Timeline item con highlights */
.timeline-item:has(.waypoint-highlights) {
    padding-bottom: 2rem;
}

/* Practical Info */
.practical-info {
    background: linear-gradient(135deg, #e8f5e8, #d4f1d4);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #228B22;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: var(--border-radius-small);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #228B22;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Images */
.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e8ddd0, #d4c5b8);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin: 1.5rem 0;
    transition: var(--transition);
    flex-direction: column;
    gap: 0.5rem;
}

.image-placeholder:hover {
    background: linear-gradient(135deg, #d4c5b8, #c4b5a8);
    transform: translateY(-2px);
}

.image-placeholder small {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.8;
}

.image-small {
    height: 200px;
}

.image-hero {
    height: 400px;
    font-size: 1.5rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--border-radius-small);
    box-shadow: 0 5px 15px var(--shadow-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #f0f0f0;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin: 0.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-medium);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin: 3rem 0;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 0;
    margin-top: 80px;
    border-bottom: 1px solid #eee;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--secondary-color);
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: bold;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid rgba(139, 69, 19, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .stat {
        min-width: 200px;
    }

    .section {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 20px var(--shadow-medium);
        padding: 1rem;
        gap: 0;
    }

    .navigation.open {
        display: flex;
    }

    .navigation a {
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid #eee;
    }

    .mobile-toggle {
        display: flex;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .image-hero {
        height: 250px;
        font-size: 1.2rem;
    }

    .image-placeholder {
        height: 200px;
        font-size: 1rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    .cta-section h3 {
        font-size: 1.5rem;
    }

    /* Responsive per highlights */
    .highlight-content {
        flex-direction: column !important;
        gap: 0;
    }

    .highlight-image {
        flex: none;
        width: 100%;
        height: 250px;
        order: -1;
    }

    .highlight-text {
        padding: 1.5rem;
    }

    .timeline-item.highlight-item:nth-child(even) {
        border-left: 4px solid var(--primary-color);
        border-right: none;
    }

    /* Responsive per highlights waypoint */
    .waypoint-highlights ul {
        grid-template-columns: 1fr;
    }

    .waypoint-highlights {
        padding: 1rem;
    }

    .waypoint-highlights li {
        padding: 0.75rem;
        margin-left: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 60vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item::before {
        left: -8px;
        width: 12px;
        height: 12px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .stat {
        min-width: auto;
        width: 100%;
    }

    .highlight-image {
        height: 200px;
    }

    .highlight-text {
        padding: 1rem;
    }

    .highlight-text h4 {
        font-size: 1.2rem;
    }

    .highlight-content {
        gap: 0;
    }
}

/* Animazioni aggiuntive per highlights */
@media (prefers-reduced-motion: no-preference) {
    .timeline-item.highlight-item {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease-out forwards;
    }

    .timeline-item.highlight-item:nth-child(1) { animation-delay: 0.1s; }
    .timeline-item.highlight-item:nth-child(2) { animation-delay: 0.2s; }
    .timeline-item.highlight-item:nth-child(3) { animation-delay: 0.3s; }
    .timeline-item.highlight-item:nth-child(4) { animation-delay: 0.4s; }
}

/* Focus states per accessibilità */
.highlight-image img:focus,
.timeline-item.highlight-item:focus-within {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .navigation,
    .mobile-toggle,
    .cta-section,
    .footer {
        display: none;
    }

    .main-content {
        margin-top: 0;
    }

    .hero {
        height: auto;
        padding: 2rem 0;
        background: none;
        color: var(--text-color);
    }

    .hero-content h1,
    .hero-content p {
        color: var(--text-color);
        text-shadow: none;
    }

    .section {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 1rem 0;
        page-break-inside: avoid;
    }

    .image-placeholder {
        border: 1px solid #ccc;
        background: #f5f5f5;
        color: #666;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        border: 1px solid var(--primary-color);
        background: white;
        color: var(--primary-color);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e8e8e8;
        --background-color: #1a1a1a;
        --background-light: #2a2a2a;
        --background-gradient: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    }

    .section {
        background: var(--background-light);
        color: var(--text-color);
    }

    .card {
        background: #333;
        color: var(--text-color);
    }

    .form-control {
        background: #333;
        color: var(--text-color);
        border-color: #555;
    }

    table {
        background: var(--background-light);
        color: var(--text-color);
    }

    th {
        background: var(--primary-color);
    }

    tr:nth-child(even) {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --accent-color: #666;
        --text-color: #000;
        --background-color: #fff;
    }

    .btn {
        border: 2px solid var(--primary-color);
    }

    .card {
        border: 2px solid var(--primary-color);
    }

    .highlight-box {
        border: 3px solid var(--primary-color);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.scroll-to-top i {
    font-size: 1.2rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.lightbox.hidden {
    opacity: 0;
    visibility: hidden;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-small);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius-small);
    margin-top: 1rem;
    max-width: 100%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50%;
    pointer-events: all;
    margin: 0 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Features Section Improvements */
.features-section {
    margin: 3rem 0;
}

.feature-icon {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 2rem;
}

/* Gallery Section Improvements */
.gallery-section {
    margin: 3rem 0;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Hero Buttons */
.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    margin: 0.25rem;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-buttons .btn {
    margin: 0.25rem;
}

/* Form Error States */
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success States */
.form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Focus Visible for Better Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}
/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: var(--transition);
}

.lightbox.hidden {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-small);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-caption {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem 2rem;
    margin-top: 1rem;
    border-radius: var(--border-radius-small);
    text-align: center;
    max-width: 80%;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-prev {
    transform: translateY(-50%);
}

.lightbox-next {
    transform: translateY(-50%);
}

/* Gallery items cursor pointer */
.gallery-item img {
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Scroll to top button styles */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error states for form validation */
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Mobile responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 20px;
    }

    .lightbox-close {
        top: -40px;
        right: -10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    .lightbox-caption {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        max-width: 95%;
    }

    .lightbox-nav {
        padding: 0 10px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}