/* Airtable Sync Frontend Styles */

/* Single Writer Template */
.writer-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.writer-content-wrapper {
    display: flex;
    flex-direction: column;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

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

.writer-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.writer-photo {
    flex-shrink: 0;
}

.writer-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.writer-title-section {
    flex: 1;
}

.writer-name {
    font-size: 2.5em;
    margin: 0 0 20px 0;
}

.writer-details {
    margin-top: 30px;
}

.writer-details h3 {
    font-size: 1.5em;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.writer-details ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.writer-details ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.writer-details ul li:last-child {
    border-bottom: none;
}

.writer-books .writer-book-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.writer-book-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.book-card-cover {
    display: block;
}

.book-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-card-title {
    margin: 0;
    font-size: 1.2em;
}

.book-card-title a {
    text-decoration: none;
    color: inherit;
}

.book-card-summary {
    margin: 0;
    font-size: 0.95em;
    color: #555;
    line-height: 1.7;
}

.book-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.book-card-detail-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.book-card-detail-row:last-child {
    border-bottom: none;
}

.book-card-detail-label {
    min-width: 140px;
    font-weight: 600;
    color: #666;
}

.book-card-detail-value {
    flex: 1;
    color: #333;
    text-align: right;
}

.writer-narratives__placeholder {
    margin: 0;
    font-size: 0.95em;
    color: #777;
}

.writer-meta-table-wrapper {
    margin-top: 30px;
    overflow-x: auto;
}

.writer-meta-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.writer-meta-table th,
.writer-meta-table td {
    text-align: right;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    font-size: 0.95em;
}

.writer-meta-table th {
    width: 30%;
    color: #555;
    font-weight: 600;
}

.writer-meta-table tr:nth-child(even) {
    background-color: #fafafa;
}

.writer-description {
    margin-top: 30px;
    line-height: 1.8;
}

/* Single Book Template */
.book-single {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.book-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.book-cover img {
    width: 240px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.book-title {
    margin: 0;
    font-size: 2.2em;
}

.book-meta-table-wrapper {
    margin-top: 30px;
    overflow-x: auto;
}

.book-meta-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.book-meta-table th,
.book-meta-table td {
    text-align: right;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    font-size: 0.95em;
}

.book-meta-table th {
    width: 30%;
    color: #555;
    font-weight: 600;
}

.book-meta-table tr:nth-child(even) {
    background-color: #fafafa;
}

.book-cover-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.book-cover-gallery img {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.book-description {
    margin-top: 30px;
    line-height: 1.8;
}

/* Archive Writer Template */
.writers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.writer-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.writer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.writer-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.writer-card-photo {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

.writer-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.writer-card-content {
    padding: 20px;
}

.writer-card-title {
    font-size: 1.3em;
    margin: 0 0 15px 0;
    color: #333;
}

.writer-card-narratives {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

.writer-card-narratives .more {
    color: #999;
    font-style: italic;
}

.page-header {
    text-align: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5em;
    margin: 0;
}

/* RTL Support */
body.rtl .writer-header {
    flex-direction: row-reverse;
}

body.rtl .content-with-sidebar {
    direction: rtl;
}

body.rtl .writer-meta-table th,
body.rtl .writer-meta-table td {
    text-align: right;
}

body.rtl .book-meta-table th,
body.rtl .book-meta-table td {
    text-align: right;
}


