/* =============================================
   CODE & DESIGN by Giorgiomontagna.it
   ============================================= */


/* =============================================
   1. RESET & VARIABILI GLOBALI
   ============================================= */
:root {
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --color-text: #333333;
    --color-light: #999999;
    --color-bg: #ffffff;
    --header-height: 110px; /* Altezza per ospitare il logo */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Previene scroll orizzontale */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

/* =============================================
   2. HEADER & NAVIGAZIONE (DESKTOP)
   ============================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-svg {
    height: 90px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-svg {
    transform: scale(1.05);
    opacity: 0.7;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #000;
}

/* Hamburger (Nascosto su Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #000;
}

/* =============================================
   3. STRUTTURA GENERALE & HERO
   ============================================= */
/* Video Hero Home */
.hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-bottom: 60px;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9); 
}

.hero-overlay {
    position: absolute;
    bottom: 150px;
    left: 40px;
    color: white;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-overlay h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -1px;
}

/* Main Container */
main {
    padding: 0 40px 40px 40px; 
    min-height: 80vh;
}

body.internal-page main {
    margin-top: var(--header-height);
}

.page-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* =============================================
   4. HOME PAGE (GRIGLIA PROGETTI)
   ============================================= */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card.large {
    grid-column: span 2;
}

.image-wrapper {
    width: 100%;
    height: 400px; 
    overflow: hidden;
    background-color: #f4f4f4;
    margin-bottom: 15px;
}

.project-card.large .image-wrapper {
    height: 600px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
}

.project-card:hover .image-wrapper img {
    transform: scale(1.03);
	filter: brightness(0.7); /* SCURISCE l'immagine (1 = normale, 0 = nero) */
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--color-light);
}

/* =============================================
   5. PAGINE INTERNE (ABOUT / CONTACTS / BANNER)
   ============================================= */
/* Banner Pagine Interne */
.page-banner {
    width: calc(100% + 80px);
    margin-left: -40px;
    height: 500px;
    object-fit: cover;
    margin-bottom: 40px;
    display: block;
}

.page-banner-big {
    width: calc(100% + 80px);
    margin-left: -40px;
    height:100%;
    object-fit: cover;
    margin-bottom: 40px;
    display: block;
}

/* Video Header Contatti */
.video-h500 {
    height: 500px !important;
    object-fit: cover;
    width: calc(100% + 80px);
}

/* Layout About & Contacts */
.about-container, .contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container { grid-template-columns: 1fr 2fr; }
.about-text p { margin-bottom: 20px; text-align: justify; }
.about-image img { width: 100%;  }

.info-block { margin-bottom: 20px; }
.info-block:last-child { margin-bottom: 0; }
.info-block a { border-bottom: 1px solid #ddd; padding-bottom: 2px; transition: all 0.3s ease; }
.info-block a:hover { border-bottom: 1px solid #000; color: #000; }

/* =============================================
   6. FORM & PRIVACY
   ============================================= */
form { display: flex; flex-direction: column; gap: 20px; }
input, textarea { width: 100%; padding: 15px; border: 1px solid #ccc; font-family: inherit; }
button { padding: 15px 30px; background-color: black; color: white; border: none; cursor: pointer; text-transform: uppercase; }
button:hover { background-color: #555; }

/* Privacy Box */
.privacy-check { margin-bottom: 20px; font-size: 0.85rem; color: #555; }
.checkbox-container { display: flex; align-items: flex-start; cursor: pointer; gap: 10px; }
.checkbox-container input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: #000; cursor: pointer; border: 1px solid #ccc; }
.privacy-text a { text-decoration: underline; color: #000; }
.privacy-text a:hover { color: #666; }

/* =============================================
   7. PAGINA DETTAGLIO PROGETTO
   ============================================= */
.project-intro {
    max-width: 800px;
    margin: 0 auto 60px auto;
}
.project-intro p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

/* Galleria Progetti Desktop (Sfalsata) */
.detail-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px;
    margin-bottom: 80px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%); 
    transition: filter 0.3s ease;
}
.gallery-item img:hover { filter: grayscale(0%); }

/* Effetto sfalsato colonna destra */
.detail-gallery .gallery-item:nth-child(even) { margin-top: 80px; }

/* Elemento full width gallery */
.gallery-item.full-width { grid-column: span 2; margin-top: 40px; }

/* Video Gallery */
.gallery-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 800px; 
}

/* Tabella Dati */
.project-data-section {
    max-width: 100%;
    margin: 0 auto;
    padding-top: 20px;
	padding-bottom: 80px;
}
.data-row { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #eee; }
.data-label { font-weight: 700; text-transform: uppercase; font-size: 0.85rem; color: #000; width: 30%; }
.data-value { width: 70%; color: var(--color-text); font-size: 0.95rem; }

/* =============================================
   8. FOOTER & UTILITÀ
   ============================================= */
footer {
    padding: 40px;
    border-top: 1px solid #eee;
    margin-top: 60px;
    font-size: 0.8rem;
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    background-color: #848080;
}

/* Utilità Allineamento Immagini */
.img-bottom img { object-position: bottom center !important; }
.img-top img { object-position: top center !important; }

/* =============================================
   9. MOBILE & RESPONSIVE (MEDIA QUERIES)
   ============================================= */
@media (max-width: 768px) {
    
    /* Layout Generale Mobile */
    header { padding: 0 20px; }
    main { padding: 20px; } /* Meno padding laterale su mobile */
    .hero-overlay h1 { font-size: 2rem; }
    
    /* Menu Mobile (Hamburger) */
    .hamburger { display: block; z-index: 1001; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu {
        position: fixed; left: -100%; top: var(--header-height); gap: 0;
        flex-direction: column; background-color: #fff; width: 100%;
        height: calc(100vh - var(--header-height)); text-align: center;
        transition: 0.3s; border-top: 1px solid #eee; z-index: 1000;
    }
    .nav-menu ul { flex-direction: column; padding-top: 20px; }
    .nav-menu ul li { margin: 15px 0; }
    .nav-menu ul li a { font-size: 1.5rem; font-weight: 300; }
    .nav-menu.active { left: 0; }

    /* Home: Griglia */
    .project-grid { grid-template-columns: 1fr; }
    .project-card.large { grid-column: span 1; }
    .project-card.large .image-wrapper { height: 300px; }

    /* Pagine Interne: Banner */
    .page-banner, .video-h500, .page-banner-big {
        height: 250px !important;
        /* Adattiamo il banner alla larghezza mobile con il nuovo padding */
        width: calc(100% + 40px);
        margin-left: -20px;
    }
    
    .about-container, .contact-container { grid-template-columns: 1fr; }

    /* Pagine Interne: Galleria Progetti (RESETTOTOTALE) */
    .detail-gallery {
        grid-template-columns: 1fr; /* Una colonna */
        /* Torniamo al comportamento standard: niente margini negativi */
        width: 100%; 
        gap: 20px;
        margin: 0 0 40px 0;
    }
    
    .gallery-item {
        margin-bottom: 20px;
        width: 100%;
    }
    
    /* Resetta sfalsamento e full width */
    .detail-gallery .gallery-item:nth-child(even) { margin-top: 0; }
    .gallery-item.full-width { grid-column: span 1; margin-top: 0; }

    /* Tabella Dati Mobile */
    .data-row { flex-direction: column; gap: 5px; }
    .data-label { width: 100%; color: var(--color-light); }
    .data-value { width: 100%; }
}

