/*
 Theme Name: GeneratePress Child – FreeProgrammingBooks
 Description: Child theme for FreeProgrammingBooks
 Author: FreeProgrammingBooks
 Template: generatepress
 Version: 1.0
*/

/* =========================
   CSS VARIABLES (IDENTITY)
========================= */
:root {
    --fpb-primary: #3f51b5;
    --fpb-accent: #009688;
    --fpb-bg: #ffffff;
    --fpb-bg-soft: #f6f7fb;
    --fpb-text: #1f2933;
    --fpb-text-muted: #5f6c7b;
    --fpb-border: #e5e7eb;
}

/* =========================
   BASE
========================= */
body {
    background: var(--fpb-bg);
    color: var(--fpb-text);
}

/* =========================
   CONTAINER
========================= */
.fpb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =========================
   SEARCH
========================= */
.fpb-search {
    padding: 3rem 0;
    text-align: center;
}

.fpb-search input[type="search"] {
    width: 100%;
    max-width: 640px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--fpb-border);
}

/* =========================
   HERO
========================= */
.fpb-hero {
    text-align: center;
    padding-bottom: 2.5rem;
}

.fpb-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.fpb-subtitle {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--fpb-text-muted);
}

/* =========================
   SECTIONS
========================= */
.fpb-section {
    padding: 3rem 0;
}

.fpb-section-soft {
    background: var(--fpb-bg-soft);
}

.fpb-section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* =========================
   BOOK GRID
========================= */
.fpb-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.fpb-book-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--fpb-border);
    transition: transform .15s ease, box-shadow .15s ease;
}

.fpb-book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0,0,0,.08);
}

.fpb-book-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.fpb-book-title {
    font-size: 0.95rem;
    padding: 0.75rem;
    line-height: 1.35;
}

/* =========================
   BUTTONS
========================= */
.fpb-more {
    margin-top: 2rem;
    text-align: center;
}

.fpb-button {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    background: var(--fpb-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.fpb-button:hover {
    background: var(--fpb-accent);
}

/* =========================
   CATEGORIES / LANGUAGES
========================= */
.fpb-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.fpb-category-card {
    padding: 1.25rem;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--fpb-border);
    transition: box-shadow .15s ease, transform .15s ease;
}

.fpb-category-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.fpb-category-card strong {
    display: block;
    font-size: 1rem;
}

.fpb-category-card span {
    font-size: 0.85rem;
    color: var(--fpb-text-muted);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .fpb-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .fpb-book-title {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .fpb-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   LARGE SCREENS
========================= */
@media (min-width: 1024px) {
    .fpb-books-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* =========================
   UTIL
========================= */
.fpb-empty {
    color: var(--fpb-text-muted);
    text-align: center;
}
