/* Ferðadagbók — open feed on warm bg (matches myndir / site, no white “card” frame) */

:root {
    --fj-bg: #ffffff;
    --fj-line: rgba(109, 112, 88, 0.22);
    --fj-text: #2a2a2a;
    --fj-muted: #6d6d6d;
    --fj-accent: #6d7058;
    /* Cap photo/video width on large screens (inner column can be ~1100px) */
    --fj-media-max: 800px;
}

.fj-page {
    background-color: var(--fj-bg);
    padding: 48px clamp(16px, 4vw, 32px) 88px;
    min-height: calc(100vh - 120px);
}

/* Width limit only — same idea as .dest-page, no box shadow or paper panel */
.fj-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.fj-header {
    text-align: center;
    margin: 0 0 40px;
    padding: 0 8px 32px;
    border-bottom: 1px solid var(--fj-line);
}

/* Align with myndir / .dest-page-title */
.fj-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #333333;
    margin: 0 0 10px 0;
}

.fj-intro {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    color: #888888;
    margin: 0;
    letter-spacing: 0.1em;
    font-weight: 400;
}

.fj-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fj-post {
    padding: 28px 0;
    border-bottom: 1px solid rgba(109, 112, 88, 0.12);
}

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

.fj-post:first-child {
    padding-top: 0;
}

/* Post header: town (left) + date (right) */
.fj-post-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.fj-date {
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fj-muted);
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.fj-content-col {
    min-width: 0;
}

.fj-town {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fj-accent);
    margin: 0;
    letter-spacing: 0.04em;
}

.fj-caption {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--fj-text);
    margin: 6px 0 18px 0;
    padding-left: 1rem;
    border-left: 2px solid rgba(109, 112, 88, 0.35);
}

.fj-caption p {
    margin: 0 0 0.75em 0;
}

.fj-caption p:last-child {
    margin-bottom: 0;
}

.fj-figure {
    margin: 0 auto;
    max-width: min(100%, var(--fj-media-max));
}

.fj-figure.fj-lightbox-trigger,
.fj-carousel-slide img.fj-lightbox-trigger {
    cursor: pointer;
}

.fj-video-wrap {
    margin: 0 auto;
    max-width: min(100%, var(--fj-media-max));
}

.fj-video {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(45, 42, 38, 0.06);
}

.fj-carousel-slide .fj-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fj-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(45, 42, 38, 0.06);
}

/* Carousel */
.fj-carousel {
    position: relative;
    margin: 0 auto;
    max-width: min(100%, var(--fj-media-max));
}

.fj-carousel-viewport {
    position: relative;
    overflow: hidden;
    background: rgba(109, 112, 88, 0.06);
    border-radius: 4px;
    /* Default until JS sets aspect from first image/video (inline style overrides) */
    aspect-ratio: 4 / 3;
}

.fj-carousel-slide {
    margin: 0;
    display: none;
    height: 100%;
}

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

.fj-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fj-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: clamp(32px, 8vw, 44px);
    height: clamp(32px, 8vw, 44px);
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--fj-accent);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease;
}

.fj-carousel-btn:hover {
    background: #fff;
}

.fj-carousel-prev {
    left: clamp(8px, 2vw, 10px);
}

.fj-carousel-next {
    right: clamp(8px, 2vw, 10px);
}

.fj-carousel-counter {
    display: block;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    color: var(--fj-muted);
    margin-top: 8px;
    letter-spacing: 0.08em;
}

.fj-empty {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: #8a8a8a;
    text-align: center;
    letter-spacing: 0.06em;
    margin: 48px 0 0;
}

/* Lightbox — click image to view large, dark backdrop, close only */
body.fj-lightbox-open {
    overflow: hidden;
}

.fj-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1050;
}

.fj-lightbox[aria-hidden="false"] {
    display: block;
}

.fj-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.fj-lightbox-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    z-index: 1;
    isolation: isolate;
}

.fj-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 30;
    border: none;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.fj-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
}

.fj-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 0;
    transition: background 0.15s ease;
}

.fj-lightbox-arrow:hover,
.fj-lightbox-arrow:focus {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}

.fj-lightbox-arrow[hidden] {
    display: none !important;
}

.fj-lightbox-arrow--prev { left: 18px; }
.fj-lightbox-arrow--next { right: 18px; }

.fj-lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    z-index: 20;
    pointer-events: none;
}

@media (max-width: 640px) {
    .fj-lightbox-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.35rem;
    }

    .fj-lightbox-arrow--prev { left: 10px; }
    .fj-lightbox-arrow--next { right: 10px; }
}

@media (max-width: 640px) {
    .fj-title {
        font-size: 1.75rem;
        letter-spacing: 0.2em;
    }

    .fj-page {
        padding-top: 36px;
        padding-bottom: 72px;
    }
}
