/*
 * EduGames - Interactive Learning Games
 * (c) 2025-2026 Prof. N. All rights reserved.
 *
 * File:    styles/about.css
 * Updated: 2026-10-06 07:14
 * Purpose: The About page (views/aboutView.js, views/about.html).
 */
.about-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.about-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.about-back:hover {
    color: var(--color-primary);
}

.about-card {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
}

.about-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.25rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
}

.about-head img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.about-head h1 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.about-head p {
    margin: 0.1rem 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* every row is one block of text across the full width */
.about-section {
    display: block;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.about-section:last-child {
    border-bottom: 0;
}

.about-section p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.about-section p:last-child {
    margin-bottom: 0;
}

/* The games: cards, two in a row; a click shows the game's "How to play" */
.about-games {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.about-game {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 0.7rem;
    row-gap: 0.15rem;
    align-items: start;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0.7rem;
    font: inherit;
    text-align: left;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 5px var(--shadow-color);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.about-game:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.about-game:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.about-game img {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px var(--shadow-color));
}

.about-game strong {
    align-self: end;
    font-size: 0.95rem;
}

.about-game span {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.about-name {
    font-weight: 700;
    color: var(--color-primary);
}

/* The whole Support row is one PayPal link: the text at the left, the big button at the right end, on one line
   (the text wraps before the button drops under it) */
a.about-support {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s;
}

a.about-support:hover {
    background: color-mix(in srgb, var(--color-primary) 7%, var(--bg-surface));
}

a.about-support:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.about-support p {
    min-width: 0;
}

.about-support img {
    display: block;
    flex: none;
    height: 48px;
    width: auto;
}

@media (max-width: 340px) {
    .about-support img {
        height: 38px;
    }
}

/* very narrow screens: one card per row */
@media (max-width: 400px) {
    .about-games {
        grid-template-columns: 1fr;
    }
}
