/* =========================
   BASE
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background:
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('Media/img/background.png') center / cover no-repeat;
}

/* =========================
   HEADER
========================= */

.site-header {
    position: relative;
    padding: 25px 0 15px;
}

/* MENU */

.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    font-size: 30px;
    font-weight: 500;
    color: darkred;
    transition: opacity 0.2s ease;
}

.main-nav a:hover {
    opacity: 0.7;
}

.main-nav a.active {
    border-bottom: 2px solid currentColor;
    padding-bottom: 4px;
}

/* =========================
   LANGUAGE SELECTION
========================= */

.language-selection {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.language-selection a {
    text-align: center;
    text-decoration: none;
    color: white;
}

.language-selection img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.language-selection img:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.lang-label {
    font-size: 14px;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* =========================
   MAIN CONTENT (HOME / ABOUT)
========================= */

.section {
    display: none;
}

.section.active {
    display: block;
}

main {
    flex: 1;
}

.main-section,
.about {
    margin: 0 20%;
    background-color: rgba(255,255,255,0.45);
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
}

/* LOGO (solo home) */

.main-section .logo {
    display: block;
    margin: 0 auto 25px;
    max-width: 220px;
}

/* HERO TEXT – HOME */

.main-section h1 {
    font-size: 44px;
    margin-bottom: 12px;
    color: darkred;
    letter-spacing: 1px;
}

.main-section h2 {
    font-size: 30px;
    font-weight: normal;
    margin: 6px 0;
    color: darkred;          /* UNA SOLA VOLTA */
    letter-spacing: 0.5px;
}


/* =========================
   LANG VISIBILITY
========================= */

.lang {
    display: none;
}

.lang.active {
    display: block;
}

/* =========================
   FOOTER
========================= */

footer {
    background-color: #060606;
    color: #1E90FF;
    padding: 20px;
    text-align: center;
}

footer section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* SOCIAL */

.social-links h3 {
    color: white;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icons a i {
    font-size: 75px;
    transition: opacity 0.2s ease;
}

.social-icons a i:hover {
    opacity: 0.7;
}

.social-links .facebook i { color: #3b5998; }
.social-links .youtube i  { color: #c4302b; }
.social-links .instagram i{ color: #e4405f; }

/* CONTACT INFO */

.contact-info h3 {
    color: white;
}

.contact-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0;
}

.contact-info .icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

.contact-info .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================
   GALLERY PAGE
========================= */

body.gallery-page {
    background-attachment: fixed;
}

/* GALLERY SECTIONS */

.gallery-page section {
    margin: 30px 20%;
    background-color: rgba(255,255,255,0.45);
    padding: 25px;
    border-radius: 6px;
}

/* GALLERY TITLES */

.gallery-page h2 {
    margin-bottom: 20px;
    border-left: 6px solid #c0392b;
    padding-left: 12px;
    font-family: Georgia, serif;
    font-weight: normal;
}

/* GRID */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, 160px);
    gap: 15px;

    justify-content: center;   /* centra l'intera riga */
}

.gallery img {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery img:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* DOWNLOAD */

.download-pricelist {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-pricelist .download-text {
    font-family: Georgia, serif;
    font-size: 18px;
    color: darkred;
    margin-bottom: 12px;
}

.download-pricelist a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 34px;
    font-weight: bold;
    color: darkred;
    border: 2px solid darkred;
    background-color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
}

.download-pricelist a:hover {
    background-color: darkred;
    color: white;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .main-section,
    .about,
    .gallery-page section {
        margin: 0 5%;
        padding: 20px;
    }

    .main-section h1 {
        font-size: 32px;
    }

    .main-section h2 {
        font-size: 22px;
    }

    .main-section .logo {
        max-width: 160px;
    }

    .social-icons a i {
        font-size: 40px;
    }
}

@media (max-width: 480px) {

    .language-selection img {
        width: 28px;
        height: 18px;
    }

    .social-icons a i {
        font-size: 28px;
    }
}

/* LIGHTBOX */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

#lightbox .close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
}

#contatore-visite {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 30px 0;
}
