/********** Template CSS **********/
/* Modern CSS Standards: Accessibility, Performance, and Best Practices */

/* CSS Variables for consistent theming */
:root {
    --primary: #6222CC;
    --secondary: #FBA504;
    --light: #F6F4F9;
    --dark: #04000B;
    
    /* Additional color variables for better contrast and accessibility */
    --primary-dark: #4A1A99;
    --primary-light: #7B3FE6;
    --secondary-dark: #D98A03;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Spacing variables */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Transition variables */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 50px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility (WCAG 2.1 AA compliant) */
*:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Remove default focus outline for mouse users, keep for keyboard users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Better focus states for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(251, 165, 4, 0.2);
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Heading ***/
h1,
h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 500 !important;
}


/*** Button ***/
/* Modern button styles with accessibility improvements */
.btn {
    font-weight: 500;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Focus states for buttons */
.btn:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(251, 165, 4, 0.3);
}

/* Disabled button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Navbar ***/
.navbar .dropdown-toggle::after{
display: none;
}

.navbar-light .navbar-nav .nav-link {
    position: relative;
    margin-right: 25px;
    padding: 20px 0;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--dark) !important;
    transition: var(--transition-normal);
    text-decoration: none;
}

/* Focus states for navigation links */
.navbar-light .navbar-nav .nav-link:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--secondary) !important;
}

.navbar-light .navbar-brand h1 {
    color: var(--primary);
}

