/* Mobile Optimizations for CorrectRolluiken */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Improve touch scrolling */
* {
    -webkit-overflow-scrolling: touch;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Container improvements */
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Navbar improvements */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        max-width: 70%;
    }
    
    .navbar-brand h1 {
        font-size: 1rem !important;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    /* Topbar improvements */
    .container-fluid .row .col-lg-7,
    .container-fluid .row .col-lg-5 {
        padding: 0.5rem 0;
    }
    
    .container-fluid .row .col-lg-7 .h-100,
    .container-fluid .row .col-lg-5 .h-100 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    /* Hero section improvements */
    .w-100.p-0.wow.fadeIn {
        position: relative;
    }
    
    .w-100.p-0.wow.fadeIn img {
        height: 250px !important;
        object-fit: cover;
    }
    
    .position-absolute.top-50.start-50.translate-middle {
        width: 90%;
        padding: 0 1rem;
    }
    
    .position-absolute.top-50.start-50.translate-middle h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    }
    
    .position-absolute.top-50.start-50.translate-middle p {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    }
    
    /* Top features improvements */
    .top-feature {
        padding: 1rem 0;
    }
    
    .top-feature .bg-white.shadow {
        margin-bottom: 1rem;
        border-radius: 8px;
        background-color: #ffffff !important;
        color: #333333 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
    
    /* Ensure all icons are visible */
    .fa,
    .fas,
    .far,
    .fab {
        color: var(--primary) !important;
    }
    
    .text-primary {
        color: var(--primary) !important;
    }
    
    /* Ensure light backgrounds stay light */
    .bg-light {
        background-color: #f8f9fa !important;
        color: #333333 !important;
    }
    
    /* Ensure white backgrounds stay white */
    .bg-white {
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    .top-feature .d-flex {
        padding: 1rem;
    }
    
    .top-feature .btn-lg-square {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }
    
    /* About section improvements */
    .container-xxl.py-5 .row .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .container-xxl.py-5 .row .col-lg-4 img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    /* Service section improvements */
    .container-xxl.py-5 .row.g-5 .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    .bg-light.rounded.p-5 {
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        background-color: #f8f9fa !important;
        color: #333333 !important;
        border: 1px solid #e9ecef;
    }
    
    .bg-light.rounded.p-5 .d-flex.align-items-center {
        text-align: center;
    }
    
    .bg-light.rounded.p-5 .btn-square {
        margin-bottom: 1rem;
    }
    
    .bg-light.rounded.p-5 .row.g-3 {
        margin-top: 1rem;
    }
    
    .bg-light.rounded.p-5 .row.g-3 .col-sm-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Footer improvements */
    .footer {
        text-align: center;
        background-color: #212529 !important;
        color: #ffffff !important;
    }
    
    .footer h4 {
        color: #ffffff !important;
        font-weight: 600;
        margin-bottom: 1rem;
    }
    
    .footer p {
        color: #ffffff !important;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 0.5rem;
    }
    
    .footer .fa,
    .footer .fas,
    .footer .far,
    .footer .fab {
        color: #ffffff !important;
        margin-right: 0.5rem;
    }
    
    .footer .col-lg-4,
    .footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    .footer .btn.btn-link {
        display: block;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
        color: #ffffff !important;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }
    
    .footer .btn.btn-link:hover {
        color: var(--primary) !important;
        text-decoration: none;
    }
    
    /* Footer address and contact info */
    .footer p.mb-2 {
        color: #ffffff !important;
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.75rem !important;
    }
    
    .footer .text-warning {
        color: #ffc107 !important;
        font-weight: 600;
    }
    
    /* Copyright section improvements */
    .copyright {
        background-color: #072A19 !important;
        color: #ffffff !important;
        padding: 1rem 0;
    }
    
    .copyright a {
        color: #ffffff !important;
        text-decoration: none;
        font-weight: 500;
    }
    
    .copyright a:hover {
        color: var(--primary) !important;
        text-decoration: underline;
    }
    
    .copyright .text-center,
    .copyright .text-md-start,
    .copyright .text-md-end {
        color: #ffffff !important;
        font-size: 0.85rem;
    }
    
    /* Enhanced footer readability */
    .footer .d-flex.pt-2 {
        margin-top: 1rem;
    }
    
    .footer .d-flex.pt-2 .text-warning {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Address and contact info specific styling */
    .footer p.mb-2 i {
        width: 20px;
        text-align: center;
        margin-right: 0.75rem;
    }
    
    .footer p.mb-2 {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: left;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Ensure all footer text is visible */
    .footer * {
        color: inherit;
    }
    
    .footer .text-light {
        color: #ffffff !important;
    }
    
    /* Service blocks text improvements - STRONG OVERRIDE */
    .bg-light.rounded.p-5 h3,
    .bg-light.rounded.p-5 .h3 {
        color: #212529 !important;
        font-weight: 600 !important;
    }
    
    .bg-light.rounded.p-5 .text-muted,
    .bg-light.rounded.p-5 p.text-muted {
        color: #6c757d !important;
        font-weight: 500 !important;
    }
    
    .bg-light.rounded.p-5 p {
        color: #212529 !important;
        line-height: 1.6;
    }
    
    .bg-light.rounded.p-5 span {
        color: #212529 !important;
        font-weight: 500;
    }
    
    /* Force override for all text in service blocks */
    .bg-light.rounded.p-5 h1,
    .bg-light.rounded.p-5 h2,
    .bg-light.rounded.p-5 h3,
    .bg-light.rounded.p-5 h4,
    .bg-light.rounded.p-5 h5,
    .bg-light.rounded.p-5 h6 {
        color: #212529 !important;
    }
    
    .bg-light.rounded.p-5 p,
    .bg-light.rounded.p-5 div,
    .bg-light.rounded.p-5 span {
        color: #212529 !important;
    }
    
    /* Only keep primary color for icons and buttons */
    .bg-light.rounded.p-5 .text-primary {
        color: var(--primary) !important;
    }
    
    .bg-light.rounded.p-5 .btn-primary {
        color: #ffffff !important;
        background-color: var(--primary) !important;
    }
    
    /* ULTIMATE OVERRIDE - Force all text to be readable */
    .bg-light.rounded.p-5 *:not(.text-primary):not(.btn-primary):not(.fa):not(.fas):not(.far):not(.fab) {
        color: #212529 !important;
    }
    
    /* Specific override for service block titles */
    .bg-light.rounded.p-5 .d-flex.align-items-center h3,
    .bg-light.rounded.p-5 .d-flex.align-items-center .h3 {
        color: #212529 !important;
        font-weight: 600 !important;
    }
    
    /* Override for any remaining dark green text */
    .bg-light.rounded.p-5 .text-dark,
    .bg-light.rounded.p-5 .text-success,
    .bg-light.rounded.p-5 .text-info {
        color: #212529 !important;
    }
    
    /* MAXIMUM SPECIFICITY OVERRIDE */
    body .container .container-xxl .container .row .col-lg-6 .bg-light.rounded.p-5 h3,
    body .container .container-xxl .container .row .col-lg-6 .bg-light.rounded.p-5 .h3 {
        color: #212529 !important;
        font-weight: 600 !important;
    }
    
    body .container .container-xxl .container .row .col-lg-6 .bg-light.rounded.p-5 p,
    body .container .container-xxl .container .row .col-lg-6 .bg-light.rounded.p-5 span {
        color: #212529 !important;
    }
    
    /* Force override with !important and max specificity */
    html body .container .container-xxl .container .row .col-lg-6 .bg-light.rounded.p-5 *:not(.text-primary):not(.btn-primary):not(.fa):not(.fas):not(.far):not(.fab) {
        color: #212529 !important;
    }
    
    /* Top feature section improvements */
    .top-feature .bg-white.shadow .btn-lg-square {
        background-color: var(--primary) !important;
        border: none !important;
    }
    
    .top-feature .bg-white.shadow .fa,
    .top-feature .bg-white.shadow .fas,
    .top-feature .bg-white.shadow .far,
    .top-feature .bg-white.shadow .fab {
        color: #ffffff !important;
    }
    
    .top-feature .bg-white.shadow h4 {
        color: #212529 !important;
        font-weight: 600;
    }
    
    .top-feature .bg-white.shadow span {
        color: #6c757d !important;
        font-weight: 500;
    }
    
    /* About section icon improvements */
    .container-xxl.py-5 .fa,
    .container-xxl.py-5 .fas,
    .container-xxl.py-5 .far,
    .container-xxl.py-5 .fab {
        color: var(--primary) !important;
    }
    
    .container-xxl.py-5 h6 {
        color: #212529 !important;
        font-weight: 600;
    }
    
    /* Prijsopgave page icon improvements */
    .prijsopgave .fa-2x.text-primary {
        color: var(--primary) !important;
    }
    
    /* General icon improvements for all pages */
    .fa-2x.text-primary,
    .fas.fa-2x.text-primary,
    .far.fa-2x.text-primary,
    .fab.fa-2x.text-primary {
        color: var(--primary) !important;
    }
    
    /* Ensure all primary colored icons are visible */
    .text-primary.fa,
    .text-primary.fas,
    .text-primary.far,
    .text-primary.fab {
        color: var(--primary) !important;
    }
    
    /* Universal icon improvements */
    .fa.text-primary,
    .fas.text-primary,
    .far.text-primary,
    .fab.text-primary {
        color: var(--primary) !important;
    }
    
    /* Check circle icons in service blocks */
    .fa.fa-check-circle.text-primary {
        color: var(--primary) !important;
    }
    
    /* Any remaining icon fixes */
    i.fa.text-primary,
    i.fas.text-primary,
    i.far.text-primary,
    i.fab.text-primary {
        color: var(--primary) !important;
    }
    
    /* General text readability improvements */
    .text-muted {
        color: #6c757d !important;
        font-weight: 500;
    }
    
    /* Service page improvements */
    .service-item .service-text h4 {
        color: #212529 !important;
        font-weight: 600;
    }
    
    .service-item .service-text p {
        color: #212529 !important;
        line-height: 1.6;
    }
    
    /* Form improvements */
    .form-control {
        color: #212529 !important;
        background-color: #ffffff !important;
        border-color: #ced4da !important;
    }
    
    .form-control:focus {
        color: #212529 !important;
        background-color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 0.2rem rgba(13, 74, 13, 0.25) !important;
    }
    
    .form-label {
        color: #212529 !important;
        font-weight: 500;
    }
    
    /* Card improvements */
    .card {
        background-color: #ffffff !important;
        border-color: #dee2e6 !important;
    }
    
    .card-body {
        color: #212529 !important;
    }
    
    .card-title {
        color: #212529 !important;
        font-weight: 600;
    }
    
    .card-text {
        color: #212529 !important;
    }
    
    /* Modal improvements */
    .modal-content {
        background-color: #ffffff !important;
        color: #212529 !important;
    }
    
    .modal-header {
        background-color: #f8f9fa !important;
        border-bottom-color: #dee2e6 !important;
    }
    
    .modal-title {
        color: #212529 !important;
        font-weight: 600;
    }
    
    .modal-body {
        color: #212529 !important;
    }
    
    /* Button improvements */
    .btn {
        border-radius: 8px;
        font-weight: 600;
        text-transform: none;
        letter-spacing: 0.5px;
    }
    
    .btn-primary {
        box-shadow: 0 4px 8px rgba(52, 142, 56, 0.3);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(52, 142, 56, 0.4);
    }
    
    /* Form improvements */
    .form-control {
        border-radius: 8px;
        border: 2px solid #e9ecef;
        padding: 0.75rem;
    }
    
    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.2rem rgba(52, 142, 56, 0.25);
    }
    
    /* Image improvements */
    img {
        border-radius: 8px;
    }
    
    /* Spacing improvements */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Text improvements */
    .text-lg-start,
    .text-start {
        text-align: center !important;
    }
    
    /* Back to top button */
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    /* Page header improvements */
    .page-header {
        padding: 2rem 0 !important;
        background: linear-gradient(135deg, var(--primary), var(--dark));
        color: white;
    }
    
    .page-header h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem;
    }
    
    .breadcrumb {
        background: transparent;
        padding: 0;
        margin: 0;
    }
    
    .breadcrumb-item a {
        color: rgba(255,255,255,0.8);
    }
    
    .breadcrumb-item.active {
        color: white;
    }
    
    /* Service items improvements */
    .service-item {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }
    
    .service-item:hover {
        transform: translateY(-5px);
    }
    
    .service-item .service-img {
        height: 200px;
        overflow: hidden;
    }
    
    .service-item .service-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    .service-item:hover .service-img img {
        transform: scale(1.1);
    }
    
    /* Team items improvements */
    .team-item {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        text-align: center;
    }
    
    /* Contact form improvements */
    .contact-form {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 1.5rem;
    }
    
    /* Map improvements */
    .map-container {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    /* Modal improvements */
    .modal-content {
        border-radius: 12px;
        border: none;
    }
    
    .modal-header {
        border-bottom: 1px solid #e9ecef;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-footer {
        border-top: 1px solid #e9ecef;
        border-radius: 0 0 12px 12px;
    }
    
    /* Dropdown improvements */
    .dropdown-menu {
        border-radius: 8px;
        border: none;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        padding: 0.5rem 0;
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 0;
        color: #333333 !important;
        background-color: #ffffff !important;
    }
    
    .dropdown-item:hover {
        background-color: var(--light);
        color: var(--primary);
    }
    
    /* Animation improvements */
    .wow {
        animation-duration: 0.8s !important;
    }
    
    /* Loading improvements */
    #spinner {
        background: rgba(255,255,255,0.95);
    }
    
    /* Accessibility improvements */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .navbar-brand h1 {
        font-size: 0.9rem !important;
    }
    
    .w-100.p-0.wow.fadeIn img {
        height: 200px !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle h2 {
        font-size: 1.1rem !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle p {
        font-size: 0.8rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .top-feature .bg-white.shadow {
        min-height: 100px !important;
    }
    
    .bg-light.rounded.p-5 {
        padding: 1rem !important;
    }
    
    .bg-light.rounded.p-5 .btn-square {
        width: 50px !important;
        height: 50px !important;
    }
    
    .bg-light.rounded.p-5 .fa-3x {
        font-size: 1.5rem !important;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    .container-fluid .row .col-lg-7 .h-100 span,
    .container-fluid .row .col-lg-5 .h-100 span {
        font-size: 0.75rem;
    }
    
    .navbar-brand h1 {
        font-size: 0.8rem !important;
    }
    
    .w-100.p-0.wow.fadeIn img {
        height: 180px !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle h2 {
        font-size: 1rem !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle p {
        font-size: 0.75rem !important;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .display-4 {
        font-size: 1.4rem !important;
    }
    
    .display-5 {
        font-size: 1.2rem !important;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }
}

/* Landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .w-100.p-0.wow.fadeIn img {
        height: 180px !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle h2 {
        font-size: 1.1rem !important;
    }
    
    .position-absolute.top-50.start-50.translate-middle p {
        font-size: 0.8rem !important;
    }
    
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .top-feature .bg-white.shadow {
        min-height: 80px !important;
    }
}

/* Touch improvements */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .btn-square,
    .btn-sm-square,
    .btn-lg-square {
        min-width: 44px;
        min-height: 44px;
    }
    
    .navbar .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
        border: none;
        padding: 0.5rem;
    }
    
    .nav-item {
        margin-bottom: 0.25rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f8f9fa;
        color: #333333 !important;
        background-color: #ffffff !important;
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
    
    /* Ensure navbar remains visible */
    .navbar {
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    .navbar-nav .nav-link {
        color: #333333 !important;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary) !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .wow {
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #ffffff !important;
        color: #333333 !important;
        border: 1px solid #e9ecef;
    }
    
    .text-muted {
        color: #6c757d !important;
    }
    
    /* Ensure icons remain visible in dark mode */
    .fa,
    .fas,
    .far,
    .fab {
        color: inherit !important;
    }
    
    /* Ensure buttons remain visible */
    .btn-primary {
        background-color: var(--primary) !important;
        border-color: var(--primary) !important;
        color: white !important;
    }
    
    .btn-primary:hover {
        background-color: #2a7a2e !important;
        border-color: #2a7a2e !important;
    }
    
    /* Ensure text remains readable */
    h1, h2, h3, h4, h5, h6 {
        color: #333333 !important;
    }
    
    p {
        color: #333333 !important;
    }
    
    /* Ensure form elements remain visible */
    .form-control {
        background-color: #ffffff !important;
        border-color: #ced4da !important;
        color: #333333 !important;
    }
    
    /* Ensure dropdown menus remain visible */
    .dropdown-menu {
        background-color: #ffffff !important;
        border-color: #e9ecef !important;
    }
    
    .dropdown-item {
        color: #333333 !important;
    }
    
    .dropdown-item:hover {
        background-color: #f8f9fa !important;
        color: #333333 !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .btn,
    .top-feature {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
        filter: grayscale(100%);
    }
    
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .row {
        display: block !important;
    }
    
    .col-lg-4,
    .col-lg-6,
    .col-lg-8,
    .col-md-6 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 1rem !important;
    }
} 