/* ── Home feed (feed.php) ─────────────────────────────────────────────── */

.feed-page {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px 110px; /* spazio per la bottom nav */
    box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.feed-hero {
    padding: 8px 0 22px;
}

.feed-hero-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 26px;
    color: var(--mc-text, #fff);
    margin: 0 0 8px;
    line-height: 1.2;
}

.feed-hero-subtitle {
    font-size: 15px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.65));
    margin: 0;
    line-height: 1.45;
}

.feed-hero--guest .feed-hero-cta {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    font-family: 'Agrandir Grand Heavy', sans-serif;
    text-align: center;
}

.feed-guest-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.feed-guest-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mc-overlay-08, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.85));
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.feed-guest-pill i {
    color: #FF7601;
    font-size: 11px;
}

/* ── Sezioni ──────────────────────────────────────────────────────────── */
.feed-section {
    margin-bottom: 34px;
}

.feed-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--mc-border, rgba(255, 255, 255, 0.08));
    padding-bottom: 10px;
}

.feed-section-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 18px;
    color: var(--mc-text, #fff);
    margin: 0;
}

.feed-section-link {
    font-size: 13px;
    color: #FF7601;
    white-space: nowrap;
    flex-shrink: 0;
}

.feed-section-link i {
    font-size: 10px;
    margin-left: 2px;
}

/* ── Hint profilazione incompleta ─────────────────────────────────────── */
.feed-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(255, 118, 1, 0.10);
    border: 1px solid rgba(255, 118, 1, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.85));
    margin-bottom: 14px;
}

.feed-hint i { color: #FF7601; }

.feed-hint-link {
    color: #FF7601;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.feed-empty {
    text-align: center;
    padding: 28px 16px;
    border: 1px dashed var(--mc-border, rgba(255, 255, 255, 0.18));
    border-radius: 14px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.6));
}

.feed-empty i {
    font-size: 26px;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.3));
    margin-bottom: 8px;
}

.feed-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.feed-empty-cta {
    display: inline-block;
    margin-top: 14px;
}

/* ── Griglia persone (card compatte, stile eventi) ───────────────────── */
.feed-users-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

/* Override della user-card generica (map/bookmarks): qui è una riga densa */
/* Feedback visivo immediato: card premuta in attesa apertura drawer */
.mc-card-loading {
    pointer-events: none;
    opacity: 0.7;
    transform: scale(0.98);
    transition: opacity 0.15s, transform 0.15s;
}

.feed-user-card.user-card {
    height: auto;
    min-height: 0;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    background: var(--mc-overlay-04, rgba(255, 255, 255, 0.04));
}

.feed-user-card.user-card:hover {
    transform: none;
    box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
    .feed-user-card.user-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    .feed-event-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

.feed-user-card .user-card-avatar {
    width: 48px;
    height: 48px !important;
    min-height: 48px;
    align-self: center;
    border-radius: 12px;
    background: #2a2a2a;
}

.feed-user-card .user-card-avatar img {
    border-radius: 12px;
}

.feed-user-card .user-card-avatar-placeholder {
    font-size: 17px;
    border-radius: 12px;
    /* Tint brand più soft: meno “blocco neon” rispetto alla card mappa */
    background: linear-gradient(145deg, rgba(255, 118, 1, 0.92), rgba(255, 154, 77, 0.78));
}

.feed-user-card .user-card-info {
    padding: 0;
    gap: 8px;
    justify-content: center;
    flex-direction: row;
    align-items: center;
}

.feed-user-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.feed-user-card .user-card-name {
    font-size: 14px;
    line-height: 1.25;
}

.feed-user-card .user-card-family {
    font-size: 12px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.55));
}

.feed-user-card .user-card-distance {
    margin-top: 4px;
    font-size: 12px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.65));
    font-weight: 500;
}

.feed-match-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 9px;
    line-height: 1.35;
    white-space: nowrap;
}

/* ── Card eventi ──────────────────────────────────────────────────────── */
.feed-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.feed-event-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--mc-overlay-04, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    padding: 14px 16px;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    text-decoration: none;
}

.feed-event-card:hover {
    transform: none;
    box-shadow: none;
}

.feed-event-card-body {
    flex: 1;
    min-width: 0;
}

.feed-event-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 14px;
    color: var(--mc-text, #f0f0f0);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.6));
}

.feed-event-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.feed-event-meta--secondary {
    margin-top: 3px;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.4));
}

