/* style.css - Modern Gallery styles for Dreamtigers */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8f8f8;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-accent: #1a1a1a;
    --color-border: #e5e5e5;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1200px;
    --spacing: 24px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: normal;
}

/* Gallery Hero */
.gallery-hero {
    text-align: center;
    padding: 64px var(--spacing) 48px;
    border-bottom: 1px solid var(--color-border);
}

.gallery-hero .gallery-logo {
    width: 140px;
    height: auto;
    margin-bottom: 20px;
}

.gallery-hero .gallery-brand {
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.gallery-hero .gallery-tagline {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* Featured Section */
.featured-section {
    padding: 64px var(--spacing);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}

.featured-content {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.featured-cover {
    max-width: 220px;
    max-height: 320px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-cover:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 32px rgba(0,0,0,0.15);
}

.featured-info {
    flex: 1;
}

.featured-label {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.featured-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 24px;
    line-height: 1.3;
}

.featured-cta {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.featured-cta:hover {
    background: #000;
}

/* Collection Section */
.collection-section {
    padding: 64px var(--spacing);
    max-width: var(--max-width);
    margin: 0 auto;
}

.collection-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-text);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    justify-items: center;
}

.book-grid-item {
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s ease;
}

.book-grid-item:hover {
    transform: translateY(-4px);
}

.book-grid-item img {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 3/4;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.book-grid-item:hover img {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.book-grid-title {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-family: var(--font-serif);
    line-height: 1.3;
}

.book-grid-hidden {
    display: none;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    padding: 12px 32px;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px var(--spacing);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer a {
    color: var(--color-text);
    text-decoration: none;
}

.social-links {
    margin-top: 16px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: #1877F2;
}

.facebook-icon {
    transition: transform 0.2s ease;
}

.social-links a:hover .facebook-icon {
    transform: scale(1.1);
}

/* Book Page */
.book-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px var(--spacing);
}

.book-header {
    margin-bottom: 40px;
}

.book-header h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.book-back {
    display: inline-block;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: 20px;
}

.book-back:hover {
    color: var(--color-accent);
}

.share-facebook-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1877F2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.share-facebook-btn:hover {
    background: #1565C0;
    transform: translateY(-1px);
}

.share-facebook-btn svg {
    flex-shrink: 0;
}

.book-pdf-container {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.book-pdf-container object {
    width: 100%;
    height: 100%;
    border: none;
}

/* Admin */
.admin-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px var(--spacing);
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.admin-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: #000;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: #17a2b8;
    color: white;
}

.btn-edit:hover {
    background: #138496;
}

.book-list {
    border-top: 1px solid var(--color-border);
}

.book-list-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 16px;
}

.book-list-item img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

.book-list-item .title {
    flex: 1;
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.book-list-item .actions {
    display: flex;
    gap: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px 8px;
}

.modal-close:hover {
    color: var(--color-text);
}

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

@media (max-width: 768px) {
    .gallery-hero {
        padding: 48px var(--spacing) 36px;
    }

    .gallery-hero .gallery-logo {
        width: 100px;
    }

    .gallery-hero .gallery-brand {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .featured-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .featured-cover {
        width: 180px;
        max-height: 260px;
    }

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .book-grid-item img {
        max-width: 140px;
    }
}
