/**
 * DFN Booking System 2.0 — Premium Slot Selector Stylesheet
 *
 * Stili moderni per il widget di prenotazione turni orari, basati sulla palette FAI:
 * Verde Scuro (#004b23), Ocra (#c69c3a), grigi soffici e transizioni fluide.
 *
 * @package DFN_Theme
 * @since   2.0.0
 */

.dfn-booking-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

.dfn-booking-title {
    font-size: 18px;
    font-weight: 700;
    color: #004b23;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dfn-booking-section {
    margin-bottom: 24px;
}

.dfn-booking-section:last-of-type {
    margin-bottom: 0;
}

.dfn-widget-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Griglia degli input quantità */
.dfn-qty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .dfn-qty-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.dfn-qty-box {
    border-radius: 12px;
    padding: 20px 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
}

.dfn-qty-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Header interno al box quantità (Label + Prezzo) */
.dfn-qty-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    width: 100%;
}

.dfn-qty-box .dfn-qty-label {
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    opacity: 0.92;
}

.dfn-qty-box .dfn-qty-price {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.dfn-qty-box .dfn-qty-price .woocommerce-Price-amount {
    font-weight: 600;
}

.dfn-qty-box .dfn-qty-unit {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
}

/* Controllo Stepper Numerico */
.dfn-qty-box .dfn-qty-control {
    width: 100%;
    max-width: 170px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.dfn-qty-box .dfn-qty-btn {
    height: 42px;
    width: 42px;
    flex: 0 0 42px;
    font-size: 20px;
    font-weight: 600;
}

.dfn-qty-box input[type="number"] {
    height: 42px;
    font-size: 18px;
    font-weight: 600;
}

/* Dicitura descrittiva sotto lo stepper (es. Intero / Ridotto) */
.dfn-qty-box .dfn-qty-subtext {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-align: center;
    margin-top: -2px;
}

/* Variante Standard (Non Iscritto) - Verde FAI #054238 */
.dfn-qty-box-standard {
    background: #054238;
    border-color: #054238;
}

.dfn-qty-box-standard .dfn-qty-label {
    color: #ffffff;
}

.dfn-qty-box-standard .dfn-qty-price {
    color: #ffffff;
}

.dfn-qty-box-standard .dfn-qty-unit {
    color: rgba(255, 255, 255, 0.85);
}

.dfn-qty-box-standard .dfn-qty-btn {
    background: #f8fafc;
    color: #054238;
}

.dfn-qty-box-standard .dfn-qty-btn:hover {
    background: #e2e8f0;
    color: #054238;
}

.dfn-qty-box-standard input[type="number"] {
    color: #054238;
}

/* Variante FAI (Socio FAI) - Arancio FAI #e74f30 */
.dfn-qty-box-fai {
    background: #e74f30;
    border-color: #e74f30;
}

.dfn-qty-box-fai .dfn-qty-label {
    color: #ffffff;
}

.dfn-qty-box-fai .dfn-qty-price {
    color: #ffffff;
}

.dfn-qty-box-fai .dfn-qty-unit {
    color: rgba(255, 255, 255, 0.85);
}

.dfn-qty-box-fai .dfn-qty-btn {
    background: #f8fafc;
    color: #e74f30;
}

.dfn-qty-box-fai .dfn-qty-btn:hover {
    background: #e2e8f0;
    color: #e74f30;
}

.dfn-qty-box-fai input[type="number"] {
    color: #e74f30;
}

.dfn-qty-control {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.15s ease-in-out;
}

.dfn-qty-control:focus-within {
    border-color: #004b23;
    box-shadow: 0 0 0 2px rgba(0, 75, 35, 0.15);
}

.dfn-qty-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.dfn-qty-btn:hover {
    background: #e2e8f0;
    color: #004b23;
}

.dfn-qty-btn:active {
    background: #cbd5e1;
    color: #004b23;
    transform: scale(0.95);
}

.dfn-qty-minus {
    border-right: 1px solid #e2e8f0;
}

.dfn-qty-plus {
    border-left: 1px solid #e2e8f0;
}

.dfn-qty-box input[type="number"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 4px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #004b23;
    background: transparent;
    box-sizing: border-box;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.dfn-qty-box input[type="number"]:focus {
    outline: none;
}

.dfn-qty-box input[type="number"]::-webkit-outer-spin-button,
.dfn-qty-box input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Input Data */
.dfn-date-input-wrapper {
    position: relative;
}

.dfn-date-input {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.dfn-date-input:focus {
    border-color: #004b23;
    box-shadow: 0 0 0 3px rgba(0, 75, 35, 0.1);
    outline: none;
}

/* Griglia degli Slot Orari */
.dfn-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.dfn-slot-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.dfn-slot-pill:hover:not(.disabled) {
    border-color: #e74f30;
    background: #fffdf5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.dfn-slot-pill.selected {
    background: #004b23 !important;
    border-color: #004b23 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 75, 35, 0.2);
}

.dfn-slot-pill.selected .dfn-slot-time {
    color: #ffffff;
}

.dfn-slot-pill.selected .dfn-slot-availability {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dfn-slot-time {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.dfn-slot-availability {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Stati disponibilità */
.dfn-slot-pill.available .dfn-slot-availability {
    background: #dcfce7;
    color: #166534;
}

.dfn-slot-pill.low .dfn-slot-availability {
    background: #fef9c3;
    color: #854d0e;
}

.dfn-slot-pill.disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.dfn-slot-pill.disabled .dfn-slot-time {
    color: #94a3b8;
}

.dfn-slot-pill.disabled .dfn-slot-availability {
    background: #cbd5e1;
    color: #475569;
}

/* Anteprime & Feedback */
.dfn-feedback-toast {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: dfnFadeIn 0.3s ease-out;
}

@keyframes dfnFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shimmer Loading Effect */
.dfn-slots-shimmer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.dfn-shimmer-pill {
    height: 58px;
    background: #f1f5f9;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.dfn-shimmer-pill::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: dfnShimmer 1.5s infinite;
}

@keyframes dfnShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pulsante Submit (stile FAI) */
.dfn-widget-submit {
    width: 100%;
    height: 48px;
    background: #e74f30;
    color: #ffffff !important;
    border: 2px solid #e74f30;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(231, 79, 48, 0.2);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.dfn-widget-submit:hover:not(:disabled) {
    background: #ffffff;
    color: #e74f30 !important;
    border-color: #e74f30;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(231, 79, 48, 0.28);
}

.dfn-widget-submit:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 480px) {
    .dfn-qty-grid {
        grid-template-columns: 1fr;
    }
}

/* Griglia ed Eventi in Lista / Card */
/* ==========================================================================
   GRIGLIA MASONRY — Lista eventi (locandine e banner misti)
   ========================================================================== */

.dfn-events-grid {
    columns: 4;
    column-gap: 20px;
    padding: 8px 0;
    margin: 20px 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dfn-event-card {
    break-inside: avoid;
    display: block;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dfn-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 75, 35, 0.12);
    border-color: #c69c3a;
}

/* Wrapper immagine: altezza naturale dell'immagine (masonry) */
.dfn-event-card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f1f5f9;
    line-height: 0; /* elimina gap whitespace */
}

/* Immagine a larghezza piena, altezza proporzionale — NIENTE height fissa */
.dfn-event-card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.dfn-event-card:hover .dfn-event-card-image-wrapper img {
    transform: scale(1.03);
}

/* Badge data sovrapposto all'immagine */
/* Badge data e ora sovrapposto all'immagine */
.dfn-event-card-date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #004b23;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dfn-event-card-content {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
}

.dfn-event-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #004b23;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-decoration: none !important;
    display: block;
    transition: color 0.15s;
}

.dfn-event-card-title:hover {
    color: #c69c3a;
}

.dfn-event-card-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.dfn-event-card-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.dfn-event-card-price-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.dfn-event-card-price-item.fai {
    background: #fffdf5;
    border-color: #e74f30;
}

.dfn-event-card-price-val {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2px;
    display: block;
}

.dfn-event-card-price-item.fai .dfn-event-card-price-val {
    color: #004b23;
}

.dfn-event-card-btn {
    display: block;
    text-align: center;
    background: #e74f30;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 11px 16px;
    border: 2px solid #e74f30;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(231, 79, 48, 0.2);
    box-sizing: border-box;
}

.dfn-event-card-btn:hover {
    background: #ffffff;
    color: #e74f30 !important;
    border-color: #e74f30;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 79, 48, 0.25);
}

.dfn-event-card-btn.sold-out {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none;
}
/* Responsive Masonry Layout */
@media (max-width: 1200px) {
    .dfn-events-grid { columns: 3; }
}

@media (max-width: 800px) {
    .dfn-events-grid { columns: 2; column-gap: 16px; }
}

@media (max-width: 500px) {
    .dfn-events-grid { columns: 1; }
}

/* ==========================================================================
   WALL EVENTI PASSATI — Archivio Iniziative DFN
   ========================================================================== */

.dfn-past-wall-section {
    margin-top: 70px;
    padding-top: 20px;
    width: 100%;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Divisore di Sezione con Linee Gradienti e Badge Centrale */
.dfn-past-wall-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto 36px auto;
    width: 100%;
    max-width: 1100px;
}

.dfn-past-divider-line {
    flex: 1;
    height: 3px;
    border-radius: 3px;
}

.dfn-past-divider-line.left {
    background: linear-gradient(90deg, rgba(0, 75, 35, 0.05) 0%, rgba(0, 75, 35, 0.4) 40%, #004b23 85%, #c69c3a 100%);
}

.dfn-past-divider-line.right {
    background: linear-gradient(90deg, #c69c3a 0%, #004b23 15%, rgba(0, 75, 35, 0.4) 60%, rgba(0, 75, 35, 0.05) 100%);
}

.dfn-past-divider-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #004b23;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 9px 22px;
    border-radius: 30px;
    border: 2px solid #004b23;
    box-shadow: 0 4px 16px rgba(0, 75, 35, 0.16), 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Header della sezione con scheda Frosted Glass ad altissima leggibilità */
.dfn-past-wall-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 36px auto;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.dfn-past-wall-title {
    font-size: 26px;
    font-weight: 800;
    color: #004b23;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.dfn-past-wall-subtitle {
    font-size: 14.5px;
    color: #334155;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.dfn-past-wall-grid {
    columns: 4;
    column-gap: 20px;
    padding: 8px 0;
    margin: 10px 0;
    width: 100%;
}

.dfn-past-card {
    break-inside: avoid;
    display: block;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.dfn-past-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.dfn-past-card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f1f5f9;
    line-height: 0;
}

.dfn-past-card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: saturate(0.85);
}

.dfn-past-card:hover .dfn-past-card-image-wrapper img {
    transform: scale(1.03);
    filter: saturate(1);
}

.dfn-past-card-badge-status {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.dfn-past-card-date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.dfn-past-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.dfn-past-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 8px;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dfn-past-card:hover .dfn-past-card-title {
    color: #004b23;
}

.dfn-past-card-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dfn-past-card-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.dfn-past-card:hover .dfn-past-card-rating {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 75, 35, 0.04);
}

.dfn-past-rating-num {
    font-size: 24px;
    font-weight: 900;
    color: #004b23;
    line-height: 1;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.dfn-past-rating-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dfn-past-rating-stars {
    display: flex;
    align-items: center;
    line-height: 1;
}

.dfn-past-rating-label {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dfn-past-rating-label strong {
    color: #0f172a;
    font-weight: 700;
}

.dfn-past-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dfn-past-card-btn:hover {
    background: #004b23;
    border-color: #004b23;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 75, 35, 0.15);
}

@media (max-width: 1200px) {
    .dfn-past-wall-grid { columns: 3; }
}

@media (max-width: 800px) {
    .dfn-past-wall-grid { columns: 2; column-gap: 16px; }
}

@media (max-width: 500px) {
    .dfn-past-wall-grid { columns: 1; }
}


/* ==========================================================================
   Ristrutturazione Layout Full-Width per pagine Evento DFN
   ========================================================================== */
body.dfn-event-single-product .woocommerce-product-gallery,
body.dfn-event-single-product .woocommerce-breadcrumb,
body.dfn-event-single-product .product-sharing,
body.dfn-event-single-product .woocommerce-tabs,
body.dfn-event-single-product .woocommerce-notices-wrapper + h1 {
    display: none !important;
}

body.dfn-event-single-product .site-main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.dfn-event-single-product .site-main .product {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.dfn-event-single-product .summary.entry-summary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Il widget di prenotazione principale resta inscatolato, centrato ed elegante */
body.dfn-event-single-product .dfn-booking-widget {
    width: calc(100% - 32px) !important;
    max-width: 1140px !important;
    margin: 24px auto 40px auto !important;
    box-sizing: border-box;
}

/* Styling premium per la Descrizione del Bene FAI */
.dfn-booking-description-section {
    background: #ffffff;
    padding: 20px 24px !important;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #004b23 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.dfn-booking-description-section div {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #334155;
    line-height: 1.6;
}

/* Griglia a due colonne per info e azioni di prenotazione */
.dfn-booking-two-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 20px;
}

/* Allineamento e proporzioni elementi interni */
.dfn-booking-column-info, .dfn-booking-column-action {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Main image sizing */
.dfn-booking-main-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Thumbnail interaction and hover */
.dfn-gallery-thumb-wrapper:hover {
    border-color: #004b23 !important;
    transform: scale(1.03);
}

/* Responsive per Mobile e Tablet */
@media (max-width: 768px) {
    .dfn-booking-two-columns {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    .dfn-booking-gallery-container {
        margin-bottom: 20px !important;
    }

    .dfn-booking-main-image-wrapper {
        max-height: 300px !important;
    }

    .dfn-booking-main-image-wrapper img {
        max-height: 300px !important;
    }
}

/* Slide active layout e transizioni sfumate */
.dfn-slider-slide {
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

.dfn-slider-slide.active {
    opacity: 1 !important;
    z-index: 2 !important;
}

/* Hover delle frecce di scorrimento */
.dfn-slider-arrow:hover {
    background: #ffffff !important;
    color: #c69c3a !important;
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ==========================================================================
   CUSTOM MODAL DIALOG (SPLIT WARNING)
   ========================================================================== */
.dfn-custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.dfn-custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dfn-custom-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 440px;
    padding: 24px;
    box-sizing: border-box;
    transform: scale(0.95);
    transition: transform 0.2s ease-in-out;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.dfn-custom-modal-overlay.active .dfn-custom-modal {
    transform: scale(1);
}

.dfn-custom-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.dfn-custom-modal-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #d97706;
}

.dfn-custom-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.dfn-custom-modal-body p {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.dfn-custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dfn-modal-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease-in-out;
}

.dfn-modal-btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.dfn-modal-btn-cancel:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.dfn-modal-btn-confirm {
    background-color: #004b23;
    color: #ffffff;
    border: 1px solid #004b23;
}

.dfn-modal-btn-confirm:hover {
    background-color: #002f16;
    border-color: #002f16;
}

/* FAI Chips Styles */
.dfn-fai-chip {
    background: #ffffff;
    border: 1px solid #c69c3a;
    color: #004b23;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin: 2px;
    outline: none;
}

.dfn-fai-chip:hover {
    background: #004b23;
    color: #ffffff;
    border-color: #004b23;
}

.dfn-chip-badge-expired {
    font-size: 9px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
    line-height: 1;
}

.dfn-fai-chip-used {
    opacity: 0.5;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    text-decoration: line-through;
}

.dfn-fai-chip-used:hover {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

/* Indicatore di disponibilità con pallino verde pulsante */
.dfn-availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.dfn-pulsing-dot {
    width: 9px;
    height: 9px;
    background-color: #22c55e;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.dfn-pulsing-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background-color: rgba(34, 197, 94, 0.4);
    animation: dfnPulse 1.8s infinite ease-in-out;
}

@keyframes dfnPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Card Elegante Posti Esauriti */
.dfn-sold-out-card {
    background: #ffffff;
    border: 1px solid #fecaca;
    border-top: 4px solid #dc2626;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.05);
}

.dfn-sold-out-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.dfn-sold-out-title {
    font-size: 18px;
    font-weight: 800;
    color: #991b1b;
    margin: 0 0 8px 0;
}

.dfn-sold-out-text {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}


/* ==========================================================================
   LAYOUT 2 — Locandina verticale + Contenuto a destra
   ========================================================================== */

.dfn-layout2-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 8px;
}

/* Colonna sinistra: locandina */
.dfn-layout2-poster {
    flex: 0 0 55%;
    max-width: 55%;
    position: sticky;
    top: 20px;
}

.dfn-layout2-poster-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.10);
    object-fit: contain;
    background: #f8fafc;
    transition: box-shadow 0.3s ease;
}

.dfn-layout2-poster-img:hover {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dfn-layout2-poster-placeholder {
    width: 100%;
    min-height: 300px;
    background: #f1f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.dfn-layout2-poster-placeholder .dashicons {
    font-size: 52px;
    width: 52px;
    height: 52px;
}

/* Colonna destra: descrizione + form */
.dfn-layout2-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Responsive tablet/mobile: stacking verticale */
@media (max-width: 900px) {
    .dfn-layout2-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .dfn-layout2-poster {
        flex: none;
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
        position: static;
    }

    .dfn-layout2-content {
        width: 100%;
    }
}



/* ==========================================================================
   CARD COUNTDOWN APERTURA PRENOTAZIONI FAI
   ========================================================================== */

.dfn-opening-countdown-card {
    background: #ffffff;
    border: 1px solid #e74f30;
    border-top: 4px solid #004b23;
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 75, 35, 0.08);
}

.dfn-countdown-header {
    margin-bottom: 20px;
}

.dfn-countdown-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.dfn-countdown-title {
    font-size: 18px;
    font-weight: 800;
    color: #004b23;
    margin: 0 0 6px 0;
}

.dfn-countdown-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.dfn-countdown-sub strong {
    color: #1e293b;
}

.dfn-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.dfn-countdown-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dfn-countdown-num {
    font-size: 24px;
    font-weight: 800;
    color: #004b23;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.dfn-countdown-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .dfn-countdown-grid {
        gap: 6px;
    }
    .dfn-countdown-num {
        font-size: 18px;
    }
    .dfn-countdown-label {
        font-size: 9px;
    }
}

/* ==========================================================================
   CARD PRENOTAZIONE VIA EMAIL FAI
   ========================================================================== */

.dfn-email-booking-card {
    background: #ffffff;
    border: 1px solid #e74f30;
    border-top: 4px solid #004b23;
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 75, 35, 0.08);
}

.dfn-email-card-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.dfn-email-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #004b23;
    margin: 0 0 8px 0;
}

.dfn-email-card-text {
    font-size: 13px;
    color: #475569;
    margin: 0 0 18px 0;
    line-height: 1.5;
}

.dfn-email-card-btn {
    display: inline-block;
    background: #004b23;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 75, 35, 0.2);
    word-break: break-all;
}



/* ==========================================================================
   BOTTONE RITORNO AGLI EVENTI (HOME) IN STILE FAI
   ========================================================================== */

.dfn-back-to-events-footer {
    margin-top: 36px;
    margin-bottom: 20px;
    text-align: center;
}

.dfn-btn-back-to-events {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #004b23;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 26px;
    border-radius: 30px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 75, 35, 0.18);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.dfn-btn-back-to-events:hover {
    background: #c69c3a;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 156, 58, 0.3);
}

.dfn-btn-back-to-events .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    line-height: 17px;
    transition: transform 0.15s ease;
}

.dfn-btn-back-to-events:hover .dashicons {
    transform: translateX(-3px);
}

/* ==========================================================================
   CONCLUDED EVENT REVIEWS & STATS CARD
   ========================================================================== */

.dfn-concluded-event-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 24px;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Header Evento Concluso */
.dfn-concluded-header {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dfn-concluded-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.dfn-concluded-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dfn-concluded-pill {
    display: inline-block;
    background: #004b23;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 9999px;
    width: fit-content;
}

.dfn-concluded-date {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Scorecard Recensioni */
.dfn-reviews-scorecard {
    padding: 22px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    background: #ffffff;
}

@media (max-width: 600px) {
    .dfn-reviews-scorecard {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.dfn-scorecard-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dfn-scorecard-num {
    font-size: 46px;
    font-weight: 900;
    line-height: 1;
    color: #004b23;
    letter-spacing: -1.5px;
}

.dfn-scorecard-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dfn-scorecard-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dfn-scorecard-count {
    font-size: 13px;
    color: #475569;
}

.dfn-scorecard-count strong {
    color: #0f172a;
    font-weight: 700;
}

/* Distribuzione stelle (micro barre) */
.dfn-scorecard-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
    border-left: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .dfn-scorecard-bars {
        padding-left: 0;
        border-left: none;
        border-top: 1px dashed #e2e8f0;
        padding-top: 14px;
    }
}

.dfn-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
}

.dfn-bar-label {
    min-width: 22px;
    font-weight: 700;
    color: #475569;
}

.dfn-bar-track {
    flex: 1;
    height: 7px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.dfn-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dfn-bar-qty {
    min-width: 18px;
    text-align: right;
    font-weight: 600;
    color: #94a3b8;
    font-size: 11px;
}

/* ==========================================================================
   CAROSELLO RECENSIONI
   ========================================================================== */

.dfn-reviews-carousel-wrapper {
    padding: 20px 24px 22px;
    background: #fbfcfe;
    position: relative;
}

.dfn-carousel-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.dfn-carousel-heading-icon {
    font-size: 16px;
}

.dfn-carousel-heading-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1e293b;
}

.dfn-carousel-counter {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #004b23;
    background: #eaf7ea;
    padding: 2px 10px;
    border-radius: 12px;
}

.dfn-reviews-carousel {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.dfn-carousel-track {
    position: relative;
    width: 100%;
}

.dfn-carousel-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.dfn-carousel-slide.is-active {
    display: block;
    opacity: 1;
    animation: dfnSlideFade 0.35s ease-out;
}

@keyframes dfnSlideFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dfn-review-quote-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    position: relative;
}

.dfn-review-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dfn-review-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dfn-review-date {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.dfn-review-quote-body {
    position: relative;
    margin-bottom: 16px;
    padding: 0 4px;
}

.dfn-quote-mark {
    font-family: Georgia, serif;
    font-size: 26px;
    line-height: 1;
    color: #cbd5e1;
    user-select: none;
}

.dfn-quote-mark.left {
    margin-right: 4px;
}

.dfn-quote-mark.right {
    margin-left: 4px;
}

.dfn-review-text {
    margin: 0;
    display: inline;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    font-style: italic;
    word-break: break-word;
}

/* Autore Recensione (Anonimizzato per privacy: Nome + Iniziale Cognome) */
.dfn-review-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.dfn-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004b23 0%, #007034 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 75, 35, 0.25);
    flex-shrink: 0;
}

.dfn-author-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dfn-author-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.dfn-author-badge {
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Controlli di navigazione Carosello */
.dfn-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.dfn-concluded-event-box .dfn-carousel-nav,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav,
button.dfn-carousel-nav {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #004b23 !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.dfn-concluded-event-box .dfn-carousel-nav:hover,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav:hover,
button.dfn-carousel-nav:hover {
    background-color: #004b23 !important;
    background: #004b23 !important;
    color: #ffffff !important;
    border-color: #004b23 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 12px rgba(0, 75, 35, 0.25) !important;
}

.dfn-concluded-event-box .dfn-carousel-nav:focus,
.dfn-concluded-event-box .dfn-carousel-nav:active,
.dfn-concluded-event-box .dfn-carousel-nav:focus-visible,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav:focus,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav:active,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav:focus-visible,
button.dfn-carousel-nav:focus,
button.dfn-carousel-nav:active {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #004b23 !important;
    border-color: #004b23 !important;
    box-shadow: 0 0 0 3px rgba(0, 75, 35, 0.2) !important;
    outline: none !important;
}

.dfn-concluded-event-box .dfn-carousel-nav:focus:hover,
.dfn-reviews-carousel-wrapper .dfn-carousel-nav:focus:hover {
    background-color: #004b23 !important;
    background: #004b23 !important;
    color: #ffffff !important;
    border-color: #004b23 !important;
}

.dfn-carousel-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dfn-concluded-event-box .dfn-carousel-dot,
.dfn-reviews-carousel-wrapper .dfn-carousel-dot,
button.dfn-carousel-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: #cbd5e1 !important;
    background: #cbd5e1 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.dfn-concluded-event-box .dfn-carousel-dot:hover:not(.is-active),
.dfn-reviews-carousel-wrapper .dfn-carousel-dot:hover:not(.is-active) {
    background-color: #94a3b8 !important;
    background: #94a3b8 !important;
}

.dfn-concluded-event-box .dfn-carousel-dot.is-active,
.dfn-reviews-carousel-wrapper .dfn-carousel-dot.is-active {
    background-color: #004b23 !important;
    background: #004b23 !important;
    width: 22px !important;
    border-radius: 6px !important;
}

.dfn-concluded-event-box .dfn-carousel-dot:focus,
.dfn-reviews-carousel-wrapper .dfn-carousel-dot:focus {
    outline: none !important;
}

.dfn-no-reviews-box {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   CONCLUDED EVENT POST-EVENT PHOTO WALL & LIGHTBOX
   ========================================================================== */

/* Prevenzione scroll quando la lightbox è attiva */
body.dfn-lightbox-open {
    overflow: hidden !important;
}

.dfn-post-gallery-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 70px clamp(20px, 4vw, 80px) !important;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    position: relative;
    box-sizing: border-box;
}

/* Header Sezione Ricordi */
.dfn-post-gallery-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dfn-post-gallery-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    color: #004b23;
    border: 1px solid #bbf7d0;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 75, 35, 0.08);
}

.dfn-badge-icon {
    font-size: 14px;
    line-height: 1;
}

.dfn-post-gallery-title {
    font-size: 32px;
    font-weight: 800;
    color: #004b23;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.dfn-post-gallery-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0 auto;
    max-width: 640px;
    line-height: 1.6;
}

/* Griglia Masonry Fluida - Ora Full-Width su 4 colonne! */
.dfn-post-gallery-masonry {
    column-count: 4;
    column-gap: 24px;
    column-fill: balance;
    width: 100%;
    max-width: 1720px;
    margin: 0 auto 16px auto;
}

@media (max-width: 1400px) {
    .dfn-post-gallery-masonry {
        column-count: 3;
        column-gap: 20px;
    }
}

@media (max-width: 900px) {
    .dfn-post-gallery-masonry {
        column-count: 2;
        column-gap: 16px;
    }
    .dfn-post-gallery-title {
        font-size: 26px;
    }
}

@media (max-width: 560px) {
    .dfn-post-gallery-masonry {
        column-count: 1;
        column-gap: 0;
    }
    .dfn-post-gallery-title {
        font-size: 22px;
    }
    .dfn-post-gallery-section {
        padding: 45px 16px !important;
    }
}

/* Singolo Elemento Foto Masonry */
.dfn-gallery-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 20px;
    display: block;
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
    outline: none;
}

.dfn-gallery-item:hover,
.dfn-gallery-item:focus-visible {
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 14px 30px rgba(0, 75, 35, 0.2);
}

.dfn-gallery-item:focus-visible {
    box-shadow: 0 0 0 3px #004b23, 0 14px 30px rgba(0, 75, 35, 0.25);
}

.dfn-gallery-thumb-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    background: #0f172a;
}

.dfn-gallery-thumb {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.dfn-gallery-item:hover .dfn-gallery-thumb,
.dfn-gallery-item:focus-visible .dfn-gallery-thumb {
    transform: scale(1.06);
}

/* Overlay Dinamico su Hover */
.dfn-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 45, 20, 0.35) 45%, rgba(0, 75, 35, 0.88) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    text-align: center;
    pointer-events: none;
}

.dfn-gallery-item:hover .dfn-gallery-overlay,
.dfn-gallery-item:focus-visible .dfn-gallery-overlay {
    opacity: 1;
}

.dfn-gallery-zoom-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin: 0;
    transform: scale(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dfn-gallery-item:hover .dfn-gallery-zoom-icon,
.dfn-gallery-item:focus-visible .dfn-gallery-zoom-icon {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.32);
}

.dfn-gallery-caption-preview {
    display: none !important;
}

.dfn-gallery-video-thumb {
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dfn-gallery-video-thumb.is-loaded {
    opacity: 1;
}

/* ==========================================================================
   LIGHTBOX MODAL A SCHERMO INTERO
   ========================================================================== */

.dfn-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.dfn-lightbox-modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.dfn-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 10, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dfn-lightbox-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px 40px;
    box-sizing: border-box;
    user-select: none;
}

@media (max-width: 768px) {
    .dfn-lightbox-dialog {
        padding: 50px 14px 30px;
    }
}

/* Pulsanti Lightbox */
.dfn-lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    padding: 0;
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dfn-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.dfn-lightbox-btn:focus-visible {
    box-shadow: 0 0 0 3px #22c55e, 0 4px 16px rgba(0, 0, 0, 0.4);
}

.dfn-lightbox-close {
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
}

.dfn-lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
}

.dfn-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.08);
}

