/* Card grid shared by the homepage and the collection pages. */

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--soft-gray);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-text);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--midnight-blue) 0%, var(--ocean-blue) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
    letter-spacing: -0.3px;
}

.feature-description {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-link {
    display: inline-block;
    color: var(--ocean-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--ocean-blue);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.feature-link:hover {
    background: var(--ocean-blue);
    color: white;
}

.card-thumb {
    position: relative;
    display: block;
    margin: -0.5rem -0.5rem 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--deep-navy);
    /* Keeps light screenshots from blending into the white card */
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    transition: background 0.3s ease;
}

.card-thumb:hover .card-play {
    background: var(--ocean-blue);
}

.card-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ocean-blue);
    margin-bottom: 0.5rem;
}

.external-link::after {
    content: "↗";
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* Collection cards: what is inside, each a link straight to the item */
.card-includes {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: -0.5rem 0 1.5rem;
    padding: 0;
}

.card-includes a {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--ocean-blue);
    background: var(--soft-gray);
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 0.25rem 0.7rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.card-includes a:hover,
.card-includes a:focus-visible {
    background: var(--ocean-blue);
    color: white;
}

/* Shown under the chips when a collection holds more than the card lists. */
.card-includes-more {
    margin: -1rem 0 1.5rem;
    font-size: 0.8rem;
}

.card-includes-more a {
    color: var(--ocean-blue);
    font-style: italic;
}

/* The homepage holds a handful of collection cards, so two wide columns
   read better than a row of three with one left over. */
@media (min-width: 769px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 960px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}
