/**
 * GamesBoard - Guides Category Page Styles
 * Custom template for /poradniki/
 */

/* ========================================
   Variables
   ======================================== */
:root {
    --guides-accent: #a855f7;
    --guides-accent-dark: #4c1d95;
    --guides-accent-glow: rgba(168, 85, 247, 0.25);
}

/* ========================================
   Main Layout (mirrors game library)
   ======================================== */
.guides-archive {
    background: var(--ggl-bg-primary, #1e222b);
    min-height: 100vh;
    padding: 20px 0 60px;
}

.guides-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Stats badges
   ======================================== */
.guides-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    margin-top: 15px;
}

.guides-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #252a35;
    border: 1px solid #303741;
    border-radius: 20px;
    color: #e2e2e8;
    font-weight: 500;
}

.guides-stat svg {
    color: var(--guides-accent);
}

.guides-stat-sep {
    color: #303741;
}

/* ========================================
   Game Covers Grid (View 1)
   ======================================== */
.guides-grid {
    display: grid;
    gap: 20px;
}

.guides-game-card {
    display: block;
    background: #252a35;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guides-game-card.guides-visible {
    opacity: 1;
    transform: translateY(0);
}

.guides-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--guides-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.guides-game-card.guides-visible:hover {
    transform: translateY(-4px);
}

/* Cover */
.guides-game-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #181b22;
}

.guides-game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.guides-game-card:hover .guides-game-image {
    transform: scale(1.05);
}

.guides-game-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* Badge */
.guides-game-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--guides-accent);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.guides-game-badge svg {
    width: 12px;
    height: 12px;
}

/* Card Info */
.guides-game-info {
    padding: 14px 15px 16px;
}

.guides-game-title {
    font-family: 'SairaSemiCondensed', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guides-game-genres {
    font-size: 0.8rem;
    color: #888;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   View 2 - Header meta & actions
   ======================================== */
.guides-game-header-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.guides-game-header-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guides-genre-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #252a35;
    border: 1px solid #303741;
    border-radius: 20px;
    font-size: 0.8rem;
    line-height: 1;
    color: #e2e2e8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guides-genre-tag:hover {
    background: var(--guides-accent);
    border-color: var(--guides-accent);
    color: #fff;
}

.guides-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.guides-game-header-count {
    font-size: 0.9rem;
    color: var(--guides-accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Links in header */
.guides-game-link,
.guides-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #303741;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guides-game-link:hover,
.guides-back-link:hover {
    border-color: var(--guides-accent);
    color: var(--guides-accent);
}

/* Title row with back link */
.guides-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ========================================
   Guide List Items
   ======================================== */
.guides-list-section {
    margin-bottom: 50px;
}

.guides-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-item {
    position: relative;
    background: #181b22;
    border-radius: 12px;
    border-left: 3px solid var(--guides-accent);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.guide-item.guides-visible {
    opacity: 1;
    transform: translateY(0);
}

.guide-item-link {
    display: grid;
    grid-template-columns: 200px 1fr;
    text-decoration: none;
    color: inherit;
    min-height: 0;
    min-width: 0;
}

.guide-item-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #252a35;
}

.guide-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.guide-item:hover .guide-item-thumb img {
    transform: scale(1.05);
}

.guide-item-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    background: #252a35;
}

.guide-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 100px 18px 22px;
    gap: 8px;
    min-width: 0;
}

.guide-item-title {
    font-family: 'SairaSemiCondensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.guide-item:hover .guide-item-title {
    color: var(--guides-accent);
}

.guide-item-excerpt {
    font-family: 'Lexend', sans-serif;
    font-size: 0.88rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-item-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.8rem;
    color: #888;
}

.guide-item-author {
    color: var(--guides-accent);
    font-weight: 500;
}

.guide-item-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.guide-item-comments svg {
    width: 14px;
    height: 14px;
    color: #666;
}

/* ========================================
   Helpful Button (outside <a>, inside .guide-item grid)
   ======================================== */
.guide-helpful-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid #303741;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: 'Lexend', sans-serif;
    z-index: 2;
}

.guide-helpful-btn:hover {
    border-color: var(--guides-accent);
    color: var(--guides-accent);
    background: rgba(168, 85, 247, 0.08);
}

.guide-helpful-btn svg {
    width: 14px;
    height: 14px;
}

.guide-helpful-btn.voted {
    border-color: var(--guides-accent);
    color: var(--guides-accent);
    background: rgba(168, 85, 247, 0.1);
    cursor: default;
    pointer-events: none;
}

.guide-helpful-btn.voting {
    opacity: 0.6;
    pointer-events: none;
}

.guide-helpful-count {
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Section Title (Inne poradniki)
   ======================================== */
.guides-other {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #303741;
}

.guides-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'SairaSemiCondensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px;
}

.guides-title-accent {
    width: 4px;
    height: 24px;
    background: var(--guides-accent);
    border-radius: 2px;
}

/* ========================================
   Empty State
   ======================================== */
.guides-empty {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}

.guides-empty svg {
    width: 64px;
    height: 64px;
    color: #444;
    margin-bottom: 16px;
}

.guides-empty-title {
    font-family: 'SairaSemiCondensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #b3b3b3;
    margin: 0 0 8px;
}

.guides-empty-text {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* ========================================
   Stagger Delays (fade-in animation)
   ======================================== */
.guides-game-card:nth-child(1) { transition-delay: 0s; }
.guides-game-card:nth-child(2) { transition-delay: 0.05s; }
.guides-game-card:nth-child(3) { transition-delay: 0.1s; }
.guides-game-card:nth-child(4) { transition-delay: 0.15s; }
.guides-game-card:nth-child(5) { transition-delay: 0.2s; }
.guides-game-card:nth-child(6) { transition-delay: 0.25s; }
.guides-game-card:nth-child(7) { transition-delay: 0.3s; }
.guides-game-card:nth-child(8) { transition-delay: 0.35s; }
.guides-game-card:nth-child(n+9) { transition-delay: 0.4s; }

.guide-item:nth-child(1) { transition-delay: 0s; }
.guide-item:nth-child(2) { transition-delay: 0.05s; }
.guide-item:nth-child(3) { transition-delay: 0.1s; }
.guide-item:nth-child(4) { transition-delay: 0.15s; }
.guide-item:nth-child(5) { transition-delay: 0.2s; }
.guide-item:nth-child(n+6) { transition-delay: 0.25s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .guides-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .guide-item-link {
        grid-template-columns: 140px 1fr;
    }

    .guide-item-content {
        padding: 14px 16px;
    }

    .guide-item-excerpt {
        -webkit-line-clamp: 1;
    }

    .guide-item-title {
        font-size: 1rem;
    }
}

@media (max-width: 500px) {
    .guides-container {
        padding: 0 14px;
    }

    .guides-game-info {
        padding: 10px 12px 14px;
    }

    .guides-game-title {
        font-size: 0.9rem;
    }

    .guides-game-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .guide-item-link {
        grid-template-columns: 1fr;
    }

    .guide-item-thumb {
        aspect-ratio: 16/9;
    }

    .guide-item-content {
        padding: 14px 14px 40px;
    }

    .guide-item-excerpt {
        display: none;
    }

    .guide-helpful-btn {
        top: auto;
        bottom: 10px;
        right: 14px;
        transform: none;
    }
}
