/* ============================================
   Game Styles - Cards, Pages, Gallery
   Game Cards, Game Page, Images+Text,
   Circle Images, Photo Gallery
   ============================================ */

/* ============================================
   Game Cards
   ============================================ */
.game-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    background: white;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.game-card .card-title {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.game-card-image {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.game-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}

.game-card-format { margin-bottom: 0.5rem; }

.game-card-format .badge {
    background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%) !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}

.game-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-meta-item {
    display: inline-flex;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.game-meta-item svg {
    color: var(--color-accent);
}

.game-sidebar {
    position: sticky;
    top: 100px;
}

.game-meta-block,
.game-price-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.game-meta-block h5,
.game-price-block h5 {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.game-meta-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

.game-meta-row:last-child { border-bottom: none; }

.game-meta-icon {
    color: var(--color-accent);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.game-meta-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    flex-grow: 1;
}

.game-meta-value {
    color: var(--color-text);
    font-weight: 500;
}

.game-price-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

.game-price-item:last-child { border-bottom: none; }

.game-price-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.game-price-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.game-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
}

.related-games-section {
    background: var(--color-bg-light);
}

.related-games-section h2 {
    color: var(--color-primary);
    font-weight: 700;
}

/* ============================================
   Game Page Content Sections
   ============================================ */
.game-content h3 {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

.game-content h3:first-child {
    margin-top: 0;
}

.game-content p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.game-content .lead {
    font-size: 1.15rem;
    color: var(--color-text-muted);
}

/* Feature cards in game context - more compact */
.game-content .feature-card {
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.game-content .feature-card .card-body {
    padding: 1.25rem;
}

.game-content .feature-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.game-content .feature-card .card-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Competency section with different accent */
.competency-section .feature-card {
    border-left-color: #10b981;
}

.competency-section .feature-card .card-title {
    color: #047857;
}

/* Game sidebar improvements */
.game-sidebar-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.game-sidebar-image img {
    border-radius: var(--radius-lg);
}

/* Video embed in game page */
.game-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
}

.game-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Task/Competency icon numbers */
.feature-card-numbered {
    position: relative;
    padding-left: 1rem;
}

.feature-card-numbered::before {
    content: counter(feature-counter);
    counter-increment: feature-counter;
    position: absolute;
    left: -1.5rem;
    top: 1.25rem;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Counter reset for feature lists */
.feature-list-numbered {
    counter-reset: feature-counter;
}

/* Games Index Page Hero */
.games-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, #3b82f6 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.games-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.games-hero .lead {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Images with Text Block
   ============================================ */
.images-with-text-section {
    background: var(--color-bg-light);
}

.images-with-text-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.image-text-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    flex: 1 1 280px;
    max-width: 350px;
    text-align: center;
}

.image-text-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.image-text-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.image-text-image {
    flex-shrink: 0;
}

.image-text-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--color-accent-light);
}

.image-text-content {
    text-align: center;
}

.image-text-content h4 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.image-text-content p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .images-with-text-list {
        flex-direction: column;
        align-items: center;
    }

    .image-text-item {
        max-width: 100%;
    }
}

/* ============================================
   Circle Images Row Block
   ============================================ */
.circle-images-section {
    background: white;
}

.circle-images-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.circle-image-item {
    text-align: center;
    flex: 0 0 auto;
}

.circle-image-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid var(--color-accent-light);
    transition: all 0.3s ease;
}

.circle-image-item:hover img {
    transform: scale(1.1);
    border-color: var(--color-accent);
}

.circle-image-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    max-width: 130px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .circle-images-row {
        gap: 1.5rem;
    }

    .circle-image-item img {
        width: 100px;
        height: 100px;
    }
}

/* ============================================
   Photo Gallery Block
   ============================================ */
.photo-gallery-section {
    background: var(--color-bg-alt);
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-gallery-item {
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.photo-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 576px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Responsive - Games
   ============================================ */
@media (max-width: 991px) {
    .game-sidebar {
        position: static;
        margin-top: 2rem;
    }
}
