/* =========================================
   GALLERIA, LIGHTBOX, CHI SIAMO E POLICY
   ========================================= */

main:has(.policy-list) {
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.policy-header {
    width: 100%;
    max-width: 960px;
    margin: 0.5rem auto 2.5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.policy-header h1.otherTitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.3rem, 4.8vw, 3.8rem);
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-shadow: 1px 1px 2px rgba(217, 203, 191, 0.7);
}

.policy-kicker {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: #b67b0d;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0.9rem auto 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.policy-kicker::before,
.policy-kicker::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    background-color: #b67b0d;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Scheda contenitore dei testi legali */
.policy-list {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 2.75rem;
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(182, 123, 13, 0.22);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.06);
    text-align: left;
}

.policy-list .policy-intro {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.08rem, 1.4vw, 1.22rem);
    font-style: italic;
    color: #4a3f35;
    line-height: 1.8;
    padding: 1.1rem 1.25rem;
    margin-bottom: 2rem;
    border-left: 3px solid #b67b0d;
    background-color: rgba(253, 247, 238, 0.65);
    border-radius: 0 6px 6px 0;
}

.policy-list h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 2.2rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(182, 123, 13, 0.3);
}

.policy-list h2:first-child {
    margin-top: 0;
}

.policy-list h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.18rem;
    font-weight: 600;
    color: #b67b0d;
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;
}

.policy-list p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: #4a3f35;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-shadow: none;
}

.policy-list strong,
.policy-list b {
    color: var(--primary-color);
    font-weight: 700;
}

.policy-list a {
    color: #b67b0d;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(182, 123, 13, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.policy-list a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.policy-internal-list {
    list-style-position: outside;
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.03rem;
    font-weight: 400;
    color: #4a3f35;
    line-height: 1.85;
}

.policy-internal-list li {
    margin-bottom: 0.35rem;
}

.policy-internal-list li::marker {
    color: #b67b0d;
}

@media (max-width: 1024px) {
    .policy-kicker {
        letter-spacing: 2.5px;
        gap: 0.5rem;
    }

    .policy-kicker::before,
    .policy-kicker::after {
        display: none;
    }

    .policy-list {
        padding: 1.6rem 1.25rem;
    }

    .policy-list h2 {
        margin-top: 1.75rem;
    }
}

/* =========================================
   CHI SIAMO (Coordinato con Home e Contatti)
   ========================================= */

.whoweare-section,
.whoweare-shop-section,
.whoweare-brochure-section {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 3.5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.whoweare-section {
    padding-top: 1rem;
    gap: 2rem;
}

.whoweare-section h1.otherTitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(217, 203, 191, 0.7);
}

.whoweare-content {
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

/* Primo paragrafo incorniciato con le linee dorate come la frase in Home */
.whoweare-content .whoweare-lead {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.15rem, 1.6vw, 1.38rem);
    font-weight: 400;
    font-style: italic;
    color: #4a3f35;
    line-height: 1.85;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(182, 123, 13, 0.35);
    border-bottom: 1px solid rgba(182, 123, 13, 0.35);
    padding: 1.5rem 1.2rem;
    margin: 0;
    text-shadow: none;
}

.whoweare-content p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.08rem, 1.4vw, 1.25rem);
    font-weight: 400;
    color: #4a3f35;
    line-height: 1.85;
    letter-spacing: 0.2px;
    margin: 0;
    text-align: center;
    text-shadow: none;
}

/* Titoli delle due sezioni sottostanti con filetti dorati */
.whoweare-shop-section .otherSubtitle,
.whoweare-brochure-section .otherSubtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    color: #b67b0d;
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0 auto 2rem auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: none;
}

.whoweare-shop-section .otherSubtitle::before,
.whoweare-shop-section .otherSubtitle::after,
.whoweare-brochure-section .otherSubtitle::before,
.whoweare-brochure-section .otherSubtitle::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    background-color: #b67b0d;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Sezione 1 sotto: Foto del negozio */
.whoweare-shop-wrapper {
    width: 100%;
    max-width: 620px;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(182, 123, 13, 0.22);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.whoweare-shop-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(182, 123, 13, 0.14);
    border-color: rgba(182, 123, 13, 0.5);
}

.whoweare-shop-wrapper #shop {
    width: 100% !important;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Sezione 2 sotto: Griglia Card Volantino & Biglietto (stile uguale a contacts-grid) */
.whoweare-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2.5rem;
    width: 100%;
    max-width: 1020px;
    margin: 0 auto;
}

.whoweare-card {
    flex: 1 1 360px;
    max-width: 440px;
    width: 100%;
    padding: 1.75rem;
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(182, 123, 13, 0.22);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.whoweare-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(182, 123, 13, 0.14);
    border-color: rgba(182, 123, 13, 0.5);
}

.whoweare-card img {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
}

/* Pulsanti Download coordinati con Home e Contatti */
.whoweare-image-button {
    width: 100%;
    max-width: 380px;
    margin-top: auto;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background-color: #b67b0d;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: none;
    border: 2px solid #b67b0d;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
    box-shadow: none;
    cursor: pointer;
}

