/* ═══════════════════════════════════════════
   books-grid.css  →  webroot/css/books-grid.css
   Books için 4-sütun grid layout (journals gibi)
   ═══════════════════════════════════════════ */

/* ─── Grid: 4-sütun ─── */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ─── Kart (tüm alan kliklanabilir link) ─── */
.books-grid-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.books-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
}

/* ─── Kapak alanı ─── */
.books-grid-card-cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(160deg, #eaf0f4, #dae4ea);
}

/* 3 : 4 oranı → portrait kapak */
.books-grid-card-cover::before {
    content: '';
    display: block;
    padding-bottom: 133.33%;
}

/* Kapak resmi — !important ile layout'un global img kurallarını ezer */
.books-grid-card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.books-grid-card:hover .books-grid-card-cover img {
    transform: scale(1.05);
}

/* Kapak yok → ikon */
.books-grid-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.books-grid-card-placeholder svg {
    width: 44px;
    height: 44px;
    opacity: 0.18;
}

/* ─── Başlık + alt bilgi ─── */
.books-grid-card-info {
    padding: 16px 14px 20px;
    text-align: center;
}

.books-grid-card-info h4 {
    color: var(--dark-navy);
    font-size: 0.84rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.45;
}

.books-grid-card-subtitle {
    display: block;
    color: var(--accent-blue);
    font-size: 0.72rem;
    font-style: italic;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 460px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .books-grid-card-info { padding: 12px 10px 16px; }
    .books-grid-card-info h4 { font-size: 0.78rem; }
}
/* ═══════════════════════════════════════════
   Books View Page CSS — books.css'e eklenecek
   ═══════════════════════════════════════════ */

/* ─── Book Detail (view.ctp) ─── */
.book-detail-wrap {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.book-detail-cover {
    flex: 0 0 300px;
}

.book-detail-cover img {
    width: 100%;
    border-top-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.book-detail-placeholder {
    width: 300px;
    height: 424px;
    background: linear-gradient(160deg, #e8eef2, #d5dfe6);
    border-top-left-radius: 24px;
    border-bottom-right-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-detail-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.18;
}

.book-detail-info {
    flex: 1;
}

.book-detail-info h2 {
    color: var(--dark-navy);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.book-detail-info .detail-subtitle {
    color: var(--accent-blue);
    font-style: italic;
    font-size: 1rem;
    margin: 0 0 20px;
}

.book-detail-editors {
    margin: 0 0 24px;
}

.book-detail-editors .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 6px;
}

.book-detail-editors .names {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.7;
}

/* Details / açıklama blok */
.book-detail-description {
    margin: 0 0 24px;
}

.book-detail-description .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 6px;
}

.book-detail-description .text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.7;
}

.book-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.book-detail-meta-item {
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
}

.book-detail-meta-item:nth-child(odd) {
    padding-right: 24px;
    border-right: 1px solid #f3f3f3;
}

.book-detail-meta-item:nth-child(even) {
    padding-left: 24px;
}

.book-detail-meta-item .meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    margin-bottom: 3px;
}

.book-detail-meta-item .meta-value {
    font-size: 0.88rem;
    color: var(--dark-navy);
    font-weight: 600;
}

.book-detail-meta-item .meta-value a {
    color: var(--link-blue);
    text-decoration: none;
}

.book-detail-meta-item .meta-value a:hover {
    text-decoration: underline;
}

.book-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--link-blue);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 24px;
    transition: gap 0.2s;
}

.book-back-link:hover {
    gap: 10px;
}

.book-back-link svg {
    width: 14px;
    height: 14px;
}

/* ─── Access Button (Link) ─── */
.book-access-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.book-access-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--link-blue);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(52, 120, 180, 0.2);
}

.book-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52, 120, 180, 0.3);
    background: #2a5f9e;
}

.book-access-btn svg {
    width: 18px;
    height: 18px;
}

/* ─── Responsive (view page) ─── */
@media (max-width: 700px) {
    .book-detail-wrap {
        flex-direction: column;
        gap: 24px;
    }

    .book-detail-cover {
        flex: 0 0 auto;
        width: 200px;
    }

    .book-detail-placeholder {
        width: 200px;
        height: 283px;
    }

    .book-detail-meta {
        grid-template-columns: 1fr;
    }

    .book-detail-meta-item:nth-child(odd) {
        border-right: none;
        padding-right: 0;
    }

    .book-detail-meta-item:nth-child(even) {
        padding-left: 0;
    }
}