/* css/pages/book-page.css */

/* --- Book page specific container width --- */
.book-page .container { max-width: 850px; margin: 0 auto; }

/* --- View Toggle Switch --- */
.view-toggle { display: flex; justify-content: center; margin-bottom: 40px; }
.toggle-container { display: flex; background-color: #E2E8F0; border-radius: 99px; padding: 5px; border: 1px solid #CBD5E0; }
.toggle-button {
    padding: 10px 24px; border: none; background-color: transparent; border-radius: 99px;
    font-size: 16px; font-weight: 600; cursor: pointer; color: var(--secondary-text); transition: all 0.3s ease;
}
.toggle-button.active { background-color: var(--surface-color); color: var(--primary-text); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.content-pane { display: none; padding-top: 1px; }
.content-pane.active { display: block; }


/* --- Section Grouping (for Parshas) --- */
.parsha-section { margin-bottom: 40px; }
.parsha-section h2 {
    font-family: 'Playfair Display', serif; font-size: 28px;
    border-bottom: 1px solid var(--border-color); padding-bottom: 12px; margin-bottom: 20px;
}

/* --- UNIFIED GRID STYLES (for ALL grid types) --- */
.item-grid {
    display: grid;
    gap: 12px;
    /* Default layout for wider items like Parshas/Months */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Modifier class for more compact items like Volumes/Years */
.item-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

.grid-link {
    display: flex;
    flex-direction: column; /* Allow for title and subtitle */
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 10px 10px; /* Vertical padding is more important */
    border-radius: 8px;
    font-family: 'Inter', sans-serif; /* UNIFIED FONT */
    font-weight: 500;
    color: var(--secondary-text);
    transition: all 0.2s;
    min-height: 60px; /* Consistent height */
}

.grid-link:hover {
    background-color: var(--accent-blue-light);
    color: var(--accent-blue);
    border-color: #90CDF4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}



.grid-link-subtitle {
    font-size: 11px;
    color: var(--subtle-text);
    margin-top: 4px;
    font-weight: 300;
    line-height: 1.4;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media(max-width: 600px) {
    .item-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .item-grid--compact { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}