.navbar-light .navbar-brand img {
    max-height: 45px;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-brand img {
    max-height: 45px;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-light {
        position: relative;
        background: #FFFFFF;
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
        color: var(--dark) !important;
    }

    .navbar-light .navbar-brand h1 {
        color: var(--primary);
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {
    .navbar-light {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        background: #FFFFFF;
        border-bottom: 1px solid #DDDDDD;
        z-index: 999;
    }

    .sticky-top.navbar-light {
        position: fixed;
        background: #FFFFFF;
    }

    .sticky-top.navbar-light .navbar-brand h1 {
        color: var(--primary);
    }

    .navbar-light .navbar-nav .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }

    .navbar-light .btn {
        color: var(--dark);
        background: var(--secondary);
    }

    .sticky-top.navbar-light .btn {
        color: var(--dark);
        background: var(--secondary);
    }
}


/*** Hero Header ***/
.hero-header {
    margin-bottom: 6rem;
    padding: 18rem 0;
    background:
        url(../img/blob-top-left.png),
        url(../img/blob-top-right.png),
        url(../img/blob-bottom-left.png),
        url(../img/blob-bottom-right.png),
        url(../img/blob-center.png),
        url(../img/bg-bottom.png);
    background-position:
        left 0px top 0px,
        right 0px top 0px,
        left 0px bottom 0px,
        right 0px bottom 0px,
        center center,
        center bottom;
    background-repeat: no-repeat;
}

@media (max-width: 991.98px) {
    .hero-header {
        padding: 6rem 0 9rem 0;
    }
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-transform: uppercase;
}

.section-title span:first-child,
.section-title span:last-child {
    position: relative;
    display: inline-block;
    margin-right: 30px;
    width: 30px;
    height: 2px;
}

.section-title span:last-child {
    margin-right: 0;
    margin-left: 30px;
}

.section-title span:first-child::after,
.section-title span:last-child::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 2px;
    top: 0;
    right: -20px;
}

.section-title span:last-child::after {
    right: auto;
    left: -20px;
}

.section-title.text-primary span:first-child,
.section-title.text-primary span:last-child,
.section-title.text-primary span:first-child::after,
.section-title.text-primary span:last-child::after {
    background: var(--primary);
}

.section-title.text-secondary span:first-child,
.section-title.text-secondary span:last-child,
.section-title.text-secondary span:first-child::after,
.section-title.text-secondary span:last-child::after {
    background: var(--secondary);
}

.section-title.text-white span:first-child,
.section-title.text-white span:last-child,
.section-title.text-white span:first-child::after,
.section-title.text-white span:last-child::after {
    background: #FFFFFF;
}


/*** Feature ***/
.feature-item {
    transition: .5s;
}

.feature-item:hover {
    margin-top: -15px;
}


/*** About ***/
.progress {
    height: 5px;
}

.progress .progress-bar {
    width: 0px;
    transition: 3s;
}


/*** Fact ***/
.fact {
    margin: 6rem 0;
    background:
        url(../img/blob-top-left.png),
        url(../img/blob-top-right.png),
        url(../img/blob-bottom-left.png),
        url(../img/blob-bottom-right.png),
        url(../img/blob-center.png);
    background-position:
        left 0px top 0px,
        right 0px top 0px,
        left 0px bottom 0px,
        right 0px bottom 0px,
        center center;
    background-repeat: no-repeat;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 45px 30px;
    background: var(--light);
    overflow: hidden;
    transition: .5s;
}

.service-item:hover {
    margin-top: -15px;
    padding-bottom: 60px;
    background: var(--primary);
}

.service-item .service-icon {
    margin: 0 auto 20px auto;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url(../img/blob-primary.png) center center no-repeat;
    background-size: contain;
    transition: .5s;
}

/* FIX: Iconen altijd duidelijk zichtbaar maken */
/* De blob-primary.png achtergrond is paars, dus iconen moeten wit zijn voor contrast */
.service-item .service-icon i,
.service-item .service-icon .fa,
.service-item .service-icon [class*="fa-"] {
    /* Witte kleur voor contrast op paarse blob achtergrond */
    color: #FFFFFF !important;
    position: relative !important;
    z-index: 10 !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Donkere text shadow voor extra zichtbaarheid op lichte achtergrond */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 2px rgba(98, 34, 204, 0.8);
    /* Font weight voor betere zichtbaarheid */
    font-weight: 600;
}

/* Bij hover verandert de achtergrond naar blob-secondary (oranje) */
.service-item:hover .service-icon {
    background: url(../img/blob-secondary.png) center center no-repeat;
    background-size: contain;
}

/* Bij hover: iconen krijgen donkere kleur voor contrast op oranje achtergrond */
.service-item:hover .service-icon i,
.service-item:hover .service-icon .fa,
.service-item:hover .service-icon [class*="fa-"] {
    color: var(--dark) !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.service-item h5,
.service-item p {
    transition: .5s;
}

.service-item:hover h5,
.service-item:hover p {
    color: #FFFFFF;
}

.service-item a.btn {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px 40px 0 0;
    transition: .5s;
    z-index: 1;
}

.service-item a.btn:hover {
    color: var(--dark);
    background: var(--secondary);
}

.service-item:hover a.btn {
    bottom: 0;
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-item img {
    transition: .5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item .portfolio-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(98, 34, 204, .9);
    transition: .5s;
    opacity: 0;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}


/*** Newsletter ***/
.newsletter {
    margin: 6rem 0;
    background:
        url(../img/blob-top-left.png),
        url(../img/blob-top-right.png),
        url(../img/blob-bottom-left.png),
        url(../img/blob-bottom-right.png),
        url(../img/blob-center.png);
    background-position:
        left 0px top 0px,
        right 0px top 0px,
        left 0px bottom 0px,
        right 0px bottom 0px,
        center center;
    background-repeat: no-repeat;
}


/*** Testimonial ***/
.testimonial-carousel .testimonial-item {
    padding: 0 30px 30px 30px;
}

.testimonial-carousel .owl-nav {
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 60px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}


/*** Team ***/
.team-item .btn {
    color: var(--primary);
    background: #FFFFFF;
}

.team-item .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Footer ***/
.footer {
    margin-top: 6rem;
    padding-top: 9rem;
    background:
        url(../img/bg-top.png),
        url(../img/map.png);
    background-position:
        center top,
        center center;
    background-repeat: no-repeat;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid rgba(256, 256, 256, .1);
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
    color: var(--secondary);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.footer .copyright a:hover,
.footer .footer-menu a:hover {
    color: var(--secondary);
}

/* Focus states for footer links */
.footer .btn.btn-link:focus-visible,
.footer .copyright a:focus-visible,
.footer .footer-menu a:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/*** Modern CSS Enhancements ***/

/* Image optimization and lazy loading support */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Improved form controls */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(98, 34, 204, 0.25);
}

.form-control:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* Better contrast for text */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

/* Improved link styles */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
}

.skip-to-main:focus {
    top: 0;
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #4A1A99;
        --secondary: #D98A03;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    #spinner {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Better responsive images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Portfolio images - ensure they're always visible and load immediately */
.portfolio-item img {
    min-height: 200px;
    background-color: var(--light);
    object-fit: cover;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force portfolio images to load immediately (no lazy loading) */
.portfolio-item .position-relative img {
    width: 100%;
    height: auto;
    opacity: 1 !important;
    transition: opacity 0.3s ease-in-out;
}

/* Loading placeholder while image loads */
.portfolio-item img:not([src]),
.portfolio-item img[src=""] {
    background: linear-gradient(90deg, var(--light) 0%, #e0e0e0 50%, var(--light) 100%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Improved card hover effects */
.card,
.service-item,
.feature-item {
    transition: var(--transition-normal);
}

.card:hover,
.service-item:hover,
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Better mobile touch targets (minimum 44x44px) */
@media (max-width: 768px) {
    .btn,
    a,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Improved color contrast for better readability */
.text-muted {
    color: #6c757d !important;
}

/* Better spacing utilities */
.mb-section {
    margin-bottom: var(--spacing-xl);
}

.mt-section {
    margin-top: var(--spacing-xl);
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Error states */
.has-error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.has-success {
    border-color: #28a745 !important;
}

.success-message {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}