/* Haverkate ICT & Security — bedrijfssite
   Strak zwart thema met een heldere blauwe accentkleur (instelbaar), zoals
   de oorspronkelijke site — geen navy-vervaging, echte zwarte vlakken en
   scherp zichtbare foto's/iconen. */

:root {
    --bg: #000000;
    --bg-alt: #0a0a0c;
    --panel: #10151d;
    --panel-border: #29323d;
    --text: #f2f5f8;
    --text-dim: #aab4c0;
    --accent: #0074a6;
    --accent-bright: #29a9e0;
    --accent-dim: #06405c;
    --radius: 6px;
    --max-width: 1180px;
    --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--text-dim); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 18, 28, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--panel-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 0.01em;
}
.site-logo-img { height: 68px; width: auto; flex-shrink: 0; }

.main-nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li { position: relative; }

.main-nav a {
    display: block;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 10px 14px;
    border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav a.active { color: #fff; text-decoration: none; background: rgba(255,255,255,0.06); }

.has-submenu { display: flex; align-items: center; }
.submenu-toggle {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 0.7rem;
    line-height: 1;
}
.submenu-toggle:hover { color: #fff; }

.submenu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}

.has-submenu.open .submenu,
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li { margin: 0; }
.submenu a { padding: 10px 12px; font-size: 0.9rem; border-radius: 6px; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--panel-border);
    color: var(--text);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- Layout ---------- */

.content-main { min-width: 0; }

.flash-wrap { padding-top: 20px; }

.page-content {
    max-width: 780px;
    padding: 48px 24px 80px;
}
.page-content h1 { margin-bottom: 0.3em; }
.page-subtitle { font-size: 1.1rem; color: var(--text); margin-bottom: 1.4em; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--panel-border);
    background: transparent;
    color: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--accent-bright); text-decoration: none; }
.btn-solid { background: var(--accent); border-color: var(--accent); }
.btn-solid:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn-block { display: block; width: 100%; }

/* ---------- Hero (homepage) ---------- */

.hero {
    position: relative;
    padding: 90px 0 70px;
    background: linear-gradient(rgba(0,0,0,var(--hero-overlay,0.55)), rgba(0,0,0,var(--hero-overlay,0.55))),
                var(--hero-image, none) center/cover no-repeat;
    border-bottom: 1px solid var(--panel-border);
    text-align: center;
}
.hero-inner { max-width: 760px; }
.hero h1 { margin-bottom: 0.4em; }
.hero-subtitle { font-size: 1.15rem; color: var(--text); max-width: 56ch; margin: 0 auto 2em; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Hub-pagina hero ---------- */

.hub-hero {
    background-color: var(--panel);
    background-image: linear-gradient(rgba(0,0,0,var(--hero-overlay,0.55)), rgba(0,0,0,var(--hero-overlay,0.55))),
                       var(--hero-image, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--panel-border);
    padding: 56px 0;
}
.hub-hero .eyebrow {
    color: var(--accent-bright);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
}
.hub-hero .rich-content { max-width: 70ch; }
.hub-hero h1:last-child { margin-bottom: 0; }

/* ---------- Section headings ---------- */

.section-heading { text-align: center; margin: 56px 0 28px; }
section.container:first-of-type .section-heading:first-child { margin-top: 56px; }

/* ---------- Card grid ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 16px;
}

.card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 28px 24px;
    color: var(--text);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--accent-bright); transform: translateY(-3px); text-decoration: none; }
.card h3 { margin-bottom: 8px; color: #fff; }
.card p { margin: 0; font-size: 0.94rem; }

/* Voor kaarten zonder link — geen kader/vlak, zodat ze niet als aanklikbaar ogen. */
.card-plain { display: block; color: var(--text); }
.card-plain h3 { margin-bottom: 8px; color: #fff; }
.card-plain p { margin: 0; font-size: 0.94rem; }

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent-bright);
    margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }

/* Geüploade merkillustraties tonen groter en zonder gekleurd vlak — die
   iconen zijn al een volledig, kleurrijk beeld op zichzelf. */
.card-icon:has(img) {
    width: 64px; height: 64px;
    background: none;
    border-radius: 0;
}
.card-icon img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- CTA banner ---------- */

