/*
Theme Name: friend42-child
Template: generatepress
Theme URI: https://example.com/friend42-child
Author: friend42
Description: Clean, modern AI-news card grid child theme for GeneratePress (blog card layout for the home page / blog index).
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: friend42-child
Tags: blog, news, card-grid, responsive
*/

/* ------------------------------------------------------------------
   Base overrides - minimal, reset-safe.
   The parent GeneratePress stylesheet still provides the base layout.
------------------------------------------------------------------ */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* Pad the main content area a bit so cards breathe. */
.site-content .inside-article {
    padding: 0;
}

/* ------------------------------------------------------------------
   Card grid
------------------------------------------------------------------ */

.fc-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fc-card-grid .fc-card {
    list-style: none;
}

/* Featured (newest) post spans the full width. */
.fc-card-grid .fc-card--featured {
    grid-column: 1 / -1;
}

.fc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.fc-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0f172a 0%, #4ECDC4 100%);
    position: relative;
}

.fc-card--featured .fc-card__media {
    aspect-ratio: 21 / 9;
}

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

.fc-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.fc-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
}

.fc-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.fc-card--featured .fc-card__title {
    font-size: 1.6rem;
}

.fc-card__title a {
    color: #0f172a;
    text-decoration: none;
}

.fc-card__title a:hover {
    color: #5B8DEF;
}

.fc-card__date {
    font-size: 0.82rem;
    color: #64748b;
}

.fc-card__excerpt {
    font-size: 0.92rem;
    color: #475569;
    margin: 0;
}

.fc-card__link {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.92rem;
    color: #5B8DEF;
    text-decoration: none;
}

.fc-card__link:hover {
    color: #0f172a;
}

/* Category badge brand colors */
.fc-badge--ki-ai           { background: #FF6B6B; }
.fc-badge--ki-forschung    { background: #5B8DEF; }
.fc-badge--ki-tools        { background: #4ECDC4; }
.fc-badge--technik         { background: #0f172a; }
.fc-badge--ratgeber        { background: #FF6B6B; }

/* Gradient placeholders per brand (used when no featured image exists) */
.fc-placeholder--ki-ai        { background: linear-gradient(135deg, #0f172a, #FF6B6B); }
.fc-placeholder--ki-forschung { background: linear-gradient(135deg, #0f172a, #5B8DEF); }
.fc-placeholder--ki-tools     { background: linear-gradient(135deg, #0f172a, #4ECDC4); }
.fc-placeholder--technik      { background: linear-gradient(135deg, #0f172a, #5B8DEF); }
.fc-placeholder--ratgeber     { background: linear-gradient(135deg, #0f172a, #FF6B6B); }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .fc-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fc-card-grid {
        grid-template-columns: 1fr;
    }
    .fc-card--featured .fc-card__media {
        aspect-ratio: 16 / 9;
    }
    .fc-card--featured .fc-card__title {
        font-size: 1.3rem;
    }
}
