/* =========================================================
   Archive Wrapper / Hero
   ========================================================= */

.bv-archive-wrapper {
    min-height: 100vh;
    padding: 0 2rem 3rem;
    background-color: var(--bv-wrapper-bg);
    color: var(--bv-text-primary);
    font-family: var(--bv-font-family);
}

.bv-archive-hero {
    position: relative;
    height: 400px;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bv-archive-hero-overlay {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(
        to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.25) 55%,
        rgba(0,0,0,0.45) 100%
      );
    z-index: 1;
}

.bv-archive-hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem 2rem;
    text-align: center;
}

.bv-archive-title {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--bv-white);
    text-align: center;
    text-shadow: 0 6px 22px rgba(0,0,0,.45);

    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.bv-archive-title::after {
    content: "";
    display: block;
    width: min(180px, 55%);
    height: 3px;
    margin: 0.85rem auto 0;
    background: var(--bv-accent);
    border-radius: var(--bv-radius-pill);
}

@media (max-width: 768px) {
    .bv-archive-hero {
        height: 220px;
    }

    .bv-archive-hero-content {
        padding: 1rem;
    }

    .bv-archive-title {
        font-size: clamp(2rem, 7vw, 2.8rem);
    }
}

/* =========================================================
   Layout
   ========================================================= */

.bv-archive-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: min(var(--bv-page-max-width), 1400px);
    margin: 0 auto;
}

.bv-archive-sidebar {
    flex: 0 0 250px;
}

.bv-archive-main {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   Intro Box
   ========================================================= */

.baumvolk-logo {
    padding-bottom: 20px;
}

.baumvolk-intro-box {
    position: relative;

    width: 100vw;
    left: 50%;
    transform: translateX(-50%);

    background: #1e1e1e;
    color: #e0e0e0;
    padding-bottom: 0;
    min-height: 500px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.baumvolk-intro-content {
    max-width: 900px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.baumvolk-intro-title {
    font-size: 42px;
    margin-bottom: 1rem;
    color: #fff;
    max-width: 500px;
}

.baumvolk-intro-text {
    font-size: 22px;
    line-height: 1.6;
    color: #ccc;
}

@media (max-width: 1024px) {
    .baumvolk-inner-wrapper {
        padding: 40px 16px;
    }

    .baumvolk-intro-box {
        padding: 40px 16px;
        min-height: 400px;
    }

    .baumvolk-intro-title {
        font-size: 36px;
    }

    .baumvolk-intro-text {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .baumvolk-inner-wrapper {
        padding: 30px 12px;
    }

    .baumvolk-intro-box {
        padding: 30px 12px;
        min-height: 320px;
    }

    .baumvolk-intro-title {
        font-size: 28px;
    }

    .baumvolk-intro-text {
        font-size: 16px;
    }
}

/* =========================================================
   Results / Grid
   ========================================================= */

.bv-results-fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.bv-results-visible {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.bv-archive-grid {
    display: grid;
    width: 100%;
    max-width: 100%;
    padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: start;
    background-color: transparent;
}

.bv-archive--bonsai .bv-archive-grid,
.bv-archive--journal .bv-archive-grid,
.bv-my-journals-page .bv-archive-grid,
.owner-journals .bv-archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 300px));
}

/* =========================================================
   Empty State
   ========================================================= */

.bv-no-results {
    background: var(--bv-card-bg);
    padding: 2rem;
    text-align: center;
    color: var(--bv-text-secondary);
    border: 1px solid var(--bv-border-soft);
    border-left: 4px solid var(--bv-accent);
    border-radius: var(--bv-radius-lg);
    font-size: 1.1rem;
    box-shadow: var(--bv-card-shadow);
}

/* =========================================================
   Pagination
   ========================================================= */

#bv-pagination-wrapper {
    position: sticky;
    bottom: 20px;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

.bv-pagination-container {
    background: var(--bv-surface-glass);
    border: 1px solid var(--bv-border-subtle-strong);
    padding: 8px 14px;
    border-radius: var(--bv-radius-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.4s ease;
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--bv-shadow-elevated);
}

.bv-pagination-container.hidden {
    opacity: 0;
    pointer-events: none;
}

/* WordPress paginate_links */
.bv-pagination-container .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bv-pagination-container .page-numbers li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bv-pagination-container .page-numbers li a,
.bv-pagination-container .page-numbers li span,
.bv-pagination-container > a,
.bv-pagination-container > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 2px 6px;
    border: 1px solid var(--bv-border-soft);
    background: var(--bv-card-bg);
    color: var(--bv-accent);
    cursor: pointer;
    border-radius: var(--bv-radius-xs);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bv-pagination-container .page-numbers li a:hover,
.bv-pagination-container > a:hover {
    border-color: var(--bv-accent-border-soft);
    background: var(--bv-surface-soft);
    border: 1px solid var(--bv-border-soft) !important;
}

.bv-pagination-container .page-numbers .current,
.bv-pagination-container > span.current {
    background: var(--bv-accent);
    color: var(--bv-black);
    font-weight: 700;
    border-color: var(--bv-accent);
    margin: 0;
}

.bv-pagination-container .page-numbers .dots {
    cursor: default;
    opacity: 0.7;
}

.bv-pagination-container a.prev,
.bv-pagination-container a.next,
.bv-pagination-container .prev,
.bv-pagination-container .next {
    font-weight: 700;
}

.bv-pagination-container .page-numbers li .prev,
.bv-pagination-container .page-numbers li .next {
    padding-inline: 14px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 790px) {
    .bv-archive-wrapper {
        padding: 0 1rem 2rem;
    }

    .bv-archive-layout {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .bv-archive-sidebar {
        width: 100%;
    }

    .bv-archive-main {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }

    .bv-archive-grid {
        width: 100%;
        max-width: 500px;
        grid-template-columns: 1fr;
        justify-content: center;
        justify-items: center;
        gap: 30px;
        margin: 0 auto;
    }

    #bv-pagination-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .bv-archive-main {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .bv-archive-grid {
        padding: 0;
    }
}