.whoweare-image-button:hover {
    background-color: #9e690a;
    border-color: #9e690a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 123, 13, 0.3);
}

/* =========================================
   GALLERY 
   ========================================= */

.catalog-header {
    width: 100%;
    max-width: 1120px;
    margin: 0.5rem auto 2.5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.catalog-header h1.otherTitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(217, 203, 191, 0.7);
}

.catalog-kicker {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    color: #b67b0d;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0.9rem auto 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.catalog-kicker::before,
.catalog-kicker::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    background-color: #b67b0d;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Schede Categoria (Sospensioni, Applique, Lampioni, ecc.) */
main:has(.catalog-header) .gallery {
    width: 100%;
    max-width: 1120px;
    padding: 2.25rem 2rem;
    margin: 0 auto 2.8rem auto;
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(182, 123, 13, 0.22);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.06);
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

main:has(.catalog-header) .gallery:hover {
    border-color: rgba(182, 123, 13, 0.5);
    box-shadow: 0 12px 28px rgba(182, 123, 13, 0.14);
}

/* Titolo Categoria dentro la scheda */
main:has(.catalog-header) .gallery-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    font-style: normal;
    color: var(--primary-color);
    margin: 0 auto 2rem auto;
    padding: 0 0 0.4rem 0;
    border-left: none;
    border-bottom: 2px solid #b67b0d;
    display: inline-block;
    text-align: center;
    text-shadow: none;
}

/* Griglia 3x3 perfetta su Desktop */
main:has(.catalog-header) .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

main:has(.catalog-header) .gallery-item {
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f7efe4;
    border: 1px solid rgba(182, 123, 13, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

main:has(.catalog-header) .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

main:has(.catalog-header) .gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(182, 123, 13, 0.22);
    border-color: #b67b0d;
}

main:has(.catalog-header) .gallery-item:hover img {
    transform: scale(1.05);
}

/* Box finale CTA */
.catalog-cta-box {
    width: 100%;
    max-width: 1120px;
    margin: 0.5rem auto 2.5rem auto;
    padding: 2.2rem 2rem;
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(182, 123, 13, 0.22);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.06);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.catalog-cta-box p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-style: italic;
    color: #4a3f35;
    line-height: 1.75;
    max-width: 780px;
    margin: 0;
}

.catalog-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background-color: #b67b0d;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-decoration: none;
    border: 2px solid #b67b0d;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.catalog-cta-btn:hover {
    background-color: #9e690a;
    border-color: #9e690a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 123, 13, 0.3);
}

/* Tablet (2 colonne) */
@media (min-width: 600px) and (max-width: 1024px) {
    main:has(.catalog-header) .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 18px;
    }
}

/* Mobile (1 colonna) */
@media (max-width: 599px) {
    .catalog-kicker {
        letter-spacing: 2.5px;
        gap: 0.5rem;
    }

    .catalog-kicker::before,
    .catalog-kicker::after {
        display: none;
    }

    main:has(.catalog-header) .gallery {
        padding: 1.5rem 1rem;
        margin-bottom: 1.8rem;
    }

    main:has(.catalog-header) .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .catalog-cta-box {
        padding: 1.5rem 1.2rem;
    }

    .catalog-cta-btn {
        width: 100%;
        max-width: 320px;
    }
}

/* =========================================
   LIGHTBOX OVERLAY
   ========================================= */

.lightbox {
    display: none;
    position: fixed;
    z-index: 2147483647;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(10, 10, 10, 0.94);
    justify-content: center;
    align-items: center;
    padding: 20px;
    touch-action: none;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    font-size: 2.8rem;
    color: white;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--secondary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 2.8rem;
    cursor: pointer;
    padding: 0 15px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    z-index: 1001;
    transition: color 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--secondary-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =========================================
   TABLET GALLERY (2 colonne)
   ========================================= */

@media (min-width: 600px) and (max-width: 1024px) {
    .gallery-grid {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 30px) !important;
        max-width: calc(50% - 30px) !important;
        margin-bottom: 20px;
    }
}

/* =========================================
   MOBILE (Chi Siamo, Gallery, Lightbox)
   ========================================= */

@media (max-width: 1024px) {
    .whoweare-section,
    .whoweare-shop-section,
    .whoweare-brochure-section {
        margin-bottom: 2.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .whoweare-content .whoweare-lead {
        padding: 1.2rem 0.6rem;
        font-size: 1.1rem;
    }

    .whoweare-content p {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .whoweare-shop-section .otherSubtitle::before,
    .whoweare-shop-section .otherSubtitle::after,
    .whoweare-brochure-section .otherSubtitle::before,
    .whoweare-brochure-section .otherSubtitle::after {
        display: none;
    }

    .whoweare-shop-wrapper {
        padding: 0.75rem;
    }

    .whoweare-cards-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.75rem;
    }

    .whoweare-card {
        flex: 1 1 100%;
        max-width: 420px;
        padding: 1.25rem;
    }

    .whoweare-image-button {
        width: 100%;
    }

    .gallery {
        padding: 20px 14px;
    }

    .gallery-grid {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item {
        max-width: 100%;
        flex: 1 1 auto;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0 8px;
    }

    .lightbox-close {
        top: 10px;
        right: 25px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}