/* ToeslagBuddy Main CSS - Unified styling voor alle pagina's */

/* ===== FONTS & TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #0d6efd;
    --cta-color: #00A86B;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* Neutral Colors */
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Responsive text fixes */
body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Text uitlijning fixes voor alle apparaten */
.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Hero section responsive fixes */
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--gray-600);
}

/* Mobile-first responsive text */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Container fixes voor mobile */
.container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
}

/* Mobile overlay fixes */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    /* Navigation fixes */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 8px;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
        font-size: 1.1rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    /* Card responsiveness */
    .benefits-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .benefit-card {
        margin-bottom: 1rem;
        transform: none !important;
        transition: all 0.2s ease;
    }
    
    .benefit-card:hover {
        transform: translateY(-2px) !important;
    }
    
    /* Affiliate cards mobile */
    .card.border-info,
    .card.border-success,
    .card.border-warning {
        margin-bottom: 1rem;
        border-width: 2px;
    }
    
    /* Form elements touch-friendly */
    .form-control,
    .btn,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Modal responsive */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    /* Toast positioning */
    .toast-container {
        position: fixed;
        top: 1rem;
        right: 1rem;
        left: 1rem;
        z-index: 1055;
    }
    
    /* Utility classes for mobile */
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-visible {
        display: block !important;
    }
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: var(--white);
    padding: 4rem 0 3rem 0;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: var(--font-weight-normal);
    margin-bottom: 2rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* ===== CTA BUTTON STYLING ===== */
.btn-cta {
    background-color: var(--cta-color);
    border-color: var(--cta-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    padding: 0.75rem 2rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-cta:hover {
    background-color: #008f5a;
    border-color: #008f5a;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-cta:focus {
    background-color: #008f5a;
    border-color: #008f5a;
    color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 107, 0.25);
}

.btn-cta:active {
    background-color: #007a4d;
    border-color: #007a4d;
    transform: translateY(0);
}

/* ===== BREADCRUMBS ===== */
.breadcrumb-nav {
    background-color: var(--gray-100);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--gray-600);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--gray-800);
    font-weight: var(--font-weight-medium);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: 60vh;
    padding: 2rem 0;
}

/* ===== AD CONTAINERS (VASTE POSITIES VOOR CLS) ===== */
.adsbox {
    width: 100%;
    min-height: 90px; /* Reserveer ruimte voor ads - voorkomt CLS */
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.adsbox::before {
    content: 'Advertentie';
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: var(--font-weight-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ad container varianten - verhoogde min-height voor CLS preventie */
.adsbox-banner {
    min-height: 100px; /* Verhoogd voor betere CLS score */
    max-height: 120px;
}

.adsbox-rectangle {
    min-height: 280px; /* Verhoogd voor betere CLS score */
    max-height: 300px;
}

.adsbox-sidebar {
    min-height: 250px; /* Verhoogd voor betere CLS score */
    max-height: 280px;
}

.adsbox-mobile {
    min-height: 60px; /* Verhoogd voor betere CLS score */
    max-height: 80px;
}

/* AdSense Anchor Ads Support - verhoogt inkomsten met ~20% */
.adsbygoogle-anchor {
    position: fixed !important;
    z-index: 9999 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Responsive layout fixes */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    .adsbox-banner,
    .adsbox-rectangle {
        min-height: 60px;
        max-height: 80px;
    }
    
    .adsbox-sidebar {
        display: none;
    }
    
    /* Fix calculator form layout */
    .calculator-container {
        padding: 0.5rem;
    }
    
    .form-control,
    .form-check-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* ===== CARDS & COMPONENTS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ===== NAVIGATION OVERRIDE ===== */
.navbar-brand {
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
}

.nav-link {
    font-weight: var(--font-weight-medium);
    transition: color 0.3s ease;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: var(--font-weight-normal);
}

.dropdown-item:hover {
    background-color: var(--gray-100);
}

/* ===== FOOTER ===== */
.footer {
    margin-top: auto;
}

.footer h5,
.footer h6 {
    color: var(--white);
    font-weight: var(--font-weight-semibold);
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--white) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== FORM STYLING ===== */
.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-300);
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: var(--font-weight-medium);
}

.alert-success {
    background-color: #d1eddd;
    color: #0a3622;
}

.alert-danger {
    background-color: #f8d7da;
    color: #58151c;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-cta {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

/* Focus management */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .adsbox,
    .btn {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
/* Mobile Overlay Prevention - Critical Fixes */
@media (max-width: 768px) {
    /* Prevent body scroll behind modals */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Ensure proper stacking order */
    .navbar { z-index: 1030; }
    .modal-backdrop { z-index: 1040; }
    .modal { z-index: 1050; }
    .toast { z-index: 1060; }
    .tooltip { z-index: 1070; }
    .popover { z-index: 1080; }
    
    /* Fix dropdown overlays */
    .dropdown-menu {
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Fix sticky elements */
    .sticky-top {
        z-index: 1020;
    }
    
    /* Card hover effects mobile-friendly */
    .card:hover {
        transform: translateY(-2px) !important;
    }
}

/* Desktop specifieke fixes voor "Steun ons" knop */
@media (min-width: 992px) {
    /* Zorg dat "Steun ons" button altijd zichtbaar is op desktop */
    .alert .row .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
        min-width: 150px; /* Minimale breedte om button zichtbaar te houden */
    }
    
    .alert .row .col-lg-8 {
        flex: 0 0 auto;
        width: 66.666667%;
        padding-right: 1rem;
    }
    
    /* Zorg voor voldoende ruimte voor de button */
    .alert .row {
        display: flex;
        flex-wrap: nowrap; /* Voorkom wrapping op desktop */
        align-items: center;
        justify-content: space-between;
    }
}

/* Privacy footer visibility fix - voorkom overlap met navbar */
.container[style*="z-index: 1"] {
    position: relative;
    z-index: 1 !important;
    clear: both;
    margin-top: 2rem;
}

/* Zorg dat navbar niet over content heen komt */
.navbar {
    z-index: 1030;
    position: relative;
}

/* Extra ruimte voor readability van advertentie tekst */
@media (min-width: 768px) {
    .alert[role="alert"] {
        font-size: 14px;
        line-height: 1.6;
        padding: 1.5rem !important;
        margin-top: 2rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .alert small {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* Betere contrast voor leesbaarheid */
    .alert-light {
        background-color: #ffffff !important;
        border-color: #dee2e6 !important;
        color: #495057 !important;
    }
}
