/**
 * Webversie Newsletter View Styles
 * Dynamic values come from inline style on .wv-wrapper element
 */

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.wv-nav {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.wv-nav__inner {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wv-nav__brand {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.wv-nav__brand img {
    display: block;
}

.wv-nav__logo {
    max-height: 36px;
    width: auto;
}

.wv-nav__dropdown-btn {
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
}

.wv-nav__dropdown-btn:hover {
    color: var(--brand-primary);
}

.wv-nav__dropdown-btn:focus {
    outline: 2px solid var(--wv-primary);
    outline-offset: 2px;
}

.wv-nav__dropdown-text {
    display: inline;
}

/* Navigation title (newsletter name + edition) */
.wv-nav__title {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    min-width: 0;
}

.wv-nav__newsletter {
    display: block;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wv-nav__edition {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wv-kop-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav menu: items separated by | */
.wv-nav__menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.wv-nav__sep {
    color: #ccc;
    margin: 0 0.5rem;
    font-weight: 300;
    user-select: none;
}

/* Desktop/mobile nav toggle (breakpoint 600px) */
.wv-nav__mobile {
    display: none;
}

@media (max-width: 600px) {
    .wv-nav__desktop {
        display: none !important;
    }
    .wv-nav__mobile {
        display: flex !important;
    }
}

/* Hamburger button (mobile) */
.wv-nav__hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0;
    cursor: pointer;
    color: inherit;
    line-height: 1;
}

/* Offcanvas menu styling */
.wv-offcanvas__heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary, var(--wv-primary));
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

.wv-offcanvas__heading:first-child {
    margin-top: 0;
}

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

.wv-offcanvas__list li a {
    display: block;
    padding: 0.4rem 0;
    color: #000;
    text-decoration: none;
    font-size: 0.9rem;
}

.wv-offcanvas__list li a:hover,
.wv-offcanvas__list li a.active {
    color: var(--brand-primary, var(--wv-primary));
}

.wv-offcanvas__cat {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--brand-primary, var(--wv-primary));
    padding: 0.5rem 0 0.15rem;
}

.wv-offcanvas__link {
    display: block;
    padding: 0.5rem 0;
    color: var(--brand-primary, var(--wv-primary));
    text-decoration: none;
    font-size: 0.9rem;
}

.wv-offcanvas__link:hover {
    opacity: 0.7;
}

/* Aanmelden link in nav */
.wv-nav__link {
    font-size: 0.875rem;
    color: var(--brand-primary);
    text-decoration: none;
    white-space: nowrap;
}

.wv-nav__link:hover {
    opacity: 0.7;
}

/* Archief dropdown: scrollable list */
.wv-nav__archief-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Override Bootstrap active item kleur */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--brand-primary);
    color: #fff;
}

/* Accessibility helpers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.visually-hidden-mobile {
    display: none;
}

@media (min-width: 600px) {
    .visually-hidden-mobile {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

}

/* Focus styles for accessibility */
.wv-button:focus,
.wv-item__image-link:focus {
    outline: 2px solid var(--wv-primary);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--wv-primary);
    outline-offset: 2px;
}

/* Wrapper */
.wv-wrapper {
    background: var(--wv-page-bg);
    min-height: 100vh;
    padding: 0;
}

.wv-container {
    max-width: var(--wv-max-width);
    margin: 0 auto;
    background: var(--wv-page-bg);
}

.wv-wrapper--wide .wv-container {
    max-width: 800px;
}

/* Header with logo */
.wv-header {
    background: var(--wv-header-bg);
    padding: var(--wv-header-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.wv-header img {
    display: block;
    max-width: var(--wv-logo-width);
    height: auto;
}

.wv-header__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wv-primary);
    text-decoration: underline;
    text-decoration-color: var(--wv-link-underline-color, var(--wv-primary));
}

.wv-header__link:hover {
    opacity: 0.8;
}

.wv-header__link-icon {
    vertical-align: middle;
}

/* Header image */
.wv-header-image {
    width: 100%;
}