.feed-event-meta i {
    font-size: 11px;
    margin-right: 3px;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.35));
}

.feed-event-card-chevron {
    flex-shrink: 0;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.3));
    font-size: 13px;
}

/* ── Card blog ────────────────────────────────────────────────────────── */
.feed-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.feed-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--mc-overlay-04, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    overflow: hidden;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feed-blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.feed-blog-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #2a2a2a;
}

.feed-blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.32s ease;
}

.feed-blog-card:hover .feed-blog-card-image img {
    transform: scale(1.04);
}

.feed-blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}

.feed-blog-card-date {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.4));
    margin-bottom: 6px;
}

.feed-blog-card-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: var(--mc-text, #f0f0f0);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-blog-card-excerpt {
    font-size: 12px;
    line-height: 1.45;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.55));
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-blog-card-more {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    color: #FF7601;
}

.feed-blog-card-more i {
    font-size: 10px;
    margin-left: 3px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .feed-users-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .feed-users-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .feed-user-card.user-card {
        padding: 10px 14px;
        gap: 12px;
    }

    .feed-user-card .user-card-avatar {
        width: 46px;
        height: 46px !important;
        min-height: 46px;
        border-radius: 12px;
    }

    .feed-user-card .user-card-avatar img,
    .feed-user-card .user-card-avatar-placeholder {
        border-radius: 12px;
    }

    .feed-user-card .user-card-avatar-placeholder {
        font-size: 16px;
    }

    .feed-user-card .user-card-info {
        gap: 12px;
    }

    .feed-user-card .user-card-name {
        font-size: 15px;
    }

    .feed-user-card .user-card-family {
        font-size: 12px;
    }

    .feed-user-card .user-card-distance {
        margin-top: 3px;
        font-size: 12px;
    }

    .feed-match-badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    .feed-blog-grid {
        grid-template-columns: 1fr;
    }

    .feed-hero-title {
        font-size: 22px;
    }

    /* Card eventi compatte su mobile */
    .feed-event-card {
        gap: 10px;
        padding: 12px 14px;
    }

    /* Titolo su 2 righe invece di ellissi immediata */
    .feed-event-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.3;
    }

    .feed-event-meta {
        font-size: 11px;
        gap: 3px 10px;
    }

    .feed-event-card-chevron {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .feed-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Tour "Come funziona" (primo accesso Home) ───────────────────────── */
body.feed-tour-open {
    overflow: hidden;
}

.feed-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
    background: var(--mc-bg-overlay, rgba(0, 0, 0, 0.78));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: feedTourFadeIn 0.28s ease;
}

.feed-tour-overlay.is-closing {
    animation: feedTourFadeOut 0.24s ease forwards;
}

@keyframes feedTourFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes feedTourFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.feed-tour-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: min(92vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--mc-bg-elevated, #141414);
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--mc-shadow-md, 0 20px 60px rgba(0, 0, 0, 0.45));
    animation: feedTourCardIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes feedTourCardIn {
    from { transform: translateY(22px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.feed-tour-progress {
    height: 3px;
    width: 100%;
    background: var(--mc-overlay-08, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.feed-tour-progress-bar {
    display: block;
    height: 100%;
    width: 20%;
    background: #FF7601;
    border-radius: 0 2px 2px 0;
    transition: width 0.32s ease;
}

.feed-tour-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 10px;
    flex-shrink: 0;
}

.feed-tour-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #FF7601;
    line-height: 1;
}

.feed-tour-badge i {
    font-size: 11px;
}

.feed-tour-skip {
    background: var(--mc-overlay-08, rgba(255, 255, 255, 0.08));
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.72));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    border-radius: var(--mc-radius-pill, 999px);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--mc-transition-fast, 0.15s ease), color var(--mc-transition-fast, 0.15s ease);
}

.feed-tour-skip:hover {
    color: var(--mc-text, #fff);
    background: var(--mc-overlay-12, rgba(255, 255, 255, 0.12));
}

.feed-tour-viewport {
    overflow: hidden;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.feed-tour-track {
    display: flex;
    width: 100%;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.feed-tour-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    display: flex;
    flex-direction: column;
}

.feed-tour-slide-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--mc-overlay-06, rgba(255, 255, 255, 0.06));
    overflow: hidden;
    flex-shrink: 0;
}

