/* ============================================================
   SchuttingenVergelijker - Stylesheet
   Aesthetic: Organic/Natural meets Modern Utility
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #f4f4f0;
    --bg-card: #ffffff;
    --bg-dark: #1a1a18;
    --bg-hero: #2d5016;
    --bg-hero-light: #3a6b1e;
    --text: #2c2c28;
    --text-light: #6b6b65;
    --text-inv: #f4f4f0;
    --accent: #4a8c1c;
    --accent-hover: #3d7516;
    --accent-light: #e8f0e0;
    --wood: #8b6914;
    --wood-light: #c49b32;
    --border: #ddd9d0;
    --border-light: #eceae4;
    --danger: #c0392b;
    --success: #27ae60;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --max-w: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--bg-hero) 0%, #1a3a0a 100%);
    color: var(--text-inv);
    padding: 60px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto; }
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto 32px;
}

/* ---- Search Box ---- */
.search-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 520px;
    margin: 0 auto;
}
.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.search-row:last-child { margin-bottom: 0; }

.input-group { flex: 1; text-align: left; }
.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.7;
}
.input-group input, .input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}
.input-group input::placeholder { color: rgba(255,255,255,0.4); }
.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
}
.input-group select option { background: var(--bg-dark); color: #fff; }

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--wood);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--wood-light); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Steps indicator ---- */
.steps {
    display: flex;
    gap: 0;
    max-width: var(--max-w);
    margin: -30px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}
.step {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s;
}
.step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.step.active { background: var(--accent-light); border-color: var(--accent); }
.step.done { background: #f0f7e8; }
.step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.step.active .step-num { background: var(--accent); color: #fff; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-label { font-size: 0.82rem; font-weight: 500; color: var(--text-light); }
.step.active .step-label { color: var(--text); font-weight: 600; }

/* ---- Main sections ---- */
.main { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px; }
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- Map container ---- */
.map-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
#map { width: 100%; height: 450px; }
.map-info {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.map-info strong { color: var(--accent); }
.map-toolbar {
    padding: 12px 20px;
    background: #fafaf7;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-tool {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.btn-tool:hover { border-color: var(--accent); color: var(--accent); }
.btn-tool.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tool-hint { font-size: 0.82rem; color: var(--text-light); margin-left: auto; }

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 16px;
}

/* ---- Resultaten ---- */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.result-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.result-card.best {
    border-color: var(--accent);
    border-width: 2px;
    position: relative;
}
.result-card.best::before {
    content: 'Beste prijs';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.result-bedrijf { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.result-afstand { font-size: 0.82rem; color: var(--text-light); }
.result-specs {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.spec-tag {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: var(--accent-light);
    border-radius: 20px;
    color: var(--accent);
    font-weight: 500;
}
.result-prijs { text-align: right; }
.result-prijs .pm {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.result-prijs .totaal {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--accent);
}
.result-prijs .btw { font-size: 0.75rem; color: var(--text-light); }

/* ---- Email form ---- */
.email-form {
    background: var(--accent-light);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 28px;
    text-align: center;
}
.email-form h3 { margin-bottom: 8px; }
.email-form p { color: var(--text-light); margin-bottom: 16px; font-size: 0.95rem; }
.email-row {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}
.email-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
}
.email-row input:focus { outline: none; border-color: var(--accent); }
.email-row .btn-primary { width: auto; padding: 12px 28px; }

/* ---- Loading ---- */
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.loading-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.loading-box .spinner { width: 36px; height: 36px; border-width: 3px; border-top-color: var(--accent); border-color: var(--border); }

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-dark);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    z-index: 2000;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }

/* ---- Footer ---- */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.5);
    padding: 40px 24px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 60px;
}
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .hero { padding: 40px 16px 60px; }
    .search-row { flex-direction: column; gap: 10px; }
    .steps { margin-top: -20px; }
    .step-label { font-size: 0.72rem; }
    .result-card { grid-template-columns: 1fr; }
    .result-prijs { text-align: left; }
    .email-row { flex-direction: column; }
    .map-info { flex-direction: column; gap: 8px; }
    #map { height: 320px; }
}