.dfn-lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
}

.dfn-lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}

@media (max-width: 768px) {
    .dfn-lightbox-close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }
    .dfn-lightbox-prev {
        left: 8px;
        width: 42px;
        height: 42px;
    }
    .dfn-lightbox-next {
        right: 8px;
        width: 42px;
        height: 42px;
    }
}

/* Contenuto Immagine */
.dfn-lightbox-content {
    position: relative;
    max-width: 100%;
    max-height: calc(85vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.dfn-lightbox-image {
    max-width: 100%;
    max-height: calc(85vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.dfn-lightbox-image.is-loaded {
    transform: scale(1);
    opacity: 1;
}

/* Video Player nel Lightbox */
.dfn-lightbox-video {
    width: 100%;
    max-width: min(920px, 90vw);
    max-height: calc(85vh - 60px);
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.8);
    outline: none;
    background: #000000;
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
}

.dfn-lightbox-video.is-loaded {
    transform: scale(1);
    opacity: 1;
}

/* Elementi Video nella Griglia Masonry */
.dfn-gallery-item--video {
    position: relative;
}

.dfn-gallery-video-thumb {
    width: 100%;
    height: auto;
    min-height: 160px;
    display: block;
    object-fit: cover;
    background: #0f172a;
}

.dfn-gallery-video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.dfn-gallery-play-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin: 0;
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.dfn-gallery-play-icon svg {
    margin-left: 3px;
}

.dfn-gallery-item:hover .dfn-gallery-play-icon,
.dfn-gallery-item:focus-visible .dfn-gallery-play-icon {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.38);
    border-color: #ffffff;
}


/* Spinner animato */
.dfn-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

.dfn-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: dfnSpin 0.8s linear infinite;
}

@keyframes dfnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer: Contatore e Didascalia */
.dfn-lightbox-footer {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    text-align: center;
    z-index: 5;
    max-width: 800px;
}

.dfn-lightbox-counter {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
}

.dfn-lightbox-caption {
    font-size: 14px;
    font-weight: 500;
    color: #f1f5f9;
    line-height: 1.5;
    padding: 0 10px;
}