.feed-tour-slide-image::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28%;
    background: linear-gradient(to top, var(--mc-bg-elevated, #141414), transparent);
    pointer-events: none;
}

.feed-tour-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

.feed-tour-slide-copy {
    padding: 6px 22px 4px;
}

.feed-tour-slide-title {
    font-family: var(--mc-font-display, 'Agrandir Grand Heavy', sans-serif);
    font-size: 22px;
    color: var(--mc-text, #fff);
    margin: 0 0 8px;
    line-height: 1.2;
}

.feed-tour-slide-body {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.72));
}

.feed-tour-footer {
    padding: 14px 20px 20px;
    flex-shrink: 0;
}

.feed-tour-step {
    margin: 0 0 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.45));
}

.feed-tour-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.feed-tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--mc-overlay-12, rgba(255, 255, 255, 0.25));
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}

.feed-tour-dot.is-active {
    background: #FF7601;
    width: 22px;
    border-radius: 999px;
    transform: none;
}

.feed-tour-actions {
    display: flex;
    gap: 10px;
}

.feed-tour-actions .mc-cta {
    flex: 1;
    justify-content: center;
    text-align: center;
}

.feed-tour-prev:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 400px) {
    .feed-tour-slide-title {
        font-size: 19px;
    }
    .feed-tour-slide-copy {
        padding: 4px 16px 2px;
    }
    .feed-tour-actions {
        flex-direction: column-reverse;
    }
}

@media (max-height: 700px) {
    .feed-tour-slide-image {
        aspect-ratio: 16 / 9;
    }
    .feed-tour-slide-title {
        font-size: 18px;
    }
    .feed-tour-slide-body {
        font-size: 13.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-tour-overlay,
    .feed-tour-card,
    .feed-tour-overlay.is-closing,
    .feed-tour-track,
    .feed-tour-progress-bar,
    .feed-tour-dot {
        animation: none !important;
        transition: none !important;
    }
}

/* ── Drawer dettaglio (profile-drawer.js) ─────────────────────────────────── */
.feed-user-card,
.feed-event-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#profile-card-overlay,
#event-details-modal.event-modal-overlay {
    /* Sotto la tab bar (10050), sopra il resto della pagina */
    z-index: 10020;
}

.feed-profile-match-wrap {
    margin-top: 6px;
}

.feed-profile-match-pill {
    font-size: 12px;
}

.feed-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.feed-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--mc-overlay-04, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.08));
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.75));
}

.feed-detail-chip i {
    color: #FF7601;
    font-size: 10px;
}

.feed-detail-loading {
    text-align: center;
    padding: 32px 0;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.5));
}

.feed-detail-loading--inline {
    padding: 16px 0 4px;
    font-size: 13px;
}

.feed-detail-error {
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.7));
    font-size: 14px;
    margin: 12px 0;
}

.feed-detail-location-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.feed-detail-location-link:hover {
    color: var(--mc-text, #fff);
}

.feed-detail-more-link {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Tab Feed / Eventi ─────────────────────────────────────────────────── */
.feed-tabs-bar.mc-tabs-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--mc-border, rgba(255, 255, 255, 0.1));
    margin: 4px 0 22px;
    padding: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.feed-tabs-bar.mc-tabs-bar::-webkit-scrollbar { display: none; }

.feed-tabs-bar .mc-tab-btn {
    flex: 1;
    justify-content: center;
    background: none;
    border: none;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.5));
    font-size: 14px;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
}

.feed-tabs-bar .mc-tab-btn.active {
    color: var(--mc-text, #fff);
    border-bottom-color: #FF7601;
}

.feed-tabs-bar .mc-tab-btn:hover:not(.active) {
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.8));
}

.feed-tabs-bar .mc-tab-btn i { font-size: 13px; }

.feed-tab-panel.mc-tab-panel {
    display: none;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.feed-tab-panel.mc-tab-panel.active {
    display: block;
    animation: feedTabIn 0.22s ease;
}

@keyframes feedTabIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Empty state compatto (tab Eventi) ─────────────────────────────────── */
.feed-empty--compact {
    padding: 20px 16px;
}

.feed-empty-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 15px;
    color: var(--mc-text, #fff);
    margin: 0 0 5px;
}

.feed-empty-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.6));
    margin: 0;
}

/* Variante eventi — icona montagna, flat (no gradienti) */
.feed-empty--events {
    border: 1px dashed var(--mc-border, rgba(255, 255, 255, 0.18));
    background: transparent;
    padding: 18px 16px 16px;
    max-width: 100%;
}

