/* erikbarfoed.dk - Custom Theme Styles */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --color-bg: #FAFAF8;
    --color-text: #222222;
    --color-accent: #8B3A2F;
    --color-accent-hover: #6d2e25;
    --color-border: #e0e0e0;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Lato', 'Helvetica Neue', sans-serif;
    --max-width: 650px;
    --line-height: 1.7;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
}

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

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--color-accent);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

p {
    margin: 0 0 1.25rem 0;
}

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
}

/* ===== INDLÆG / FORSIDE ===== */
.posts-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
}

.post {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}

.post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.posts-archive-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.post-date {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.post-title {
    margin-top: 0;
    margin-bottom: 1rem;
}

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

.post-title a:hover {
    color: var(--color-accent);
}

.post-content {
    margin-top: 1rem;
}

.pagination {
    margin-top: 2rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.pagination a {
    color: var(--color-accent);
}

/* ===== BØGER OVERSIGT ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    text-align: center;
}

.book-card img {
    width: 100%;
    max-width: 200px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.book-card a:hover img {
    transform: translateY(-4px);
}

.book-card-title {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.book-card-title a {
    color: var(--color-text);
    text-decoration: none;
}

.book-card-title a:hover {
    color: var(--color-accent);
}

.book-card-year {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #666;
}

/* ===== ENKELT BOG ===== */
.book-single {
    margin-top: 1rem;
}

.book-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

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

.book-cover img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-meta-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-meta-col h1 {
    font-size: 1.6rem;
    color: var(--color-accent);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.book-meta {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.book-body {
    max-width: 640px;
}

.book-description {
    margin-bottom: 1.5rem;
}

.book-description img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.book-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ===== PRESSELISTE ===== */
details.press-list {
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
}

details.press-list summary {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: var(--color-accent);
    transition: background 0.2s ease;
}

details.press-list summary:hover {
    background: rgba(139, 58, 47, 0.05);
}

details.press-list h4 {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1.25rem 1.25rem 0.5rem;
    color: var(--color-text);
}

details.press-list ul {
    list-style: none;
    padding: 0 1.25rem;
    margin: 0 0 0.75rem;
}

details.press-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.2rem 0;
}

details.press-list li a {
    color: var(--color-accent);
}

/* ===== BOGUDDRAG ===== */
details.book-excerpt {
    margin-top: 2.5rem;
    border: 1px solid var(--color-border);
}

details.book-excerpt summary {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: var(--color-accent);
    transition: background 0.2s ease;
}

details.book-excerpt summary:hover {
    background: rgba(139, 58, 47, 0.05);
}

details.book-excerpt .excerpt-text {
    padding: 1.25rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.95rem;
    line-height: 1.8;
}

details.book-excerpt .excerpt-text img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

/* ===== KARRUSEL ===== */
.book-gallery {
    margin-top: 2.5rem;
}

.book-gallery h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-track {
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #faf8f6;
}

.carousel-slide {
    display: none;
    width: 100%;
    text-align: center;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 450px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--color-border);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-accent);
    transition: background 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(139, 58, 47, 0.05);
}

.carousel-counter {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 92%;
    max-height: 92vh;
    object-fit: contain;
}

.book-reviews {
    margin-top: 2.5rem;
}

.book-reviews h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

blockquote {
    margin: 0 0 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--color-accent);
    background: rgba(139, 58, 47, 0.05);
    font-style: italic;
}

blockquote cite {
    display: block;
    font-style: normal;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
}

.back-link {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* ===== OM SIDE ===== */
.about-portrait {
    max-width: 400px;
    margin-bottom: 0.5rem;
}

.about-portrait img {
    width: 100%;
    height: auto;
}

.photo-credit {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2rem;
}

/* ===== PRESSE SIDE ===== */
.press-text {
    background: #f5f5f3;
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.press-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .press-photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.press-photo-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.press-photo-item img:hover {
    opacity: 0.85;
}

.press-photo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
}

.press-photo-label {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.press-download {
    color: var(--color-accent);
}

/* ===== KONTAKT SIDE ===== */
.contact-form {
    margin-top: 2rem;
}

.contact-form label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    background: white;
    margin-bottom: 1.25rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-form button:hover {
    background: var(--color-accent-hover);
}

.social-links {
    margin-top: 2.5rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.social-links p {
    margin-bottom: 0.5rem;
}

/* ===== ARKIV ===== */
.archive-year {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list li {
    margin-bottom: 0.5rem;
}

.archive-date {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #888;
    margin-right: 0.75rem;
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: #888;
    margin-top: 3rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    html {
        font-size: 17px;
    }
    
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-header {
        flex-direction: column;
    }
    
    .book-cover {
        width: 100%;
        max-width: 200px;
    }
}

/* ===== VIGNET (sideafslutning) ===== */
.page-end {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    text-align: center;
}

.page-end .vignet {
    max-width: 120px !important;
    width: 120px !important;
    height: auto !important;
    opacity: 0.7;
}
