/* x:\Files\Work\Velanor\Website\style.css */
/* --- Layout & vars --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* tweak page width and image/text proportions */
:root {
    --page-width: 90%;
    --page-max: 1100px;
    /* was 1400px -> narrower content column */
    --logo-height: 80px;
    --header-padding-vertical: 12px;
    --header-padding-horizontal: 20px;
    --menu-gap: 10px;
    --flyout-width: 60vw;
    --flyout-bg: #ffffff;
    --accent: #dcdcdc;
}

/* -------- base sizing -------- */
html {
    /* ensure rem/em are based on a consistent root size */
    font-size: 16px;
    /* keeps breakpoints predictable across devices */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    /* equals 16px from html */
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url("images/small/Dak in aanbouw.jpg");
    min-height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Header container - same centered width as inner page */
.header {
    position: sticky;
    top: 0;
    margin: 0 auto;
    width: var(--page-width);
    max-width: var(--page-max);
    background-color: #ececec;
    padding: var(--header-padding-vertical) var(--header-padding-horizontal);
    z-index: 110;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Header inner: logo on left, nav to the right */
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* left-align logo */
.logo-link {
    margin-right: auto;
    display: inline-block;
}

.logo {
    height: var(--logo-height);
    width: auto;
    display: block;
    max-height: 100px;
    /* Give the png logo a shadow for contrast */
    filter: drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.3));
}

/* hamburger (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    margin-left: 8px;
    cursor: pointer;
}

.hamburger:focus {
    outline: 2px solid rgba(0, 0, 0, 0.12);
}

/* hamburger visual */
.hamburger-box {
    display: inline-block;
    width: 28px;
    height: 18px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #222;
    left: 0;
    transition: transform .25s ease, opacity .25s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -8px;
}

.hamburger-inner::after {
    content: '';
    top: 8px;
}

/* when menu is open, animate hamburger into "X" */
.hamburger[aria-expanded="true"] .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-inner::before {
    transform: rotate(90deg) translateX(0);
    top: 0;
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-inner::after {
    transform: rotate(-90deg);
    top: 0;
}

/* Desktop nav */
.menu {
    display: flex;
    gap: var(--menu-gap);
    align-items: center;
}

/* menu items common */
.menu-item {
    text-decoration: none;
    color: #000;
    padding: 8px 12px;
    font-size: 1.1rem;
    /* equals 16px from html */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ensure visited not purple */
.menu-item:visited {
    color: #000;
}

/* --- Style 1 (clean text with subtle underline on hover) --- */
.menu .menu-item {
    border: none;
    background: transparent;
    padding: 8px 10px;
    position: relative;
}

.menu .menu-item::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 4px;
    height: 2px;
    background: transparent;
    transition: background .15s ease, transform .15s ease;
    transform-origin: center;
}

.menu .menu-item:hover::after {
    background: #222;
    transform: scaleX(1);
}

/* --- Flyout (mobile) --- */
/* use em-based breakpoint so it scales with root font-size and with HiDPI devices */
@media (max-width: 48em) {
    /* 48em = 48 * 16px = 768px - good standard mobile/tablet breakpoint */

    /* show hamburger */
    .hamburger {
        display: inline-block;
    }

    /* Prepare the menu off-screen; make sure it sits above the overlay */
    .menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: var(--flyout-width);
        max-width: 420px;
        padding: 20px;
        background: var(--flyout-bg);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
        transform: translateX(120%);
        transition: transform .28s ease;
        z-index: 115;
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        overflow-y: auto;
        /* make menu text scale slightly larger on high-dpi phones */
        font-size: 1.125rem;
        /* ~18px for better readability */
    }

    /* open state — slide in */
    .menu.open {
        transform: translateX(0%);
    }

    /* full-screen overlay to dim page when menu open (kept under menu) */
    body.menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 102;
    }

    /* larger touch targets in flyout */
    .menu.open .menu-item {
        padding: 16px 12px;
        /* larger tap area */
        font-size: 1.125rem;
        /* consistent with container */
        border-bottom: 1px solid #eee;
    }

    /* make logo slightly smaller on small screens */
    .logo {
        height: calc(var(--logo-height) * 0.9);
    }
}

/* keep the header and inner-page aligned */
.inner-page {
    width: var(--page-width);
    max-width: var(--page-max);
    margin: 0px auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

/* --- Content blocks: image fixed 4:3 aspect ratio, crop to fill, rounded corners + shadow --- */

.content-block {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    /* margin: 1.75rem 0; */
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    padding-left: 50px;
    padding-right: 50px;
    width: 100%;
}

.even{
    /* background color for debugging */
    background: #ffffffe5;
}

.odd{
    /* background color for debugging */
    background: #e4e3e3e5;
}

.site-map{
    /* background color for debugging */
    background: #26392FF5;
    /* text color gray-white */
    color: #b9b9b9;
}

.site-map a{
    /* link color white */
    color: #b9b9b9;
    text-decoration: none;
}

/* Reverse flips the order on wide screens */
.content-block.reverse {
    flex-direction: row-reverse;
}

/* reduce image column width so images don't dominate */
.cb-image {
    flex: 0 0 40%;
    /* was 48% -> use 40% */
    max-width: 40%;
    position: relative;
    padding-bottom: 30%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    /* slightly softer shadow */
    background: #f6f6f6;
}

/* img fills the container and is cropped to cover */
.cb-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* crop to fill 4:3 box */
    display: block;
    /* don't set border-radius here; container handles rounded corners */
}

/* Text column */
.cb-text {
    flex: 1 1 60%;
    max-width: 60%;
}

/* Titles and block text */
/* adjust title a touch to keep hierarchy */
.cb-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
    /* ~21px */
    line-height: 1.15;
}

/* give the text a slightly larger, more readable size */
.content-block .cb-text p {
    margin: 0 0 0.75rem 0;
    font-size: 1.0625rem;
    /* ~17px */
    line-height: 1.6;
    /* a bit more breathing room */
}

/* text-only variant hides the image column */
.content-block.text-only .cb-image {
    display: none;
}

/* update text-only to match proportions */
.content-block.text-only .cb-text {
    max-width: 100%;
    flex: 1 1 100%;
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* RESPONSIVE: stack vertically on smaller screens (image above text).
   Keep the 4:3 aspect ratio by keeping padding-bottom:75% and making the image full-width. */
@media (max-width: 48em) {

    .content-block,
    .content-block.reverse {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .cb-image {
        flex: 0 0 100%;
        max-width: 100%;
        padding-bottom: 75%;
    }

    .content-block .cb-text p {
        font-size: 1rem;
        /* keep mobile a bit smaller for density */
        line-height: 1.5;
    }

    .cb-text {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* ensure absolutely-positioned image still fills the box */
    .cb-image img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cb-title {
        font-size: 1.6rem;
    }
}