.wv-header-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tagline */
.wv-tagline {
    background: var(--wv-tagline-bg);
    color: var(--wv-tagline-color);
    font-size: var(--wv-tagline-font-size);
    font-weight: var(--wv-tagline-font-weight);
    padding: var(--wv-tagline-padding);
    font-family: var(--wv-font-body);
}

/* Content */
.wv-content {
    padding: 0;
    gap: var(--wv-divider-height, 0);
    display: flex;
    flex-direction: column;
    background-color: var(--wv-divider-bg, transparent);
}

/* Row wrapper for alternating colors */
.wv-row {
    /* Default fallback */
    background-color: var(--wv-alt-color-1, #ffffff);
}

/* Alternating colors: odd rows use color 1, even rows use color 2 */
.wv-row:nth-of-type(odd) {
    background-color: var(--wv-alt-color-1, #ffffff);
}

.wv-row:nth-of-type(even) {
    background-color: var(--wv-alt-color-2, var(--wv-alt-color-1, #ffffff));
}

/* Grid layout (2 columns) - inherits background from .wv-row */
.wv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: transparent;
}

.wv-grid .wv-item {
    padding: 15px 15px 30px;
}

.wv-grid .wv-item:first-child {
    padding-right: 10px;
}

.wv-grid .wv-item:last-child {
    padding-left: 10px;
}

/* Grid button row (below items, matching email layout) */
.wv-grid--buttons {
    padding: 0 15px 20px;
}

.wv-grid__button-cell {
    padding: 0 10px 0 0;
}

.wv-grid__button-cell:last-child {
    padding: 0 0 0 10px;
}

/* Mobile button (inside item, hidden on desktop) */
.wv-item__mobile-button {
    display: none;
}

/* Item - inherits background from .wv-row */
.wv-item {
    background: transparent;
    font-family: var(--wv-font-body);
}

/* Target highlight animation when jumping from TOC */
@keyframes target-border-fade {
    0% {
        border-color: transparent;
    }
    50% {
        border-color: var(--wv-primary, #00811f);
    }
    100% {
        border-color: transparent;
    }
}

.wv-item {
    scroll-margin-top: 80px; /* Ruimte voor sticky nav */
}

.wv-item:target {
    border: 1px solid transparent;
    animation: target-border-fade 2s ease-in-out 0.5s forwards;
}

.wv-item__image-link {
    display: block;
}

.wv-item__image img,
.wv-item__image-link img {
    width: 100%;
    height: auto;
    display: block;
}

.wv-item__image,
.wv-item__image-link {
    margin-bottom: 8px;
}

.wv-item__body {
    padding: 0;
}

.wv-item__title {
    font-family: var(--wv-font-kop) !important;
    font-weight: 700 !important;
    font-size: var(--wv-size-kop) !important;
    color: var(--wv-color-kop, var(--wv-kop-color)) !important;
    margin: 12px 0 8px !important;
    line-height: 1.3 !important;
}

.wv-item__lead {
    font-family: var(--wv-font-body) !important;
    font-size: var(--wv-size-body) !important;
    color: var(--wv-body-color) !important;
    margin: 0;
    line-height: 1.5;
}

/* Button row (below grid) */
.wv-button-row {
    background: #fff;
    padding: 0 15px 20px;
}

/* Button — outline style activates when --wv-btn-border is set by template */
.wv-button {
    display: inline-block;
    background: var(--wv-btn-bg);
    color: var(--wv-btn-color);
    padding: var(--wv-btn-padding);
    font-size: var(--wv-btn-font-size);
    font-weight: var(--wv-btn-font-weight);
    text-decoration: none;
    border-radius: var(--wv-btn-radius);
    font-family: var(--wv-font-body);
    border: var(--wv-btn-border, none);
    transition: background 0.3s, color 0.3s;
}

.wv-button:hover {
    background: var(--wv-btn-hover-bg, var(--wv-btn-bg));
    color: var(--wv-btn-hover-color, var(--wv-btn-color));
    opacity: 0.9;
}

/* Big items (full width) */
.wv-item--f,
.wv-item--full,
.wv-item--b,
.wv-item--big {
    padding: 20px 30px 40px;
}

.wv-item--l,
.wv-item--left,
.wv-item--lv,
.wv-item--r,
.wv-item--right,
.wv-item--rv {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 2px;
    padding: 20px 30px 40px;
    align-items: start;
}

.wv-item--l > .wv-item__title,
.wv-item--left > .wv-item__title,
.wv-item--lv > .wv-item__title,
.wv-item--r > .wv-item__title,
.wv-item--right > .wv-item__title,
.wv-item--rv > .wv-item__title {
    grid-column: 1 / -1;
    margin-top: 0 !important;
}

.wv-item--r .wv-item__image,
.wv-item--right .wv-item__image,
.wv-item--rv .wv-item__image {
    order: 2;
}

/* Footer spacing (between content and footer area) */
.wv-footer-spacing {
    height: var(--wv-footer-spacing-height, 0);
    background-color: var(--wv-footer-spacing-bg, transparent);
    border: none;
    margin: 0;
    padding: 0;
}

/* Custom Footer (edition-specific) */
.wv-custom-footer {
    background-color: var(--wv-footer-bg);
    color: var(--wv-footer-color);
    padding: 20px;
    margin-top: 20px;
}

.wv-custom-footer__title {
    margin: 0 0 10px 0;
    font-weight: bold;
    font-size: var(--wv-footer-font-size);
}

.wv-custom-footer__content {
    font-size: var(--wv-footer-font-size);
}

/* Footer Social */
.wv-footer-social {
    background: var(--wv-footer-social-bg, var(--wv-primary));
    color: var(--wv-footer-social-color, #ffffff);
    padding: 20px 15px;
    text-align: center;
    font-family: var(--wv-font-body);
}

.wv-footer-social__title {
    margin: 0 0 15px 0;
    line-height: 1.2;
    font-size: var(--wv-footer-social-font-size, 14px);
    font-weight: var(--wv-footer-social-font-weight, 700);
}

.wv-footer-social__links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wv-footer-social__link {
    display: inline-block;
}

.wv-footer-social__link img {
    display: block;
    border-radius: 3px;
    width: 32px;
    height: 32px;
}

/* Partner Logos (gebruikt .wv-item--l layout) */
.wv-partner-logos {
    background-color: #ffffff;
}

.wv-partner-logos__left {
    text-align: left;
}

.wv-partner-logos__right {
    text-align: right;
}

.wv-partner-logos img {
    display: inline-block;
    height: auto;
}

.wv-partner-logos__left img,
.wv-partner-logos__right img {
    max-width: 200px;
}

/* Footer */
.wv-footer {
    background: var(--wv-footer-bg);
    color: var(--wv-footer-color);
    padding: var(--wv-footer-padding);
    font-size: var(--wv-footer-font-size);
    text-align: center;
    font-family: var(--wv-font-body);
    line-height: 1.6;
}

.wv-footer a {
    color: var(--wv-footer-link-color);
    text-decoration: underline;
}

.wv-footer p {
    margin: 0;
}

/* Full width layout override */
.public-main.full-width {
    padding: 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wv-grid {
        grid-template-columns: 1fr;
    }

    .wv-grid .wv-item {
        padding: 15px;
    }

    .wv-grid .wv-item:first-child,
    .wv-grid .wv-item:last-child {
        padding: 15px;
    }

    /* Show mobile button, hide desktop button row */
    .wv-item__mobile-button {
        display: block;
        margin-top: 16px;
    }

    .wv-grid--buttons {
        display: none;
    }

    .wv-item--l,
    .wv-item--left,
    .wv-item--lv,
    .wv-item--r,
    .wv-item--right,
    .wv-item--rv {
        grid-template-columns: 1fr;
    }

    .wv-item--r .wv-item__image,
    .wv-item--right .wv-item__image,
    .wv-item--rv .wv-item__image {
        order: 0;
    }
}
