/* Theme Name: Ambasciatori 
Template Name: New York
*/

/* ============== HERO SECTION (New York) ================ */
.hero-new-york {
    position: relative;
    color: var(--text-white);
    padding: 120px 0 100px;
    text-align: center;
}

.hero-new-york .hero-bg,
.hero-new-york .hero-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
    background: #0d1b31;
}

.hero-new-york .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 43, 43, 0.5);
    z-index: -1;
}

.hero-new-york .hero-content {
    position: relative;
    z-index: 1;
}

.hero-new-york .hero-subtitle {
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-new-york .hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-new-york .hero-desc {
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
}

/* ============== INTRO SECTION ================ */
.intro-ny-section {
    padding: 80px 0 40px;
    background-color: #fff;
}

.text-container {
    max-width: 900px;
    margin: 0 auto;
}

.intro-ny-section h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 30px;
}

.intro-ny-section p {
    font-size: 15px;
    margin-bottom: 20px;
    color: #444;
    line-height: 1.7;
}

/* ============== GALLERY SECTION ================ */
.gallery-section {
    padding: 50px 0;
    background-color: #fff;
    overflow: hidden;
}

/* Griglia Desktop */
.ny-masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ny-masonry-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ny-masonry-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

/* Immagine centrale a tutta altezza su Desktop */
.ny-masonry-col.full-height .ny-masonry-img {
    height: 100%;
    min-height: 520px;
}

/* ============== PROGRAMMA SECTION ================ */
.programma-section {
    padding: 80px 0;
    background-color: #fff;
}

.programma-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.programma-text {
    flex: 1.2;
}

.programma-text h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 25px;
}

.programma-text p {
    font-size: 15px;
    margin-bottom: 20px;
    color: #444;
    line-height: 1.7;
}

.programma-list {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    list-style: none;
    padding-left: 0;
}

.programma-list li {
    margin-bottom: 10px;
}

.programma-image {
    flex: 1;
}

.placeholder-img-big {
    width: 100%;
    height: 350px;
    background-color: #fcfcfc;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    font-weight: 800;
    color: #333;
}

/* ============== FORM SECTION ================ */
.contact-section {
    padding: 80px 0;
    background-color: #fff;
}

.contact-section .section-heading {
    margin-bottom: 40px;
}

.contact-section .section-heading h2 {
    color: var(--primary-color);
    font-size: 32px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.associazione-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    background-color: #fcfcfc;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-dark);
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 18px;
    font-size: 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

/* ================= MEDIA QUERIES (Sotto i 992px) ================= */
@media (max-width: 992px) {
    .programma-container {
        flex-direction: column;
    }
}

/* ==========================================
   MOBILE SINGLE SLIDER - QUADRATO (Sotto i 768px)
   ========================================== */
@media (max-width: 768px) {
    .gallery-section, .programma-section {
    padding: 20px 0;
    }
    .gallery-slider-mobile {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        display: flex;
        padding: 0 20px 20px;
        margin: 0 -20px;
        -webkit-overflow-scrolling: touch;
    }

    .ny-masonry-grid {
        display: flex !important; 
        gap: 15px;
        width: max-content;
    }

    /* Annulla la struttura a colonne per liberare le immagini singole */
    .ny-masonry-col {
        display: contents; 
    }

    /* Ogni link (contenitore immagine) diventa un quadrato */
    .ny-masonry-grid a {
        flex: 0 0 75vw; /* Larghezza della slide */
        aspect-ratio: 1 / 1; /* FORZA IL QUADRATO */
        scroll-snap-align: center;
        display: block;
        overflow: hidden; /* Taglia ciò che esce dal quadrato */
        border-radius: 12px;
    }

    .ny-masonry-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* TAGLIA l'immagine per riempire il quadrato senza distorsioni */
        object-position: center; /* Mantiene il focus al centro dell'immagine */
        margin-bottom: 0;
        border-radius: 12px;
    }

    /* Nascondi scrollbar */
    .gallery-slider-mobile::-webkit-scrollbar { display: none; }
    .gallery-slider-mobile { -ms-overflow-style: none; scrollbar-width: none; }
}

/* Mantieni la griglia standard per desktop sopra i 768px */
@media (min-width: 769px) {
    .ny-masonry-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .ny-masonry-col { display: flex; flex-direction: column; gap: 20px; }
}