/* ==============================================
   HULSCHER ELEKTROTECHNIEK — style.css
   Shared across all pages
   ============================================== */

/* DESIGN TOKENS
   ============================================== */
:root {
    --accent:       #3986C4;
    --accent-hover: #2a6fa8;
    --dark:         #1a1a1a;
    --text:         #222222;
    --text-light:   #555555;
    --max-w:        1150px;
    --header-h:     100px;
    --footer-h:     62px;
    --transition:   0.28s ease;
}

/* RESET / BASE
   ============================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    overflow-x: hidden;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
    position: relative;
}

/* Prevent rubber-band / sliding on short-content pages */
html {
    min-height: 101%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* BACKGROUND SLIDER
   ============================================== */
.bg-slide {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.bg-slide.active { opacity: 1; }

/* HEADER
   ============================================== */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--dark);
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 5px 28px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#site-logo img {
    height: 62px;
    width: auto;
}

/* Desktop nav */
#main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
}

#main-nav a {
    display: block;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 3px;
    transition: color var(--transition), background var(--transition);
}

#main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

#main-nav a.active {
    color: #1a1a1a;
    background: #EAEC11;
}

/* Hamburger */
#menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

#menu-toggle span {
    display: block;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

#menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
#mobile-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--dark);
    z-index: 99;
    padding: 16px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    /* Hidden state — slide up + fade out */
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

#mobile-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#mobile-nav ul { list-style: none; }

/* Stagger each nav link sliding in */
#mobile-nav li {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#mobile-nav.open li:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.10s; }
#mobile-nav.open li:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.18s; }
#mobile-nav.open li:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.26s; }
#mobile-nav.open li:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.34s; }
#mobile-nav.open li:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.42s; }
#mobile-nav.open li:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.50s; }
#mobile-nav.open li:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.58s; }

#mobile-nav a {
    display: block;
    padding: 13px 28px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#mobile-nav a:hover,
#mobile-nav a.active { color: #EAEC11; }

/* PAGE WRAPPER
   ============================================== */
#page-wrap {
    min-height: 100vh;
    padding-top: var(--header-h);
    padding-bottom: var(--footer-h);  /* reserve space for fixed footer */
    display: flex;
    flex-direction: column;
}

/* CONTENT CARD
   ============================================== */
.content-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    max-width: var(--max-w);
    width: calc(100% - 40px);
    margin: 36px auto 36px;
    border-radius: 3px;
    overflow: hidden;
}

/* Inner padding for standard content pages */
.card-body {
    padding: 37px 37px 30px 37px;
}

/* PAGE H1 — page title above separator
   Same size/weight/tracking as nav menu links
   ============================================== */
.page-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 12px;  /* tight gap to separator */
}

/* Decorative separator below page title */
.page-title-sep {
    width: 40px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 15px;  /* gap between separator and first h2/content */
}

/* SHARED BUTTONS
   ============================================== */
.btn-primary {
    display: inline-block;
    padding: 13px 30px;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 3px;
    transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-block;
    padding: 13px 30px;
    background: transparent;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 2px solid var(--text-light);
    border-radius: 3px;
    transition: border-color var(--transition), color var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Button slide-in animation */
@keyframes btnSlideIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button group — equal margin above and below */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 0;
}

/* Animate each button in sequence */
.btn-group .btn-primary,
.btn-group .btn-outline {
    opacity: 0;
    animation: btnSlideIn 0.45s ease forwards;
}

.btn-group .btn-primary  { animation-delay: 0.15s; }
.btn-group .btn-outline  { animation-delay: 0.30s; }

/* Also animate CTA on home page hero */
.hero-cta .btn-primary,
.hero-cta .btn-outline {
    opacity: 0;
    animation: btnSlideIn 0.45s ease forwards;
}

.hero-cta .btn-primary { animation-delay: 0.20s; }
.hero-cta .btn-outline { animation-delay: 0.38s; }

/* FOOTER — fixed to bottom
   ============================================== */
#site-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--footer-h);
    background: rgba(26, 26, 26, 0.95);
    z-index: 100;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-credit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

.footer-credit a { color: var(--accent); }
.footer-credit a:hover { color: var(--accent-hover); }

/* ==============================================
   HOME PAGE — index.html
   ============================================== */

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hero content card — no bottom margin, services strip follows immediately */
.hero .content-card {
    margin-bottom: 0;
}