.feed-empty-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mc-overlay-06, rgba(255, 255, 255, 0.07));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.1));
    margin-bottom: 12px;
}

.feed-empty--events .feed-empty-icon-wrap i {
    font-size: 21px;
    color: #FF7601;
    margin: 0;
}

.feed-empty--events .feed-empty-title {
    font-size: 14px;
    margin-bottom: 4px;
}

.feed-empty--events .feed-empty-sub {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 auto;
}

.feed-empty--events .feed-empty-cta {
    margin-top: 12px;
}

.feed-empty--events .mc-cta--sm {
    padding: 7px 18px;
    font-size: 12px;
    min-height: 32px;
}

/* ── Lista viaggi (i tuoi eventi) ──────────────────────────────────────── */
.feed-events-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Card wrap + share ellipsis (slim) ─────────────────────────────────── */
.feed-trip-card-wrap {
    position: relative;
    min-width: 0;
    width: 100%;
}

.feed-trip-share-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s ease, color 0.15s ease, transform 0.18s ease;
}

.feed-trip-share-btn i {
    font-size: 12px;
    line-height: 1;
}

.feed-trip-share-btn:hover,
.feed-trip-share-btn[aria-expanded="true"] {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.feed-trip-share-btn:focus-visible {
    outline: 2px solid #FF7601;
    outline-offset: 2px;
}

/* Lista: ellipsis sull'angolo della thumbnail, non sul body */
.feed-trip-card-wrap:has(.feed-trip-card--list) .feed-trip-share-btn {
    right: auto;
    left: 84px; /* 120px media - 28px btn - 8px inset */
}

@media (max-width: 640px) {
    .feed-trip-card-wrap:has(.feed-trip-card--list) .feed-trip-share-btn {
        left: 64px; /* 100px media - 28px btn - 8px inset */
    }
}

.feed-trip-share-menu {
    position: fixed;
    z-index: 10200;
    min-width: 148px;
    padding: 4px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .feed-trip-share-menu {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feed-trip-share-menu[hidden] {
    display: none !important;
}

.feed-trip-share-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--mc-text, #f0f0f0);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

html[data-theme="light"] .feed-trip-share-item {
    color: #1a1a1a;
}

.feed-trip-share-item:hover,
.feed-trip-share-item:focus-visible {
    background: rgba(255, 118, 1, 0.14);
    outline: none;
}

.feed-trip-share-item i {
    width: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.55));
}

html[data-theme="light"] .feed-trip-share-item i {
    color: rgba(0, 0, 0, 0.45);
}

.feed-trip-share-item[data-share="whatsapp"] i { color: #25d366; }
.feed-trip-share-item[data-share="facebook"] i { color: #1877f2; }
.feed-trip-share-item[data-share="telegram"] i { color: #2aabee; }

/* ── Card viaggio (griglia + lista) ────────────────────────────────────── */
.feed-trip-card {
    display: flex;
    flex-direction: column;
    background: var(--mc-overlay-04, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.12));
    border-radius: 16px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feed-trip-card--list {
    flex-direction: row;
    align-items: stretch;
}

@media (hover: hover) and (pointer: fine) {
    .feed-trip-card-wrap:hover .feed-trip-card {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
    .feed-trip-card-wrap:hover .feed-trip-share-btn {
        transform: translateY(-2px);
    }
}

.feed-trip-card-media {
    position: relative;
    overflow: hidden;
    background: #2a2a2a;
    flex-shrink: 0;
}

.feed-trip-card--grid .feed-trip-card-media {
    aspect-ratio: 4 / 3;
}

.feed-trip-card--list .feed-trip-card-media {
    width: 120px;
    min-height: 100px;
}

.feed-trip-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-trip-card--list .feed-trip-card-img,
.feed-trip-card--list .feed-trip-card-placeholder,
.feed-trip-card--list .feed-trip-card-skeleton {
    min-height: 100%;
}

.feed-trip-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mc-overlay-08, rgba(255, 255, 255, 0.08));
    color: rgba(255, 255, 255, 0.45);
    font-size: 28px;
}

html[data-theme="light"] .feed-trip-card-placeholder {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.35);
}

/* Skeleton caricamento foto card */
.feed-trip-card-skeleton {
    width: 100%;
    height: 100%;
    min-height: 140px;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}
html[data-theme="light"] .feed-trip-card-skeleton {
    background: #f0f0f0;
}
.feed-trip-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.07) 45%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.07) 55%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: mcImgSkeletonShimmer 1.35s ease-in-out infinite;
}
html[data-theme="light"] .feed-trip-card-skeleton::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.04) 45%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.04) 55%,
        transparent 100%
    );
    background-size: 200% 100%;
}
@keyframes mcImgSkeletonShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.feed-trip-live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.feed-trip-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    animation: feedTripPulse 1.4s ease-in-out infinite;
}