.cta-banner {
    background: linear-gradient(135deg, rgba(0,64,92,0.6), rgba(0,0,0,0.82)),
                var(--hero-image, none) center/cover no-repeat;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    padding: 64px 0;
    text-align: center;
    margin-top: 56px;
}
.cta-banner h2 { max-width: 46ch; margin-left: auto; margin-right: auto; }
.cta-banner p { max-width: 56ch; margin-left: auto; margin-right: auto; font-size: 1.05rem; }
.cta-banner .hero-actions { margin-top: 24px; }

/* ---------- Contact ---------- */

.contact-embed { max-width: 640px; margin: 0 auto 64px; }
.contact-form { margin-top: 8px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}

.optional { font-weight: 400; color: var(--text-dim); text-transform: none; letter-spacing: 0; }

/* ---------- Forms ---------- */

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 16px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-bright);
}
textarea { min-height: 140px; resize: vertical; }
.field-honeypot { position: absolute; left: -9999px; }

/* ---------- Rich text content ---------- */

.rich-content::after { content: ""; display: table; clear: both; }
.rich-content p { margin: 0 0 1em; color: var(--text-dim); }
.rich-content ul, .rich-content ol { color: var(--text-dim); padding-left: 1.3em; margin-bottom: 1em; }
.rich-content li { margin-bottom: 0.4em; }
.rich-content h2 { margin-top: 1.2em; }
.rich-content strong { color: var(--text); }

.rich-content .ql-img-float-left,
.rich-content img.ql-img-float-left { float: left; width: 38%; margin: 6px 28px 16px 0; }
.rich-content .ql-img-float-right,
.rich-content img.ql-img-float-right { float: right; width: 38%; margin: 6px 0 16px 28px; }
.rich-content .ql-img-float-center,
.rich-content img.ql-img-float-center { float: none; clear: both; display: block; width: 60%; margin: 6px auto 16px; }

.rich-content .ql-img-width-25 { width: 25%; }
.rich-content .ql-img-width-40 { width: 40%; }
.rich-content .ql-img-width-60 { width: 60%; }
.rich-content .ql-img-width-100 { width: 100%; }

.rich-content .ql-img-float-left img, .rich-content .ql-img-float-right img, .rich-content .ql-img-float-center img,
.rich-content .ql-img-width-25 img, .rich-content .ql-img-width-40 img,
.rich-content .ql-img-width-60 img, .rich-content .ql-img-width-100 img { display: block; width: 100%; border-radius: 6px; }
.rich-content img.ql-img-float-left, .rich-content img.ql-img-float-right, .rich-content img.ql-img-float-center { border-radius: 6px; }

@media (max-width: 640px) {
    .rich-content .ql-img-float-left, .rich-content .ql-img-float-right, .rich-content .ql-img-float-center,
    .rich-content img.ql-img-float-left, .rich-content img.ql-img-float-right, .rich-content img.ql-img-float-center { float: none; width: 100%; margin: 0 0 16px; }
}
.rich-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: 0.2em 1.2em;
    color: var(--text-dim);
    font-style: italic;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--panel-border);
    padding-top: 40px;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 32px;
}
.footer-about .site-logo { margin-bottom: 10px; }
.footer-about p { max-width: 40ch; }
.footer-links h4 { color: var(--text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.footer-links a { display: block; margin-bottom: 6px; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent-bright); }
.footer-bottom { border-top: 1px solid var(--panel-border); padding: 20px 0; text-align: center; font-size: 0.85rem; }

/* ---------- Flash messages ---------- */

.flash { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.flash-success { background: rgba(41, 163, 181, 0.12); border: 1px solid var(--accent-bright); color: #a8e6ee; }
.flash-error { background: rgba(200, 80, 80, 0.12); border: 1px solid #b5544f; color: #f3a8a4; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-logo { font-size: 1rem; gap: 8px; }
    .site-logo-img { height: 48px; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--panel-border);
        max-height: 80vh;
        overflow-y: auto;
    }
    .main-nav.open { display: block; }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; }
    .main-nav > ul > li { border-bottom: 1px solid var(--panel-border); }
    .has-submenu { flex-wrap: wrap; }
    .has-submenu > a { flex: 1; }
    .submenu {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 8px 12px;
    }
    .has-submenu.open .submenu { display: block; }
    .hero { padding: 56px 0 44px; }
}
