/* GLOBAL */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    color: #222;
}

/* PROJECT HERO ? now a banner, not full-height */
.project-hero {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    padding: 60px 20px; /* controls banner height */
    margin-top: 80px;   /* space before the banner */
}

.project-hero.ukraine {
    background-image: url('https://runeclausen.dk/uploads/54907577196_5ba89bbdad_k.jpg'); /* replace per project */
}

.project-hero.atletik {
    background-image: url('https://runeclausen.dk/uploads/54589627272_e395f37a0c_k.jpg'); /* replace per project */
}

.project-hero.palestine {
    background-image: url('https://runeclausen.dk/uploads/palestine-cover.jpg'); /* replace per project */
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Serif fonts for title + description */
.project-title {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 3rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.project-description {
    font-family: "Georgia", serif;
    font-size: 1.2rem;
    max-width: 700px;
    margin-top: 10px;
    color: #f0f0f0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* PAGE WRAPPER */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px; /* more top padding, half side padding */
}

/* SECTIONS */
.project-section {
    margin: 50px 0;
}

.project-section h2 {
    font-size: 1.7rem;
    margin-bottom: 15px;
}

/* IMAGE GRID */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.image-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.image-grid-simple img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.image-grid-dynamic {
    column-count: 3;
    column-gap: 25px;
    margin: 40px 0;
}

.image-grid-dynamic img {
    width: 100%;
    height: auto;        /* preserves natural ratio */
    margin-bottom: 25px;
    border-radius: 6px;
    cursor: pointer;
}

/* PDF LIST */
.pdf-list {
    list-style: none;
    padding: 0;
}

.pdf-list li {
    margin: 10px 0;
}

.pdf-list a {
    color: #0066cc;
    text-decoration: none;
}

/* YOUTUBE EMBED */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ----------------------------- */
/* ?? MOBILE RESPONSIVE DESIGN   */
/* ----------------------------- */

@media (max-width: 768px) {

    .project-hero {
        height: 40vh;
        padding: 40px 15px;
    }

    .project-title {
        font-size: 2.2rem;
    }

    .project-description {
        font-size: 1rem;
    }

    .page-wrapper {
        padding: 60px 15px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-grid-dynamic {
        column-count: 2;
    }

    .image-text-block {
        flex-direction: column;
        gap: 25px;
    }
}

@media (max-width: 480px) {

    .project-title {
        font-size: 1.8rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .page-wrapper {
        padding: 50px 12px;
    }

    .image-grid-dynamic {
        column-count: 1;
    }
}

.carousel-container {
    width: 100%;
    margin: 60px 0;
    position: relative;
}

/* The carousel itself expands to viewport width */
.carousel {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    padding: 40px 0;
}

.carousel-track {
    display: flex;
    gap: 40px; /* must match JS */
    transition: transform 0.4s ease;
    align-items: center;
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-item figcaption {
    margin-top: 10px;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: #000;
    text-align: center;
    max-width: 700px;
}

.carousel-image {
    width: 40vw;
    max-width: 700px;
    height: auto;
    max-height: 50vh;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.carousel-image.active {
    opacity: 1;
}

/* fade edges */
.carousel::before,
.carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(248,248,248,1), rgba(248,248,248,0));
}

.carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(248,248,248,1), rgba(248,248,248,0));
}

/* arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 3;
}

.left-btn { left: 20px; }
.right-btn { right: 20px; }

.carousel-btn:hover {
    background: rgba(0,0,0,0.6);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-text-block {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 80px 0;
}

.itb-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.itb-image {
    flex: 1;
}

.itb-text {
    flex: 1;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

.itb-text h2 {
    font-family: Georgia, serif;
    font-style: italic;
    margin-bottom: 15px;
}

.content-list {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ccc;
}

.content-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-list a {
    text-decoration: none;
    font-weight: 600;
    color: #333;
}

.content-list a:hover {
    text-decoration: underline;
}