.hero-intro {
    padding: 37px 37px 24px;
}

.hero-intro h1 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 12px;
}

.hero-intro .page-title-sep {
    margin-bottom: 15px;
}

.hero-intro p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    max-width: 760px;
    margin-bottom: 8px;
}

/* Dark centrepiece — same colour as header */
.hero-brand {
    background: #1a1a1a;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 24px;
}

.hero-brand-inner {
    text-align: center;
    color: #fff;
    width: 100%;
    max-width: 440px;
}

.hero-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hero-stars span {
    font-size: 1.1rem;
    color: #ffffff;
    opacity: 0.85;
}

.hero-brand-name {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 6px;
}

.hero-brand-name em {
    font-style: normal;
    font-weight: 700;
}

.hero-brand-rule {
    width: 240px;
    height: 1px;
    background: rgba(255, 255, 255, 0.45);
    margin: 14px auto;
}

.hero-brand-sub {
    font-size: 0.95rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

/* Slider dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition);
}

.dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* CTA area — equal padding above and below */
.hero-brand-logo {
    width: 400px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero-cta {
    padding: 28px 37px 28px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-cta .btn-primary,
.hero-cta .btn-outline {
    min-width: 200px;
}

/* Services strip */
.services-strip {
    max-width: var(--max-w);
    width: calc(100% - 40px);
    margin: 20px auto 36px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.service-tile {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 20px 16px 18px;
    border-radius: 3px;
    border-top: 3px solid var(--accent);
    transition: transform var(--transition);
}

.service-tile:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.96);
}

.service-tile h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.service-tile p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-light);
}

/* ==============================================
   DIENSTEN PAGE
   ============================================== */
.service-entry { margin-bottom: 15px; }
.service-entry:last-child { margin-bottom: 0; }

.service-entry h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
}

.service-entry p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-light);
}

/* ==============================================
   SAMENWERKING PAGE
   ============================================== */
.collab-block { margin-bottom: 20px; }
.collab-block:last-child { margin-bottom: 0; }

.collab-lead {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.6;
    margin-bottom: 8px;
}

.collab-block p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-light);
    margin-bottom: 6px;
}

.collab-block p:last-child { margin-bottom: 0; }

.studiof-logo { margin-top: 14px; }
.studiof-logo img { border-radius: 3px; }

/* ==============================================
   OFFERTE + CONTACT PAGES
   ============================================== */
.page-body p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-light);
    margin-bottom: 8px;
}

.page-body p:last-child { margin-bottom: 0; }

.contact-details { margin-top: 18px; }
.contact-details p { margin-bottom: 3px; }
.contact-details a { font-weight: 600; }

.contact-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 14px;
}

.contact-info { list-style: none; }

.contact-info li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-light);
    margin-bottom: 2px;
}

.contact-info a { font-weight: 600; }

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1030px) {
    .services-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    #main-nav { display: none; }
    #menu-toggle { display: flex; }

    /* Center logo — offset by half the hamburger width so it's truly centered */
    .header-inner {
        position: relative;
        justify-content: center;
    }
    #site-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    #menu-toggle {
        position: absolute;
        right: 28px;
    }

    .services-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    /* Side margins equal to top/bottom (36px) */
    .content-card,
    .services-strip {
        width: calc(100% - 72px);  /* 36px each side */
        margin-left: auto;
        margin-right: auto;
    }

    /* iOS/Android: position:fixed bg slides don't work — switch to absolute */
    .bg-slide {
        position: absolute;
        top: 0; left: 0; right: 0;
        bottom: 0;
        min-height: 100vh;
    }

    .services-strip { grid-template-columns: 1fr; }

    .hero-brand-name { font-size: 2rem; }

    .hero-brand-logo { width: 100%; max-width: 260px; }

    /* Equal margin above and below btn-group */
    .btn-group {
        flex-direction: column;
        margin-top: 24px;
        margin-bottom: 0;
    }

    /* Home hero CTA — equal padding top and bottom */
    .hero-cta {
        padding: 24px 37px 24px;
    }

    /* Reduce card-body side padding so buttons don't run to card edges */
    .card-body {
        padding: 28px 37px 28px;
    }

    /* Bottom spacing after studiof logo on samenwerking */
    .studiof-logo {
        margin-bottom: 8px;
    }

    .btn-outline { text-align: center; }

    .footer-inner { flex-direction: column; justify-content: center; text-align: center; gap: 4px; }
}
