/* ═══════════════════════════════════════════════════════════════
   ZE GUIDE TRIPS WIDGET  —  ze-guide-trips.css
   ═══════════════════════════════════════════════════════════════ */

.zeg-wrap {
    --zeg-primary:  #4A7F57;
    --zeg-accent:   #CFE09B;
    --zeg-radius:   12px;
    --zeg-split:    38%;
    --zeg-cols:     2;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.zeg-grid {
    display: grid;
    grid-template-columns: repeat(var(--zeg-cols), 1fr);
    gap: 20px;
}
.zeg-wrap[data-columns="1"] { --zeg-cols: 1; }
.zeg-wrap[data-columns="2"] { --zeg-cols: 2; }
.zeg-wrap[data-columns="3"] { --zeg-cols: 3; }

/* ── Card ─────────────────────────────────────────────────────── */
.zeg-card {
    display: flex;
    border-radius: var(--zeg-radius);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .2s, transform .2s;
    min-height: 220px;
}
.zeg-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.11);
    transform: translateY(-2px);
}

/* ── Mitad guía (izquierda) ───────────────────────────────────── */
.zeg-card-guide {
    flex: 0 0 var(--zeg-split);
    width: var(--zeg-split);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zeg-guide-photo {
    flex: 1;
    background-size: cover;
    background-position: center top;
    position: relative;
}
/* Gradiente inferior para que el nombre sea legible */
.zeg-guide-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 45%,
        rgba(0,0,0,.55) 100%
    );
}
.zeg-guide-photo--empty {
    background: var(--zeg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.zeg-guide-photo--empty span {
    font-size: 48px;
    font-weight: 700;
    color: rgba(255,255,255,.5);
}

/* Nombre y bio superpuestos sobre el gradiente */
.zeg-guide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    z-index: 2;
}
.zeg-guide-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.zeg-guide-bio {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,.82);
    line-height: 1.3;
    margin-top: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    /* Limitar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Separador vertical con acento de color */
.zeg-card-guide::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--zeg-accent),
        var(--zeg-primary)
    );
    z-index: 3;
}

/* ── Mitad viaje (derecha) ────────────────────────────────────── */
.zeg-card-trip {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zeg-trip-image-wrap {
    display: block;
    position: relative;
    flex: 0 0 120px;
    height: 120px;
    overflow: hidden;
    text-decoration: none;
}
.zeg-trip-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform .35s ease;
}
.zeg-card:hover .zeg-trip-image {
    transform: scale(1.04);
}
.zeg-trip-image--empty {
    background: #e8e8e8;
}

/* Badges sobre imagen */
.zeg-trip-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
    z-index: 2;
}
.zeg-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    line-height: 1.4;
    letter-spacing: .02em;
}
.zeg-badge--confirmed {
    background: var(--zeg-primary);
    color: #fff;
}

/* Cuerpo del viaje */
.zeg-trip-body {
    flex: 1;
    padding: 11px 13px 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.zeg-trip-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}
.zeg-trip-title a {
    color: inherit;
    text-decoration: none;
}
.zeg-trip-title a:hover {
    color: var(--zeg-primary);
}

/* Meta del viaje */
.zeg-trip-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.zeg-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}
.zeg-meta-item svg {
    flex-shrink: 0;
    opacity: .6;
}
.zeg-meta-date { color: #444; font-weight: 500; }
.zeg-meta-carbon { color: var(--zeg-primary); }

/* CTA */
.zeg-trip-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--zeg-primary);
    text-decoration: none;
    margin-top: auto;
    letter-spacing: .02em;
    transition: gap .15s;
}
.zeg-trip-cta:hover {
    gap: 7px;
    color: var(--zeg-primary);
}

/* ── Estado vacío / editor ────────────────────────────────────── */
.zeg-empty {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 13px;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .zeg-wrap[data-columns-tablet="1"] { --zeg-cols: 1; }
    .zeg-wrap[data-columns-tablet="2"] { --zeg-cols: 2; }
}

@media (max-width: 600px) {
    .zeg-grid {
        --zeg-cols: 1;
    }
    /* En móvil: card apilada verticalmente */
    .zeg-card {
        flex-direction: column;
        min-height: unset;
    }
    .zeg-card-guide {
        flex: 0 0 auto;
        width: 100%;
        height: 160px;
    }
    /* Quitar separador vertical, poner horizontal */
    .zeg-card-guide::after {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(
            to right,
            var(--zeg-accent),
            var(--zeg-primary)
        );
    }
    .zeg-trip-image-wrap {
        flex: 0 0 140px;
        height: 140px;
    }
}
