/**
 * ===============================================================
 * TripTiles - Trip Cards Override
 * Ueberschreibt die bestehenden route-card Styles in app.css
 * Gleicher Look fuer Startseite (triptiles.php) + SHARE (mein-bereich.php)
 * Developed by Toni Sciacca - mail@tonisciacca.com
 * ===============================================================
 */

/* ═══════════ ROUTE CARD — neues Design ═══════════ */
.route-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}
.route-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    transform: translateY(-4px);
}
.route-card:hover .card-image img {
    transform: scale(1.05);
}

/* Bild */
.card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 0;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Badge oben links — GRUEN gefuellt */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    box-shadow: none;
}
.card-badge [data-lucide] {
    width: 14px;
    height: 14px;
}
.card-badge.verified {
    background: #FF385C;
    color: white;
}
/* Badge-Varianten */
.card-badge.bike { background: #d1fae5; color: #065f46; }
.card-badge.city { background: #dbeafe; color: #1e40af; }
.card-badge.beach { background: #fef3c7; color: #92400e; }
.card-badge.hiking { background: #e0e7ff; color: #3730a3; }
.card-badge.road { background: #fce7f3; color: #9d174d; }

/* Herz oben rechts — DUNKEL halbtransparent */
.card-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: rgba(255,255,255,0.85);
    transition: all 0.15s;
}
.card-favorite:hover {
    background: rgba(0,0,0,0.4);
    color: white;
    transform: none;
}
.card-favorite.saved {
    color: #FF385C;
    background: rgba(255,255,255,0.9);
}
.card-favorite.saved [data-lucide] {
    fill: #FF385C;
    color: #FF385C;
}
.card-favorite [data-lucide] {
    width: 18px;
    height: 18px;
    color: white;
}

/* Body — ragt ins Bild, abgerundete obere Ecken, 1px Border */
.card-body {
    padding: 16px 18px 14px;
    background: white;
    position: relative;
    margin-top: -16px;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid #e0e0e0;
    z-index: 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    gap: 8px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}
.card-rating [data-lucide] {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
    stroke: none;
    color: #1a1a1a;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 2px;
}

.card-meta {
    font-size: 12px;
    color: #9a9a9a;
    margin-bottom: 0;
}
.card-meta strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Score Badges — GEFUELLT mit Farbe */
.card-scores {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: none;
}
.score-badge i,
.score-badge [data-lucide] {
    width: 13px;
    height: 13px;
}
.score-badge.culture {
    background: rgba(139,92,246,0.12);
    color: #7c3aed;
}
.score-badge.nature {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}
.score-badge.movement {
    background: rgba(59,130,246,0.12);
    color: #2563eb;
}
.score-badge.relaxation {
    background: rgba(6,182,212,0.12);
    color: #0891b2;
}
.score-badge.enjoyment {
    background: rgba(245,158,11,0.12);
    color: #d97706;
}
.score-badge.spiritual {
    background: rgba(236,72,153,0.12);
    color: #db2777;
}

/* ═══════════ TT-CARD (fuer SHARE-Seite, gleicher Look) ═══════════ */
.tt-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
}
.tt-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    transform: translateY(-4px);
}
.tt-card:hover .tt-card-img img {
    transform: scale(1.05);
}

.tt-card-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.tt-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tt-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
}
.tt-card-badge [data-lucide] { width: 14px; height: 14px; }
.tt-card-badge.bike { background: #d1fae5; color: #065f46; }
.tt-card-badge.city { background: #dbeafe; color: #1e40af; }
.tt-card-badge.beach { background: #fef3c7; color: #92400e; }
.tt-card-badge.hiking { background: #e0e7ff; color: #3730a3; }
.tt-card-badge.aktiv { background: #d1fae5; color: #065f46; }
.tt-card-badge.geplant { background: #dbeafe; color: #1e40af; }
.tt-card-badge.abgeschlossen { background: #f3f4f6; color: #4b5563; }

.tt-card-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: rgba(255,255,255,0.85);
    transition: all 0.15s;
}
.tt-card-heart:hover { background: rgba(0,0,0,0.4); color: white; }
.tt-card-heart.liked { color: #FF385C; background: rgba(255,255,255,0.9); }
.tt-card-heart.liked [data-lucide] { fill: #FF385C; }
.tt-card-heart [data-lucide] { width: 18px; height: 18px; }

.tt-card-members {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Autor-Avatar auf der Kante Bild/Body */
.tt-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid white;
    background: #e5e7eb;
    overflow: hidden;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tt-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tt-card-avatar [data-lucide] {
    width: 20px;
    height: 20px;
    color: #9a9a9a;
}

.tt-card-body {
    padding: 32px 18px 14px;
    background: white;
    position: relative;
    margin-top: -16px;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid #e0e0e0;
    z-index: 2;
}

/* Location UEBER dem Titel */
.tt-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 2px;
}
.tt-card-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

.tt-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}
.tt-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tt-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}
.tt-card-rating [data-lucide] {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
    color: #1a1a1a;
}

/* Meta: Dauer . km . Etappen */
.tt-card-meta {
    font-size: 12px;
    color: #9a9a9a;
    margin-bottom: 12px;
}

.tt-card-scores {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tt-score-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: none;
}
.tt-score-pill [data-lucide] { width: 13px; height: 13px; }
.tt-score-pill.kultur { background: rgba(139,92,246,0.12); color: #7c3aed; }
.tt-score-pill.natur { background: rgba(34,197,94,0.12); color: #16a34a; }
.tt-score-pill.genuss { background: rgba(245,158,11,0.12); color: #d97706; }
.tt-score-pill.aktivitaet { background: rgba(59,130,246,0.12); color: #2563eb; }
.tt-score-pill.ruhe { background: rgba(6,182,212,0.12); color: #0891b2; }
.tt-score-pill.familie { background: rgba(236,72,153,0.12); color: #db2777; }

/* ═══════════ GRIDS ═══════════ */
.tt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.tt-card-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.tt-card-scroll::-webkit-scrollbar { display: none; }
.tt-card-scroll .tt-card { flex: 0 0 280px; scroll-snap-align: start; }

@media (max-width: 768px) {
    .tt-card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
    .tt-card-scroll .tt-card { flex: 0 0 260px; }
}
@media (max-width: 480px) {
    .tt-card-grid { grid-template-columns: 1fr; }
}
