*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, sans-serif;
    background: #f4f4f5;
    color: #1a1a1a;
    min-height: 100vh;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Search */
.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.search-bar input:focus {
    border-color: #3b82f6;
}

/* Results */
.results {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty {
    color: #6b7280;
    margin-top: 1rem;
}

/* Card */
.card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    flex-shrink: 0;
}
.thumb-placeholder {
    width: 120px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.card-body {
    padding: 0.75rem;
}
.card-body h2 {
    font-size: 1.1rem;
    margin-top: 0.4rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #e5e7eb;
    color: #374151;
}
.badge-iceclimbing {
    background: #bfdbfe;
    color: #1d4ed8;
}
.badge-ferrata {
    background: #fde68a;
    color: #92400e;
}
.badge-climbing {
    background: #d1fae5;
    color: #065f46;
}
.badge-skitour {
    background: #e0e7ff;
    color: #3730a3;
}
.badge-climbinggarden {
    background: #fce7f3;
    color: #9d174d;
}
.badge-alpinetour {
    background: #fee2e2;
    color: #991b1b;
}

/* Detail page */
.back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #3b82f6;
    text-decoration: none;
}
.back:hover {
    text-decoration: underline;
}

.detail-header {
    margin-bottom: 1.5rem;
}
.detail-header h1 {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.ext-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.ext-link:hover {
    text-decoration: underline;
}

/* Topos */
.topos {
    margin-bottom: 2rem;
}
.topos h2 {
    margin-bottom: 0.75rem;
}
.topo-link {
    display: inline-block;
    margin: 0.25rem 0.5rem 0.25rem 0;
    padding: 0.4rem 0.9rem;
    background: #1d4ed8;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}
.topo-link:hover {
    background: #1e40af;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.gallery-item {
    cursor: zoom-in;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.gallery-item:hover img {
    opacity: 0.85;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: zoom-out;
}
#lightbox.active {
    display: flex;
}
#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