@keyframes feedTripPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.feed-trip-photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.feed-trip-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 18px 20px;
    flex: 1;
    min-width: 0;
}

.feed-trip-card--list .feed-trip-card-body {
    padding: 16px 16px;
    justify-content: center;
    gap: 8px;
}

.feed-trip-place-tag {
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.75));
    background: var(--mc-overlay-08, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 3px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-trip-title {
    font-family: 'Agrandir Grand Heavy', sans-serif;
    font-size: 15px;
    line-height: 1.3;
    color: var(--mc-text, #f0f0f0);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-trip-card--list .feed-trip-title {
    font-size: 14px;
    -webkit-line-clamp: 1;
}

.feed-trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12px;
    color: var(--mc-text-muted, rgba(255, 255, 255, 0.55));
}

.feed-trip-meta i {
    font-size: 11px;
    margin-right: 3px;
    color: var(--mc-text-faint, rgba(255, 255, 255, 0.35));
}

.feed-trip-cta {
    margin-top: 6px;
    align-self: flex-start;
    font-size: 13px;
    padding: 9px 16px;
    pointer-events: none;
}

/* ── Griglia viaggi (prossimi eventi) ──────────────────────────────────── */
.feed-trips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 641px) {
    .feed-trips-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 900px) {
    .feed-trips-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

.feed-trip-card--grid {
    min-width: 0;
    width: 100%;
}

@media (max-width: 640px) {
    .feed-trip-card--list .feed-trip-card-media {
        width: 100px;
    }

    .feed-tabs-bar .mc-tab-btn {
        font-size: 13px;
        padding: 11px 12px;
    }
}

/* ── Lightbox foto ─────────────────────────────────────────────────────── */
.feed-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10150;
    background: rgba(0, 0, 0, 0.93);
    align-items: center;
    justify-content: center;
}

.feed-lightbox.is-open {
    display: flex;
}

body.lightbox-open {
    overflow: hidden;
}

.feed-lightbox-img-wrap {
    position: relative;
    max-width: min(92vw, 900px);
    max-height: min(88vh, 700px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-lightbox-img {
    max-width: 100%;
    max-height: min(88vh, 700px);
    border-radius: 12px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    display: block;
}

.feed-lightbox-spinner {
    display: none;
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.feed-lightbox-spinner::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lightboxSpin 0.7s linear infinite;
}

@keyframes lightboxSpin {
    to { transform: rotate(360deg); }
}

.feed-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    backdrop-filter: blur(6px);
}

.feed-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.feed-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    backdrop-filter: blur(6px);
}

.feed-lightbox-nav--prev { left: 12px; }
.feed-lightbox-nav--next { right: 12px; }

.feed-lightbox-nav:hover {
    background: rgba(255, 118, 1, 0.85);
}

.feed-lightbox-caption {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    max-width: 70vw;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.feed-lightbox-attribution {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.15s;
}

.feed-lightbox-attribution:hover {
    color: rgba(255, 255, 255, 0.65);
}

/* FAB crea viaggio */
.feed-create-trip-fab {
    position: fixed;
    right: 16px;
    bottom: calc(18px + var(--mc-nav-mobile-h, 64px) + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 999px;
    background: #FF7601;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(255, 118, 1, 0.35);
    cursor: pointer;
}
.feed-create-trip-fab:active {
    transform: scale(0.97);
}
.feed-section-link.js-open-create-trip {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0;
}
/* Mobile: solo cerchio con + */
@media (max-width: 768px) {
    .feed-create-trip-fab {
        width: 52px;
        height: 52px;
        padding: 0;
        gap: 0;
        font-size: 20px;
    }
    .feed-create-trip-fab span {
        display: none;
    }
}
@media (min-width: 769px) {
    .feed-create-trip-fab {
        bottom: 28px;
        right: 28px;
    }
}
