/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); /* Reserved for future use (e.g., special buttons, alerts) */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: var(--primary-gradient);
    background-attachment: fixed;
    min-height: 100vh;
}
header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-title-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

#header-logo {
    max-width: 70px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

nav {
    margin-top: 1rem;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav a.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* Container principale */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

main {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

/* Titoli */
h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #764ba2;
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

h5 {
    color: #34495e;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Paragrafi */
p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Liste */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Link */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Card per velivoli e sezioni */
.card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    margin-top: 0;
    color: #667eea;
}

.card h4 {
    margin-top: 1.5rem;
}

/* Aircraft header layout */
.aircraft-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.aircraft-info {
    flex: 1;
    min-width: 0;
}

.aircraft-info h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.aircraft-info h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.aircraft-info p {
    margin-bottom: 0;
}

.aircraft-image {
    flex-shrink: 0;
    max-width: 250px;
    width: 100%;
}

.aircraft-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.aircraft-image img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.4));
}


/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* Bottoni */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-external {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-external:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
}

footer p {
    margin: 0;
}

/* Galleria fotografica */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    height: 200px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Info box */
.info-box {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border-left: 5px solid #667eea;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.info-box strong {
    color: #5e35b1;
}

/* Hamburger menu toggle button - hidden on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header layout: logo+title on the left, hamburger on the right */
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0;
    }

    .header-title-wrapper {
        flex-direction: row;
        gap: 0.5rem;
        flex: 1;
    }

    #header-logo {
        max-width: 40px;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Show hamburger button */
    .menu-toggle {
        display: block;
    }

    /* Nav hidden by default on mobile; shown when .open is toggled via JS */
    nav {
        display: none;
        width: 100%;
        margin-top: 0.75rem;
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.4rem;
    }

    nav a {
        display: block;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    main {
        padding: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .aircraft-header {
        flex-direction: column;
        gap: 1rem;
    }

    .aircraft-image {
        max-width: 200px;
        align-self: center;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 10px;
        margin: 1rem auto;
    }
    
    main {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .aircraft-image {
        max-width: 150px;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .gallery-item {
        height: 150px;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilità */
.text-center {
    text-align: center;
}

strong {
    font-weight: 600;
    color: #2c3e50;
}
header img.logo {
  display: block;
  margin: 0 auto;
}

/* Parallax background for aviosuperficie page */
.parallax-container {
    position: relative;
    min-height: 100vh;
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('cloudyliah.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    z-index: -1;
    will-change: transform;
}

.parallax-content {
    position: relative;
    z-index: 1;
}

/* Ensure text readability over parallax background */
.parallax-container main {
    background: rgba(255, 255, 255, 0.80);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
