/* ===== Award Cards Section ===== */
.cards-section {
    margin: 32px 0 40px;
}

.cards-header {
    text-align: left;
    margin-bottom: 28px;
}

.cards-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.cards-underline {
    height: 6px;
    width: 64px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #f97316 100%);
    margin: 0;
}

/* Scroll wrapper */
.cards-scroll-wrapper {
    position: relative;
}

/* Grid: always single row, scrollable when narrow */
.cards-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* padding creates headroom so hover translateY(-6px) + box-shadow
       (0 10px 28px) isn't clipped by overflow-x:auto (which forces
       overflow-y to auto too); negative margin-top cancels the visual
       shift in the layout */
    padding-top: 26px;
    margin-top: -26px;
    padding-bottom: 34px;
}

.cards-grid::-webkit-scrollbar {
    display: none;
}

/* Scroll hint (right-side fade + arrow) – hidden by default, shown via JS */
.cards-scroll-hint {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 44px;
    width: 48px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to left, rgba(255,255,255,0.95) 40%, rgba(255,255,255,0));
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cards-scroll-hint.visible {
    display: flex;
}

.cards-scroll-hint.hidden {
    opacity: 0;
}

.cards-scroll-hint svg {
    color: #9333ea;
    animation: hintBounce 1.5s ease-in-out infinite;
}

/* Scroll indicator (draggable dot) – hidden by default, shown via JS */
.cards-scroll-indicator {
    display: none;
    position: relative;
    height: 24px;
    margin-top: 12px;
    padding: 0 16px;
    touch-action: none;
    cursor: pointer;
}

.cards-scroll-indicator.visible {
    display: block;
}

.cards-scroll-track {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    height: 1.5px;
    background: #d1d5db;
    transform: translateY(-50%);
    border-radius: 1px;
}

.cards-scroll-dot {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 12px;
    height: 12px;
    background: #9333ea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.15s ease-out;
    cursor: grab;
    touch-action: none;
    z-index: 2;
}

.cards-scroll-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.cards-scroll-dot.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.4);
    transition: none;
}

/* Individual medal card */
.medal-card {
    flex: 1;
    min-width: 240px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.medal-card:hover {
    transform: translateY(-6px);
    text-decoration: none;
    color: inherit;
}

.medal-card--bronze:hover {
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.25);
}

.medal-card--silver:hover {
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.25);
}

.medal-card--gold:hover {
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3);
}

.medal-card-band {
    height: 11rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medal-card--bronze .medal-card-band {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

.medal-card--silver .medal-card-band {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.medal-card--gold .medal-card-band {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.medal-card-img {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.medal-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.medal-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.medal-card-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 14px;
}

.medal-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.medal-card-tag {
    display: inline-flex;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
}

.medal-card-link {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.medal-card:hover .medal-card-link {
    gap: 8px;
}

.medal-card-link--bronze { color: #0891b2; }
.medal-card-link--silver { color: #6366f1; }
.medal-card-link--gold   { color: #d97706; }

/* ===== Full Detail Medal Cards (獲獎條件 on homepage) ===== */
.medal-full-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.medal-full-card .card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.medal-full-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.medal-full-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.medal-full-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.medal-full-card--gold .medal-full-title { color: #92400e; }
.medal-full-card--silver .medal-full-title { color: #1e40af; }
.medal-full-card--bronze .medal-full-title { color: #7c3aed; }

.medal-full-badge {
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.medal-full-card--gold .medal-full-badge,
.medal-full-card--gold .medal-full-footer {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.medal-full-card--silver .medal-full-badge,
.medal-full-card--silver .medal-full-footer {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.medal-full-card--bronze .medal-full-badge,
.medal-full-card--bronze .medal-full-footer {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.medal-full-checklist {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.medal-full-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-weight: 500;
}

.medal-full-checklist li:last-child {
    border-bottom: none;
}

.medal-full-checklist li.muted {
    color: #9ca3af;
    font-weight: 400;
}

.medal-full-check-emoji {
    flex-shrink: 0;
}

.medal-full-check-label {
    flex: 1;
}

.medal-full-check-value {
    font-weight: 700;
}

.medal-full-card--gold .medal-full-check-value { color: #f59e0b; }
.medal-full-card--silver .medal-full-check-value { color: #3b82f6; }
.medal-full-card--bronze .medal-full-check-value { color: #a855f7; }

.medal-full-check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.medal-full-footer {
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    margin-top: auto;
}
