section.bg-default {
    background-color: var(--bg);

    h2 {
        strong {
            color: var(--secondary);
        }
    }
}

section.bg-alt {
    background-color: var(--bg-alt);
    
}

section.bg-default + section.bg-default {
    padding-top: 0;
}

[class*="flexi-"] {
    padding: 10rem 0;

    @media(max-width: 1300px) {
        padding: 8rem 0;
    }

    @media(max-width: 700px) {
        padding: 5rem 0;
    }

    @media(max-width: 480px) {
        padding: 3rem 0;
    }
}

section.flexi-hero {
    position: relative;
    overflow: visible;
    text-align: left;

    .container {
        position: relative;
        z-index: 10000;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        z-index: 1000; /* Increased from 2 to 10 to ensure text is above logo container (z-index: 5) */
        
        @media (max-width: 700px) {
            padding: 2rem 0 1rem;
            text-align: center;
            margin: auto;
        }
        
        h1 {
            color: var(--black);
            max-width: 18ch;
            margin-bottom: 2rem;
            line-height: 1.1;
            font-size: clamp(2.5rem, 7vw, 4rem);
            text-wrap: unset;
            
            .highlight {
                color: var(--primary);
            }

            @media (max-width: 700px) {
                margin: 0 auto 2rem;
            }
        }
        
        p {
            font-size: 1.2rem;
            max-width: 550px;
            margin-bottom: 3rem;
            margin-top: 0;
            
            @media (max-width: 700px) {
                margin-left: auto;
                margin-right: auto;
            }
        }
        
        .hero-cta {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
            
            input[type="email"] {
                flex-grow: 1;
                max-width: 300px;
                padding: 0.5rem 1.5rem;
                border-radius: 100vh;
                border: 1px solid #ddd;
                font-size: 1rem;
                color: var(--black);
            }
            
            .button {
                white-space: nowrap;
                background: var(--primary);
                color: white;
                border-color: var(--primary);
                
                &:hover {
                    background: var(--primary-dark);
                    border-color: var(--primary-dark);
                }
            }
            
            @media (max-width: 700px) {
                justify-content: center;
                flex-direction: column;
                align-items: center;
                
                input[type="email"] {
                    max-width: 100%;
                    width: 100%;
                }
                
                .button {
                    width: 100%;
                }
            }
        }
    }
    
    .hero-visuals {
        position: absolute;
        width: 100%;
        height: 100%;
        right: 0;
        top: 0;
        z-index: 10; /* Increased from 0 to 10 */

        @media(max-width: 700px) {
            opacity: 0.5;
        }
    }
    
    .hero-image-container {
        position: absolute;
        top: -4rem;
        right: -3rem;
        width: calc(100% + 3rem);
        height: 100%;
        overflow: hidden;
        z-index: 2;
        
        svg {
            position: absolute;
            top: 0;
            right: 0;
            height: 100%;
            width: auto;
            max-width: none;
        }
    }
    
    .hero-carousel {
        position: relative;
        width: 100%;
        height: 100%;
    }
    
    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
        
        &.active {
            opacity: 1;
        }
    }
    
    .hero-carousel-dots {
        position: absolute;
        bottom: 2rem;
        right: 2rem;
        display: flex;
        gap: 0.5rem; /* Reduced from 0.75rem */
        z-index: 9999; /* Increased z-index significantly */
        background: rgba(0, 0, 0, 0.2); /* Added temporary background for visibility */
        padding: 0.5rem;
        border-radius: 1rem;
        
        @media(max-width: 700px) {
            bottom: 1rem;
            right: 1rem;
            gap: 0.375rem; /* Reduced from 0.5rem */
        }
    }
    
    .carousel-dot {
        width: 12px;
        height: 12px;
        padding: 0; /* Added padding: 0 to make them circular */
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.6);
        background: transparent;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0; /* Prevent flexbox from shrinking the dots */
        min-width: 12px; /* Ensure minimum width */
        min-height: 12px; /* Ensure minimum height */
        
        &:hover {
            border-color: rgba(255, 255, 255, 0.8);
            transform: scale(1.1);
        }
        
        &.active {
            background: white;
            border-color: white;
        }
        
        @media(max-width: 700px) {
            width: 10px;
            height: 10px;
            min-width: 10px;
            min-height: 10px;
        }
    }
    
    .hero-logo-container {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 25rem;
        height: 25rem;
        z-index: 5;
    }
    
    .hero-logo {
        background: linear-gradient(-45deg, #66fcaf 0%, #1bf4c3 100%);
        border-radius: 40% 0 0 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5rem 4rem 4rem 5rem;
        
        img {
            max-width: 100%;
            max-height: 100%;
        }
    }

    @media(max-width: 1300px) {
        .hero-logo-container {
            width: 20rem;
            height: 20rem;
        }

        .hero-image-container {
            top: -10rem;
            right: -10rem;
            width: calc(100% + 10rem);
        }
    }
}

section.flexi-hero-alt {
    position: relative;
    overflow: hidden; /* Changed from visible to hidden to prevent images from poking out */
    text-align: center; /* Changed from left to center */
    padding: 15rem 0; /* Increased from 10rem to 15rem top and bottom padding */
    
    @media (max-width: 700px) {
        padding: 8rem 0; /* Reduced padding on mobile for shorter height */
    }
    
    /* White overlay above visuals but below content/logo */
    &::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.65);
        z-index: 4; /* below content (20) and logo (5), above visuals (1) */
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    /* Trigger overlay a bit sooner for readability */
    @media (max-width: 900px) {
        &::before {
            opacity: 1;
        }
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center; /* Added to center content */
        position: relative;
        z-index: 20; /* ensure text is always on top */
        
        @media (max-width: 700px) {
            padding: 2rem 0 1rem;
            text-align: center;
            margin: auto;
        }
        
        h1 {
            color: var(--black);
            max-width: 18ch;
            margin-bottom: 2rem;
            line-height: 1.1;
            font-size: clamp(2.5rem, 7vw, 4rem);
            text-wrap: unset;
            text-align: center; /* Added to center the h1 */
            
            .highlight {
                color: var(--primary);
            }

            @media (max-width: 700px) {
                margin: 0 auto 2rem;
            }
        }
        
        p {
            font-size: 1.2rem;
            max-width: 550px;
            margin-bottom: 3rem;
            margin-top: 0;
            text-align: center; /* Added to center the paragraph */
            
            @media (max-width: 700px) {
                margin-left: auto;
                margin-right: auto;
            }
        }
    }
    
    .hero-visuals {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0; /* Changed from right: 0 to left: 0 to flip */
        top: 0;
        z-index: 1; /* place visuals under overlay and content */

        @media(max-width: 700px) {
            opacity: 0.5;
        }
    }
    
    .hero-image-container {
        position: absolute;
        top: -4rem;
        left: -3rem; /* Changed from right to left to flip */
        width: calc(100% + 3rem);
        height: 100%;
        overflow: hidden;
        z-index: 2;
        
        svg {
            position: absolute;
            top: 0;
            left: 0; /* Changed from right to left to flip */
            height: 100%;
            width: auto;
            max-width: none;
            transform: scaleX(-1); /* Added to flip the SVG horizontally */
        }
    }
    
    .hero-image-container-right {
        position: absolute;
        bottom: -2rem; /* Reduced from -4rem to -2rem for better containment */
        right: -2rem; /* Reduced from -3rem to -2rem for better containment */
        width: calc(100% + 2rem); /* Adjusted to match the reduced positioning */
        height: 80%; /* Reduced from 100% to 80% to prevent overflow */
        overflow: hidden;
        z-index: 2;
        
        svg {
            position: absolute;
            bottom: 0;
            right: 0;
            height: 100%;
            width: auto;
            max-width: none;
        }
    }
    
    .hero-carousel {
        position: relative;
        width: 100%;
        height: 100%;
    }
    
    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0 !important;
        transition: opacity 0.8s ease;
        
        &.active {
            opacity: 1 !important;
        }
    }
    
    .hero-carousel-dots {
        position: absolute;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.2);
        padding: 0.5rem;
        border-radius: 1rem;
        
        @media(max-width: 700px) {
            bottom: 1rem;
            gap: 0.375rem;
        }
    }
    
    .carousel-dot {
        width: 12px;
        height: 12px;
        padding: 0;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.6);
        background: transparent;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
        min-width: 12px;
        min-height: 12px;
        
        &:hover {
            border-color: rgba(255, 255, 255, 0.8);
            transform: scale(1.1);
        }
        
        &.active {
            background: white;
            border-color: white;
        }
        
        @media(max-width: 700px) {
            width: 10px;
            height: 10px;
            min-width: 10px;
            min-height: 10px;
        }
    }
    
    .hero-logo-container {
        position: absolute;
        left: 0; /* Changed from right to left to flip */
        bottom: 0;
        width: 25rem;
        height: 25rem;
        z-index: 5;
    }
    
    .hero-logo {
        background: linear-gradient(-45deg, #66fcaf 0%, #1bf4c3 100%);
        border-radius: 0 40% 0 0; /* Changed from 40% 0 0 0 to 0 40% 0 0 to flip */
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5rem 4rem 4rem 5rem;
        
        img {
            max-width: 100%;
            max-height: 100%;
        }
    }

    @media(max-width: 1300px) {
        .hero-logo-container {
            width: 20rem;
            height: 20rem;
        }

        .hero-image-container {
            top: -10rem;
            left: -10rem; /* Changed from right to left to flip */
            width: calc(100% + 10rem);
        }

        .hero-image-container-right {
            bottom: -8rem; /* Reduced from -10rem to -8rem for better containment */
            right: -8rem; /* Reduced from -10rem to -8rem for better containment */
            width: calc(100% + 8rem); /* Adjusted to match the reduced positioning */
        }
    }
}

section.flexi-image_full {
    margin: 0;
    padding: 0;
    overflow: hidden;

    .parallax-container {
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    .parallax-image {
        height: 80vh;
        max-height: 1000px;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: cover;
        background-attachment: fixed;
        transform: translate3d(0,0,0);
        will-change: transform;
        position: relative;
        /* Add extra space at bottom to prevent gaps during parallax movement */
        margin-bottom: -100px;
        padding-bottom: 100px;
    }
}

section.flexi-two_column_text {
    h2 {
        &::after {
            content: '';
            display: block;
            width: 4rem;
            height: 4px;
            background: var(--black);
            margin: 2.25rem 0 1.75rem;
        }
    }

    .container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5rem;
    
        @media(max-width: 700px) {
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 2rem;
        }
    }

    .text {
        > * + * {
            margin-top: 2rem;
        }
    }

    ul {
        margin: 0;
        padding: 0 0 0 1rem;

        li {
            margin-bottom: 0.25rem;
        }
    }
}

section.flexi-testimonial {
    overflow-x: hidden; /* Prevent horizontal overflow */
    
    .testimonial-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 5rem;
        width: 100%;
        
        @media(max-width: 1000px) {
            grid-template-columns: 1fr;
            gap: 3rem;
        }
    }
    
    .testimonial-text {
        h2 {
            margin-bottom: 1.5rem;

            &:after {
                content: '';
                display: block;
                width: 4rem;
                height: 4px;
                background: var(--black);
                margin: 2.25rem 0 1.75rem;
            }
        }
        
        p {
            font-size: 1.1rem;
        }

        .button {
            margin-top: 0.75rem;
        }
    }
    
    .testimonial-slider-wrapper {
        border-radius: 0.75rem;
        padding: 2rem;
        background: var(--bg-alt);
        height: 100%;
        width: 100%;
        max-width: 100%; 
        
        @media(max-width: 600px) {
            padding: 1.5rem;
        }
        
        @media(max-width: 550px) {
            padding: 1.5rem;
            width: 100%;
            min-width: 0;
        }
        
        .splide {
            height: 100%;
            width: 100%;
            max-width: 100%;
            
            @media(max-width: 550px) {
                min-width: 0;
            }
        }
    }
    
    .splide__track, 
    .splide__list {
        width: 100%;
        max-width: 100%;
        min-height: 100%;
        height: 100%;
    }
    
    .splide__slide {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100%;
        height: 100%;
    }
    
    .testimonial-item {
        display: flex;
        flex-direction: column;
        height: 100%;
        width: 100%;
        justify-content: space-between; /* This ensures cite stays at bottom */
    }
    
    .quote-icon {
        margin-bottom: 0.5rem;
        color: var(--secondary);
        
        svg {
            height: 2.5rem;
            width: 2.5rem;
            fill: var(--secondary);
        }
    }
    
    .testimonial-stars {
        display: flex;
        gap: 0.25rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
        
        svg {
            @media(max-width: 480px) {
                width: 16px;
                height: 16px;
            }
        }
    }
    
    .testimonial-quote {
        margin-bottom: 1.5rem;
        flex-grow: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        
        p {
            font-size: 1.1rem;
            font-style: normal;
            margin: 0;
            max-width: 100%;
        }
    }
    
    .testimonial-cite {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: auto; /* Ensures cite is pushed to bottom */
        
        @media(max-width: 480px) {
            gap: 0.75rem;
        }
    }
    
    .testimonial-avatar {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        
        @media(max-width: 480px) {
            width: 2.75rem;
            height: 2.75rem;
        }
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
    
    .testimonial-author {
        max-width: calc(100% - 4.5rem);
        
        @media(max-width: 480px) {
            max-width: calc(100% - 3.5rem);
        }
    }
    
    .testimonial-name {
        font-weight: 600;
        color: var(--primary);
        word-break: break-word;
    }
    
    .testimonial-job {
        font-size: 0.9rem;
        opacity: 0.8;
        word-break: break-word;
        
        @media(max-width: 480px) {
            font-size: 0.8rem;
        }
    }
    
    /* Splide custom styles */
    .splide__pagination {
        bottom: -4rem;
        gap: 0.5rem;
        width: 100%;
        
        @media(max-width: 480px) {
            bottom: -3rem;
        }
        
        .splide__pagination__page {
            background: #e9e9e9;
            width: 0.6rem;
            height: 0.6rem;
            border-radius: 0.3rem;
            
            &.is-active {
                background: var(--secondary);
                transform: none;
            }
        }
    }
    
    .splide__arrow {
        background: var(--bg);
        opacity: 1;
        width: 2rem;
        height: 2rem;
        
        @media(max-width: 480px) {
            width: 1.75rem;
            height: 1.75rem;
            transform: translateY(-0.5rem);
        }
        
        svg {
            fill: var(--primary);
            width: 0.8em;
            height: 0.8em;
        }
    }
}

section.flexi-newsletter {
    position: relative;
    overflow: hidden;
    padding: 0 0 25rem;
    
    .container {
        position: relative;
        z-index: 2;
    }
    
    .newsletter-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--secondary-gradient);
        border-radius: 1rem;
        width: 100%;
        padding: clamp(2rem, 5vw, 6rem) clamp(2rem, 5vw, 4rem);
        min-height: 60vh;
    }
    
    .newsletter-content {
        max-width: 750px;
        width: 100%;
        text-align: center;
        
        h2 {
            font-size: clamp(2.5rem, 5vw, 4rem);
            font-weight: 800;
            margin-bottom: 1.5rem;
            line-height: 1.1;
            color: var(--black);
        }
        
        p {
            font-size: 1.1rem;
            margin-bottom: 1.5rem;
            color: var(--black);
            
            strong {
                color: var(--black);
                font-weight: 700;
            }
            
            &:last-child {
                margin-top: 1.5rem;
                font-size: 1rem;
                opacity: 0.8;
            }
        }
        
        /* Contact Form 7 Styling */
        .wpcf7-form {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            align-items: center;
            margin: 1.5rem 0;
            
            /* Hide br tags that cause extra spacing */
            br {
                display: none;
            }
        }
        
        input[type="email"],
        input[type="text"] {
            width: 100%;
            max-width: 450px;
            padding: 1rem 1.5rem;
            border: 3px solid #000;
            border-radius: 50px;
            background: transparent;
            font-size: 1rem;
            text-align: center;
            color: #000;
            font-family: inherit;
            transition: all 0.3s ease;
            
            &::placeholder {
                color: #000;
                opacity: 0.7;
            }
            
            &:focus {
                outline: none;
                border-color: var(--primary, #000);
                box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
            }
        }
        
        .wpcf7-submit {
            width: 100%;
            max-width: 450px;
            padding: 1rem 3rem;
            background: #000;
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: inherit;
            margin-top: 0.5rem;
            
            &:hover {
                background: #333;
                transform: translateY(-2px);
            }
        }
        
        /* Hide Contact Form 7 elements we don't need */
        .wpcf7-spinner {
            display: none;
        }
        
        .wpcf7-not-valid-tip {
            font-size: 0.8rem;
            color: #d00;
            margin-top: 0.5rem;
            text-align: center;
        }
        
        .wpcf7-response-output {
            margin: 1rem 0;
            padding: 0.75rem;
            border-radius: 0.5rem;
            font-size: 0.9rem;
            text-align: center;
        }
    }
    
    .newsletter-bg-image {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 60%;
        z-index: 0;
        overflow: hidden;
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }
    }
}

section.flexi-contact-us {
    .contact-us-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: start;
        
        @media(max-width: 1000px) {
            grid-template-columns: 1fr;
            gap: 3rem;
        }
    }
    
    .contact-us-content {
        h2 {
            color: var(--black);
            font-size: clamp(2rem, 4vw, 3rem);
            margin-bottom: 1rem;
            
            &::after {
                content: '';
                display: block;
                width: 4rem;
                height: 4px;
                background: var(--black);
                margin: 2rem 0 1.5rem;
            }
        }
        
        .subtitle {
            font-size: 1.1rem;
            margin-bottom: 2.5rem;
            line-height: 1.6;
            color: var(--black);
        }
    }
    
    .contact-info {
        margin-bottom: 2.5rem;
        
        .contact-info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            
            @media(max-width: 768px) {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
        }
        
        .contact-office-column,
        .contact-details-column {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
    }
    
    .contact-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 2rem;
        
        &:last-child {
            margin-bottom: 0;
        }
        
        /* Special styling for office address item - icon at top */
        &.office-address-item {
            align-items: flex-start;
        }
    }
    
    .contact-icon {
        width: 2.5rem;
        height: 2.5rem;
        background: var(--black);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        
        svg {
            width: 1.25rem;
            height: 1.25rem;
            fill: white;
        }
    }
    
    .contact-details {
        h4 {
            margin: 0 0 0.5rem 0;
            font-size: 1rem;
            font-weight: 600;
            color: var(--black);
        }
        
        p {
            margin: 0;
            font-size: 0.95rem;
            line-height: 1.5;
            color: var(--black);
        }
        
        a {
            color: var(--black);
            text-decoration: none;
            transition: color 0.3s ease;
            
            &:hover {
                color: var(--primary);
            }
        }
    }
    
    .follow-us {
        h4 {
            margin: 0 0 1rem 0;
            font-size: 1rem;
            font-weight: 600;
            color: var(--black);
        }
        
        .social-icons {
            display: flex;
            gap: 0.75rem;
        }
    }
    
    .contact-us-form-container {
        .contact-form-card {
            background: white;
            border-radius: 1rem;
            padding: 2.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            
            h3 {
                margin: 0 0 1.5rem 0;
                font-size: 1.25rem;
                font-weight: 600;
                color: var(--black);
            }
            
            /* Hide labels but keep them for accessibility */
            label {
                position: absolute;
                left: -9999px;
                width: 1px;
                height: 1px;
                overflow: hidden;
            }
            
            /* Reduce paragraph margins */
            p {
                margin: 0 0 0.5rem 0;
            }
            
            /* Contact Form 7 Styling */
            .wpcf7-form {
                display: flex;
                flex-direction: column;
                gap: 1rem;
                
                /* Hide br tags that cause extra spacing */
                br {
                    display: none;
                }
            }
            
            input[type="text"],
            input[type="email"],
            input[type="tel"] {
                width: 100%;
                padding: 0.8rem 1rem;
                border: 1px solid #e0e0e0;
                border-radius: 1rem;
                background: #fafafa;
                font-size: 0.95rem;
                color: var(--black);
                font-family: inherit;
                transition: all 0.3s ease;
                
                &::placeholder {
                    color: #999;
                }
                
                &:focus {
                    outline: none;
                    border-color: var(--primary);
                    background: white;
                    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
                }
            }
            
            textarea {
                width: 100%;
                padding: 0.8rem 1rem;
                border: 1px solid #e0e0e0;
                border-radius: 1rem;
                background: #fafafa;
                font-size: 0.95rem;
                color: var(--black);
                font-family: inherit;
                transition: all 0.3s ease;
                min-height: 120px;
                resize: vertical;
                
                &::placeholder {
                    color: #999;
                }
                
                &:focus {
                    outline: none;
                    border-color: var(--primary);
                    background: white;
                    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
                }
            }
            
            .wpcf7-submit {
                background: var(--black);
                color: white;
                border: none;
                border-radius: 50px;
                padding: 0.8rem 2rem;
                font-size: 1rem;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.3s ease;
                font-family: inherit;
                align-self: flex-start;
                
                &:hover {
                    background: var(--primary);
                    transform: translateY(-2px);
                }
            }
            
            .wpcf7-spinner {
                display: none;
            }
            
            .wpcf7-not-valid-tip {
                font-size: 0.8rem;
                color: #d00;
                margin-top: 0.25rem;
            }
            
            .wpcf7-response-output {
                margin: 1rem 0 0;
                padding: 0.75rem;
                border-radius: 1rem;
                font-size: 0.9rem;
            }
        }
    }
}

/* WYSIWYG Block */
section.flexi-wysiwyg {
    /* Reset default flexi padding when custom padding is used */
    &.padding-top,
    &.padding-bottom {
        padding: 0 !important;
    }
    
    &.padding-top {
        padding-top: 10rem !important;
        
        @media(max-width: 1200px) {
            padding-top: 8rem !important;
        }
        
        @media(max-width: 900px) {
            padding-top: 5rem !important;
        }
        
        @media(max-width: 600px) {
            padding-top: 3rem !important;
        }
    }
    
    &.padding-bottom {
        padding-bottom: 10rem !important;
        
        @media(max-width: 1200px) {
            padding-bottom: 8rem !important;
        }
        
        @media(max-width: 900px) {
            padding-bottom: 5rem !important;
        }
        
        @media(max-width: 600px) {
            padding-bottom: 3rem !important;
        }
    }
    
    /* When neither padding control is checked, remove all padding */
    &:not(.padding-top):not(.padding-bottom) {
        padding: 0 !important;
    }
}section.flexi-offices {
    &.padding-bottom-only {
        padding-top: 0;
        padding-bottom: 10rem;
        
        @media(max-width: 1200px) {
            padding-bottom: 8rem;
        }
        
        @media(max-width: 900px) {
            padding-bottom: 5rem;
        }
        
        @media(max-width: 600px) {
            padding-bottom: 3rem;
        }
    }
    
    .offices-title {
        text-align: left;
        margin: 0 0 3rem 0;
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--black);
    }
    
    .offices-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        
        @media(max-width: 900px) {
            grid-template-columns: 1fr;
        }
    }
    
    .office-card {
        background: white;
        border-radius: 1rem;
        padding: 2rem 1.5rem;
        text-align: left;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        min-height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        
        &:hover {
            background: var(--secondary-gradient);
            
            .office-default {
                opacity: 0;
            }
            
            .office-hover {
                opacity: 1;
            }
        }
    }
    
    .office-content {
        position: relative;
        height: 100%;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .office-default {
        transition: all 0.3s ease;
        opacity: 1;
        transform: translateY(0);
    }
    
    .office-hover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0;
    }
    
    .office-icon {
        width: 2.25rem;
        height: 2.25rem;
        margin: 0 0 0.75rem 0;
        color: var(--black);
        
        svg {
            width: 100%;
            height: 100%;
            fill: currentColor;
        }
    }
    
    .office-name {
        font-size: 1.1rem;
        font-weight: 700;
        margin: 0 0 0.5rem 0;
        color: var(--black);
    }
    
    .office-address {
        font-size: 0.9rem;
        line-height: 1.3;
        margin: 0;
        color: var(--black);
        opacity: 0.8;
    }
    
    .office-contacts {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.25rem;
    }
    
    .office-contact-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        
        .contact-icon {
            width: 1.75rem;
            height: 1.75rem;
            background: var(--black);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            flex-shrink: 0;
            
            svg {
                width: 0.9rem;
                height: 0.9rem;
                fill: currentColor;
            }
        }
        
        a {
            color: var(--black);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            transition: color 0.3s ease;
            
            &:hover {
                color: var(--primary);
            }
        }
    }
}

section.flexi-services {
    text-align: center;
    position: relative;
    overflow: hidden;
    
    /* Decorative squares for cards layout */
    .services-cards-layout {
        position: relative;
        
        &::before {
            content: '';
            position: absolute;
            width: 13vw;
            height: 13vw;
            background-color: #a6f79c;
            top: -2rem;
            left: -8rem;
            border-radius: 50% 0 0 0;
            z-index: -1;
        }
        
        &::after {
            content: '';
            position: absolute;
            width: 13vw;
            height: 13vw;
            background-color: #5cf7a8;
            bottom: -2rem;
            right: -8rem;
            border-radius: 0 0 50% 0;
            z-index: -1;
        }
    }

    h2 {
        color: var(--black);
        margin: 0 auto 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
        max-width: 800px;
        margin: 0 auto 3rem;
    }

    .service-toggle {
        margin-bottom: 3.5rem;
    }

    .toggle-container {
        display: inline-flex;
        border-radius: 100px;
        padding: 0;
        position: relative;
        z-index: 1;
        
        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 100px;
            padding: 2px;
            background: var(--secondary-gradient);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            z-index: -1;
        }
    }

    .toggle-button {
        border: none;
        background: transparent;
        padding: 1rem 2rem;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 100px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--black);
        position: relative;
        z-index: 1;

        &.active {
            background: var(--secondary-gradient);
            color: var(--black);

            &::before {
                opacity: 0;
            }
        }
    }

    .service-descriptions {
        margin-top: 2rem;
        text-align: center;
        
        .service-description {
            display: none;
            
            &.active {
                display: block;
                animation: fadeIn 0.5s ease;
            }
            
            p {
                margin: 0;
                font-size: 1rem;
                line-height: 1.6;
                color: var(--black);
                max-width: 600px;
                margin: 0 auto;
            }
        }
    }

    .service-content {
        display: none;

        &.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
    }

    .services-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;

        @media(max-width: 900px) {
            grid-template-columns: 1fr;
        }
    }
    
    .service-column {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .service-item {
        background-color: var(--bg);
        border-radius: 2rem;
        overflow: hidden;
        text-align: left;
        border: 2px solid #e9e9e9;
        width: 100%;
        margin: 0;
    }

    .service-header {
        padding: 1.25rem 1.5rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
        position: relative;
        list-style: none;
        border-radius: 2rem;
        
        h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
        }
        
        &::-webkit-details-marker {
            display: none;
        }
    }

    .toggle-icon {
        transition: transform 0.3s ease;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        
        svg {
            fill: var(--black);
            width: 20px;
            height: 20px;
            transform-origin: center;
            transition: transform 0.3s ease;
        }
    }

    details[open] {
        .service-header {
            border-radius: 0.75rem 0.75rem 0 0;
        }
        
        .toggle-icon svg {
            transform: rotate(180deg);
        }
    }

    .service-body {
        padding: 0rem 1.25rem 1.25rem;
        display: none;
    }
    
    details[open] .service-body {
        display: block;
    }
    
    .service-body p {
        margin: 0;
        font-size: 0.95rem;
    }

    /* Card Layout Styles */
    .services-cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        margin: 2rem 0;
        
        @media (max-width: 992px) {
            grid-template-columns: repeat(2, 1fr);
        }
        
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
    
    .service-cards-content {
        display: none;
        
        &.active {
            display: block;
        }
    }
    
    .service-card {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 2px solid rgba(233, 233, 233, 0.3);
        border-radius: 1rem;
        padding: 2rem;
        text-align: left;
        display: flex;
        flex-direction: column;
        height: 100%;
        
        .service-icon {
            width: 2.5rem;
            height: 2.5rem;
            margin-bottom: 1.5rem;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.25rem;
            
            &::before {
                content: '';
                position: absolute;
                inset: -2px;
                padding: 2px;
                background: var(--secondary-gradient);
                border-radius: 0.25rem;
                mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                mask-composite: xor;
                -webkit-mask-composite: xor;
            }
            
            img {
                width: 1rem;
                height: 1rem;
                object-fit: contain;
                padding: 2px;
                background: white;
                border-radius: 0.25rem;
            }
        }
        
        h3 {
            margin: 0 0 1rem 0;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--black);
            line-height: 1.3;
        }
        
        p {
            margin: 0 0 auto 0;
            color: var(--grey);
            line-height: 1.6;
            font-size: 0.95rem;
            flex-grow: 1;
        }
        
        .case-study-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 1.5rem;
            color: var(--black);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            align-self: flex-end;
            transition: all 0.3s ease;
            
            svg {
                transition: transform 0.3s ease;
            }
            
            &:hover {
                color: var(--primary);
                
                svg {
                    transform: translateX(5px);
                }
            }
        }
    }

    .services-cta {
        margin-top: 2rem;
    }
}

section.flexi-services-header {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f8f9fa 60%, white 60%, white 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0 0;
    text-align: center;
    
    /* Add overlay for mobile */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(248, 249, 250, 0.7);
        z-index: 3;
        opacity: 0;
        transition: opacity 0.3s ease;
        
        @media(max-width: 700px) {
            opacity: 1;
        }
    }
    
    .container {
        position: relative;
        z-index: 10;
    }
    
    .services-header-logo {
        position: absolute;
        top: 3rem;
        left: 3rem;
        width: 20vw;
        max-width: 200px;
        z-index: 5;
        
        svg {
            width: 100%;
            height: auto;
        }
        
        @media (max-width: 768px) {
            width: 25vw;
            top: 2rem;
            left: 2rem;
        }
        
        @media (max-width: 480px) {
            width: 30vw;
            top: 1.5rem;
            left: 1.5rem;
        }
    }
    
    .services-header-bg-icon {
        position: absolute;
        top: 3rem;
        left: 3rem;
        width: 15vw;
        height: 15vw;
        background-image: url('/wp-content/themes/ais/images/icon.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        opacity: 1;
        z-index: 2;
        
        @media (max-width: 768px) {
            width: 20vw;
            height: 20vw;
            top: 2rem;
            left: 2rem;
        }
        
        @media (max-width: 700px) {
            opacity: 0.1;
        }
    }
    
    .services-header-accent {
        position: absolute;
        bottom: 40%;
        right: 0;
        width: 15vw;
        height: 15vw;
        background-color: #5cf7a8;
        border-radius: 50% 0 0 0;
        z-index: 1;
        
        @media (max-width: 768px) {
            width: 20vw;
            height: 20vw;
        }
    }
    
    .services-header-content {
        position: relative;
        z-index: 10;
    }
    
    .services-header-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
        font-weight: 700;
        color: var(--black);
        margin: 0 auto 3rem;
        line-height: 1.1;
        max-width: 800px;
    }
    
    .services-header-subtitle {
        margin-bottom: 3rem;
        
        p {
            font-size: 1.2rem;
            color: var(--black);
            opacity: 0.8;
            line-height: 1.6;
            margin: 0;
        }
    }
    
    .services-header-toggle {
        margin-bottom: 3rem;
    }
    
    .toggle-container {
        display: inline-flex;
        border-radius: 100px;
        padding: 0;
        position: relative;
        z-index: 1;
        
        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 100px;
            padding: 2px;
            background: var(--secondary-gradient);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            z-index: -1;
        }
    }
    
    .toggle-button {
        border: none;
        background: transparent;
        padding: 1rem 2rem;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 100px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--black);
        position: relative;
        z-index: 1;

        &.active {
            background: var(--secondary-gradient);
            color: var(--black);
        }
    }
    
    .services-header-descriptions {
        margin-bottom: 4rem;
        
        .service-description {
            display: none;
            
            &.active {
                display: block;
                animation: fadeIn 0.5s ease;
            }
            
            p {
                margin: 0;
                font-size: 1.1rem;
                line-height: 1.6;
                color: var(--black);
            }
        }
    }
    
    .services-header-image {
        position: relative;
        margin-top: 2rem;
        
        .header-image-wrapper {
            position: relative;
            width: 100%;
            
            .header-img {
                width: 100%;
                height: auto;
                border-radius: 1rem;
                position: relative;
                z-index: 10;
            }
        }
    }
    
    @media (max-width: 768px) {
        padding: 4rem 0 0;
        
        .services-header-title {
            margin-bottom: 1.5rem;
        }
        
        .services-header-subtitle {
            margin-bottom: 2rem;
            
            p {
                font-size: 1.1rem;
            }
        }
        
        .services-header-descriptions {
            margin-bottom: 3rem;
            
            .service-description p {
                font-size: 1rem;
            }
        }
    }
}

section.flexi-solutions {
    text-align: center;
    
    .solutions-header {
        max-width: 800px;
        margin: 0 auto 3rem;
        
        h2 {
            margin-bottom: 1.5rem;
            text-wrap: unset;

            &::after {
                content: '';
                display: block;
                width: 4rem;
                height: 4px;
                background: var(--black);
                margin: 2rem auto 2rem;
            }
            
            .title-first {
                display: block;
                color: var(--black);
            }
            
            .title-highlight {
                display: block;
                color: #4169E1;
            }
        }
        
        .subtitle {
            margin-bottom: 1rem;
        }
        
        .down-arrow {
            color: var(--black);
            border: solid 2px var(--black);
            width: fit-content;
            aspect-ratio: 1 / 1;
            border-radius: 50%;
            line-height: 1;
            padding: 0.25rem;
            margin: 2rem auto 0;

            svg {
                width: 1rem;
                height: 1rem;
                display: block;
            }
        }
    }
    
    .solutions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin-bottom: 5rem;
        
        @media (max-width: 900px) {
            grid-template-columns: repeat(2, 1fr);
        }
        
        @media (max-width: 600px) {
            grid-template-columns: 1fr;
        }
    }
    
    .solution-card {
        position: relative;
        height: 350px;
        border-radius: 0.75rem;
        overflow: hidden;
        cursor: pointer;
        transition: 400ms;
        
        &:hover {
            .solution-content {
                transform: translateY(0);
                border-radius: 0.75rem;
                
                .solution-description {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
            
            .solution-image img {
                transform: scale(0.9);
            }
        }
    }
    
    .solution-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 1;
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.75rem;
            transition: 0.4s ease;
        }
    }
    
    .solution-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0;
        background: var(--secondary-gradient);
        color: var(--black);
        text-align: left;
        transition: 400ms;
        border-radius: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        transform: translateY(calc(100% - 4.5rem));
        transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.0);
        
        h3 {
            color: var(--black);
            margin: 0;
            padding: 0rem 1.5rem 0;
            font-size: 1rem;
            font-weight: 700;
            min-height: 4.5rem;
            display: flex;
            align-items: center;
        }
        
        .solution-description {
            position: relative;
            padding: 0 1.5rem 1.5rem;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s ease 0.1s;
            
            &:before {
                content: '';
                display: block;
                width: 3rem;
                height: 3px;
                background: var(--black);
                margin-bottom: 1rem;
                opacity: 0.7;
            }
            
            p {
                margin: 0;
                color: var(--black);
                font-size: 0.9rem;
                line-height: 1.5;
            }
        }
    }
}

/* Meet the Team Block */
section.flexi-meet-the-team {
    .team-header {
        text-align: center;
        margin-bottom: 3rem;
        
        h2 {
            margin: 0 0 1rem 0;
            max-width: 100%;
        }
        
        .subtitle {
            margin: 0;
            color: var(--text-light);
            font-size: 1.25rem;
        }
    }
    
    .team-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin-bottom: 5rem;
        
        @media (max-width: 900px) {
            grid-template-columns: repeat(2, 1fr);
        }
        
        @media (max-width: 600px) {
            grid-template-columns: 1fr;
        }
    }
    
    .team-card {
        position: relative;
        height: 450px;
        border-radius: 0.75rem;
        overflow: hidden;
        cursor: pointer;
        transition: 400ms;
        
        &:hover {
            .team-content {
                transform: translateY(0);
                border-radius: 0.75rem;
                
                .team-bio {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
            
            .team-image img {
                transform: scale(0.9);
            }
        }
    }
    
    .team-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 1;
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.75rem;
            transition: 0.4s ease;
        }
    }
    
    .team-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0;
        background: var(--secondary-gradient);
        color: var(--black);
        text-align: left;
        transition: 400ms;
        border-radius: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        transform: translateY(calc(100% - 7rem));
        transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.0);
        
        h3 {
            color: var(--black);
            margin: 0;
            padding: 1rem 1.5rem 0;
            font-size: 1.1rem;
            font-weight: 700;
            line-height: 1.2;
        }
        
        .job-title {
            color: var(--black);
            margin: 0;
            padding: 0.25rem 1.5rem 1rem;
            font-size: 0.9rem;
            font-weight: 500;
            opacity: 0.8;
            line-height: 1.2;
        }
        
        .team-bio {
            position: relative;
            padding: 0 1.5rem 1.5rem;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s ease 0.1s;
            
            &:before {
                content: '';
                display: block;
                width: 3rem;
                height: 3px;
                background: var(--black);
                margin-bottom: 1rem;
                opacity: 0.7;
            }
            
            p {
                margin: 0;
                color: var(--black);
                font-size: 0.9rem;
                line-height: 1.5;
            }
        }
    }
}

/* Sustainability Block */
section.flexi-sustainability {
    h2 {
        &::after {
            content: '';
            display: block;
            width: 4rem;
            height: 4px;
            background: var(--black);
            margin: 2.25rem 0 1.75rem;
        }
    }

    .sustainability-subtitle {
        font-size: 1.2rem;
        color: var(--text-light);
        margin-bottom: 3rem;
        line-height: 1.6;
    }

    .sustainability-text-columns {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5rem;
        margin-bottom: 5rem;
    
        @media(max-width: 700px) {
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .text {
            > * + * {
                margin-top: 2rem;
            }
        }

        ul {
            margin: 0;
            padding: 0 0 0 1rem;

            li {
                margin-bottom: 0.25rem;
            }
        }
    }

    .sustainability-items {
        display: flex;
        flex-direction: column;
        gap: 4rem;
    }

    .sustainability-item {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 3rem;
        align-items: center;

        @media(max-width: 900px) {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
    }

    .sustainability-image {
        position: relative;
        overflow: hidden;
        border-radius: 1rem;
        width: 300px;
        height: 300px;

        @media(max-width: 900px) {
            width: 100%;
            height: 250px;
        }

        &.corner-top-left {
            border-top-left-radius: 50%;
        }

        &.corner-top-right {
            border-top-right-radius: 50%;
        }

        &.corner-bottom-right {
            border-bottom-right-radius: 50%;
        }

        &.corner-bottom-left {
            border-bottom-left-radius: 50%;
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    .sustainability-content {
        .sustainability-icon {
            width: 2.5rem;
            height: 2.5rem;
            margin-bottom: 1.5rem;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.25rem;
            
            &::before {
                content: '';
                position: absolute;
                inset: -2px;
                padding: 2px;
                background: var(--secondary-gradient);
                border-radius: 0.25rem;
                mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                mask-composite: xor;
                -webkit-mask-composite: xor;
            }
            
            img {
                width: 1rem;
                height: 1rem;
                z-index: 2;
                position: relative;
                object-fit: contain;
            }
        }

        h3 {
            font-size: 1.5rem;
            font-weight: 700;
            margin: 0 0 1rem 0;
            color: var(--black);
        }

        p {
            font-size: 1rem;
            line-height: 1.6;
            color: var(--text-light);
            margin: 0;
        }
    }
}

section.flexi-cta {
    text-align: center;
    
    .cta-subtitle {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--black);
        margin: 0 0 1rem 0;
        letter-spacing: 0.5px;
    }
    
    .cta-stars {
        margin: 0 0 1rem 0;
        
        .star {
            font-size: 1.8rem;
            color: #000;
            margin: 0 0.15rem;
            line-height: 1;
        }
    }
    
    &.review-style {
        .cta-subtitle {
            margin: 1rem 0 0 0;
        }
        
        .cta-stars {
            margin: 0 0 1.5rem 0;
        }
    }
    
    h2 {
        font-size: clamp(2rem, 5vw, 3.5rem);
        margin: 0 auto 3rem;
        line-height: 1.2;
        color: var(--black);
        
        span.highlight {
            color: var(--primary);
        }
    }
    
    .cta-button {
        .button {
            font-size: 1.1rem;
            padding: 0.7rem 3rem;
            font-weight: 500;
            
            &:hover {
                transform: translateY(-3px);
                box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
            }
        }
    }
}

section.flexi-logos {
    .logos-carousel-wrapper {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .logos-carousel {
        padding: 1rem 0;
    }
    
    .logo-item {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100px;
        padding: 0 1.5rem;
        
        img {
            max-height: 100%;
            max-width: 100%;
            height: 5rem;
            width: auto;
            object-fit: contain;
            filter: grayscale(0);
            opacity: 1;
        }
    }
    
    /* Splide custom styles */
    .splide__pagination {
        bottom: -1.5rem;
        
        .splide__pagination__page {
            background: #ddd;
            width: 8px;
            height: 8px;
            opacity: 0.5;
            
            &.is-active {
                background: var(--primary);
                transform: scale(1.2);
                opacity: 1;
            }
        }
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 580px) {
    section.flexi-testimonial {
        .splide__slide {
            width: 100% !important;
            box-sizing: border-box !important;
            min-width: 0 !important;
        }
        
        .splide__list {
            transform: none !important;
            width: 100% !important;
            display: flex !important;
            flex-wrap: nowrap !important;
        }
        
        .splide__track {
            overflow: hidden !important;
            width: 100% !important;
        }
    }
    section.flexi-testimonial {
        .testimonial-slider-wrapper {
            max-width: 100vw;
            width: 100% !important;
            margin: 0 !important;
            box-sizing: border-box !important;
        }
        
        .splide__slide {
            width: 100% !important;
            box-sizing: border-box !important;
            min-width: 0 !important;
            max-width: 100% !important;
        }
        
        .splide__list {
            transform: none !important;
            width: 100% !important;
            display: flex !important;
            flex-wrap: nowrap !important;
            max-width: 100% !important;
        }
        
        .splide__track {
            overflow: hidden !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .splide__pagination {
            padding: 0 !important;
            width: 100% !important;
            justify-content: center !important;
        }
    }
    
    .splide {
        &.is-initialized {
            visibility: visible !important;
        }
        
        &__track {
            overflow: visible !important;
        }
        
        &__list {
            width: 100% !important; 
            transform: translate3d(0, 0, 0) !important;
            display: flex !important;
            flex-wrap: nowrap !important;
        }
    }
}
/* Page Title Block */
section.flexi-page-title {
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 6rem 0; /* Added even padding for consistent spacing */
    
    @media (max-width: 700px) {
        padding: 4rem 0; /* Even top and bottom padding on mobile */
        min-height: auto; /* Remove min-height constraint on mobile */
    }
    
    .container {
        position: relative;
        z-index: 10;
    }
    
    .page-title-wrapper {
        text-align: left;
        max-width: none;
        margin: 0;
        
        @media (max-width: 700px) {
            text-align: center;
        }
    }
    
    .page-title {
        color: var(--black);
        max-width: 18ch;
        margin-bottom: 2rem;
        line-height: 1.1;
        font-size: clamp(2.5rem, 7vw, 4rem);
        font-weight: 700;
        text-wrap: unset;
        
        @media (max-width: 700px) {
            margin: 0 auto 2rem;
        }
    }
    
    .page-subtitle {
        font-size: 1.2rem;
        max-width: 550px;
        margin-bottom: 3rem;
        margin-top: 0;
        color: var(--black);
        opacity: 0.8;
        line-height: 1.4;
        
        @media (max-width: 700px) {
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 1rem; /* Reduced from 3rem to 1rem on mobile */
        }
    }
    
    .hero-logo-container {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 25rem;
        height: 25rem;
        z-index: 5;
        
        @media(max-width: 700px) {
            opacity: 0.5;
        }
        
        @media(max-width: 1300px) {
            width: 20rem;
            height: 20rem;
        }
        
        @media(max-width: 700px) {
            width: 15rem;
            height: 15rem;
        }
        
        @media(max-width: 480px) {
            width: 12rem;
            height: 12rem;
        }
    }
    
    .hero-logo {
        background: linear-gradient(-45deg, #66fcaf 0%, #1bf4c3 100%);
        border-radius: 40% 0 0 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5rem 4rem 4rem 5rem;
        
        @media(max-width: 1300px) {
            padding: 4rem 3rem 3rem 4rem;
        }
        
        @media(max-width: 700px) {
            padding: 3rem 2.5rem 2.5rem 3rem;
        }
        
        @media(max-width: 480px) {
            padding: 2.5rem 2rem 2rem 2.5rem;
        }
        
        img {
            max-width: 100%;
            max-height: 100%;
        }
    }
}

/* Blog Posts Block */
section.flexi-blog-posts {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    
    @media (min-width: 768px) {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    .blog-posts-title {
        text-align: center;
        margin: 0 0 3rem 0;
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--black);
        
        @media (max-width: 768px) {
            font-size: 2rem;
            margin-bottom: 2rem;
        }
    }
    
    .blog-category-filters {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 3rem;
        flex-wrap: wrap;
        
        @media (max-width: 768px) {
            margin-bottom: 2rem;
        }
    }
    
    .category-filter {
        background: white;
        border: 2px solid transparent;
        border-radius: 50px;
        padding: 1rem 1.5rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--black);
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        position: relative;
        background-clip: padding-box;
        
        &::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 52px;
            background: var(--secondary-gradient);
            z-index: -1;
        }
        
        &:hover,
        &.active {
            transform: translateY(-2px);
        }
        
        @media (max-width: 480px) {
            padding: 0.8rem 1.2rem;
            font-size: 0.8rem;
        }
    }
    
    .blog-posts-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin-bottom: 3rem;
        
        @media (max-width: 992px) {
            grid-template-columns: repeat(2, 1fr);
        }
        
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 1rem;
            margin-bottom: 2rem;
        }
    }
    
    .blog-post-card {
        background: white;
        border: 2px solid #e5e5e5;
        border-radius: 0.5rem;
        overflow: hidden;
        transition: all 0.3s ease;
        position: relative;
        cursor: pointer;
        height: auto;
        display: flex;
        flex-direction: column;
        
        &:hover {
            transform: translateY(-5px);
            border: 2px solid var(--primary);
            
            .blog-post-image {
                opacity: 0;
                transform: translateY(-20px);
            }
            
            .blog-post-info {
                opacity: 0;
                transform: translateY(-20px);
            }
            
            .blog-post-hover {
                opacity: 1;
                transform: translateY(0);
            }
        }
    }
    
    .blog-post-hover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateY(20px);
        background: white;
        
        h3 {
            font-size: 1.1rem;
            font-weight: 700;
            line-height: 1.3;
            margin: 0 0 0.1rem 0;
            color: var(--black);
            
            a {
                color: var(--black);
                text-decoration: none;
                
                &:hover {
                    color: var(--primary);
                }
            }
        }
        
        .blog-post-excerpt {
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--grey);
            margin-bottom: 0.75rem;
        }
        
        .blog-read-more {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--black);
            font-weight: 600;
            text-decoration: none;
            font-size: 0.9rem;
            padding: 0;
            background: none;
            
            svg {
                transition: transform 0.3s ease;
            }
            
            &:hover {
                color: var(--primary);
                
                svg {
                    transform: translateX(5px);
                }
            }
        }
    }
    
    .blog-card-link {
        display: flex;
        flex-direction: column;
        height: 100%;
        color: inherit;
        text-decoration: none;
        
        &:hover {
            color: inherit;
            text-decoration: none;
        }
    }
    
    .blog-post-content {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .blog-post-image {
        width: 100%;
        padding: 1rem 1rem 0.5rem 1rem;
        
        img {
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: 0.5rem;
            transition: transform 0.3s ease;
        }
        
        a {
            display: block;
            width: 100%;
        }
        
        @media (max-width: 768px) {
            img {
                aspect-ratio: 16 / 9;
            }
        }
    }
    
    .blog-post-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1rem 1rem 1rem;
        
        h3 {
            font-size: 1.1rem;
            font-weight: 700;
            line-height: 1.3;
            margin: 0;
            color: var(--black);
            
            a {
                color: var(--black);
                text-decoration: none;
                
                &:hover {
                    color: var(--primary);
                }
            }
        }
        
        .blog-post-meta {
            display: flex;
            align-items: center;
            font-size: 0.8rem;
            color: var(--grey);
            
            .blog-post-date {
                font-weight: 500;
            }
        }
    }
    
    .blog-post-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0 0 0.75rem 0;
        line-height: 1.3;
        
        a {
            color: inherit;
            text-decoration: none;
            transition: color 0.3s ease;
            
            &:hover {
                color: var(--primary);
            }
        }
        
        .blog-post-hover & a {
            color: var(--black);
            
            &:hover {
                color: var(--primary);
            }
        }
    }
    
    .blog-post-date {
        font-size: 0.9rem;
        color: var(--black);
        opacity: 0.6;
        margin: 0;
    }
    
    .blog-post-excerpt {
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 1rem 0;
        color: var(--black);
        opacity: 0.7;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .blog-read-more {
        background: var(--secondary-gradient);
        color: var(--black);
        border: none;
        border-radius: 25px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        transition: all 0.3s ease;
        align-self: flex-start;
        
        &:hover {
            transform: translateY(-2px);
            opacity: 0.9;
        }
        
        svg {
            width: 14px;
            height: 14px;
            transition: transform 0.3s ease;
        }
        
        &:hover svg {
            transform: translateX(3px);
        }
    }
    
    .no-posts-found {
        text-align: center;
        padding: 3rem 0;
        
        p {
            font-size: 1.1rem;
            color: var(--black);
            opacity: 0.6;
            margin: 0;
        }
    }
    
    /* Pagination */
    .blog-pagination {
        display: flex;
        justify-content: center;
        margin-top: 3rem;
        
        @media (max-width: 768px) {
            margin-top: 2rem;
        }
    }
    
    .pagination-nav {
        .pagination-list {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            list-style: none;
            margin: 0;
            padding: 0;
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .pagination-item {
            a, span {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 3rem;
                height: 3rem;
                padding: 0 1rem;
                background: white;
                border: 2px solid #e5e5e5;
                border-radius: 0.5rem;
                color: var(--black);
                text-decoration: none;
                font-weight: 600;
                transition: all 0.3s ease;
                
                &:hover {
                    border-color: var(--primary);
                    color: var(--primary);
                    transform: translateY(-2px);
                }
                
                &.current {
                    background: var(--secondary-gradient);
                    border-color: transparent;
                    color: white;
                }
            }
            
            .prev, .next {
                font-size: 0.9rem;
            }
            
            @media (max-width: 480px) {
                a, span {
                    min-width: 2.5rem;
                    height: 2.5rem;
                    font-size: 0.9rem;
                }
            }
        }
    }
}

/* ===========================
   SINGLE BLOG POST STYLES
   =========================== */

/* Blog Single Hero */
.blog-single-hero {
    padding: 4rem 0 3rem 0;
    
    @media (max-width: 768px) {
        padding: 3rem 0 2rem 0;
    }
}

.blog-single-header {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    
    @media (max-width: 768px) {
        text-align: center;
    }
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--grey);
    
    @media (max-width: 768px) {
        justify-content: center;
    }
}

.blog-date {
    font-weight: 500;
}

.blog-category {
    padding: 0.25rem 0.75rem;
    background: var(--secondary-gradient);
    color: var(--black);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-single-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
    margin: 0 0 1.5rem 0;
}

.blog-single-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--grey);
    margin: 0;
}

/* Featured Image */
.blog-featured-image {
    padding: 0;
}

.featured-image-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-featured-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Blog Content */
.blog-single-content {
    padding: 2rem 0 4rem 0;
}

.blog-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--black);
    
    h1, h2, h3, h4, h5, h6 {
        color: var(--black);
        font-weight: 700;
        margin: 2rem 0 1rem 0;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-top: 3rem;
    }
    
    h3 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
    }
    
    h4 {
        font-size: 1.3rem;
        margin-top: 2rem;
    }
    
    p {
        margin: 0 0 1.5rem 0;
    }
    
    ul, ol {
        margin: 1.5rem 0;
        padding-left: 2rem;
    }
    
    li {
        margin-bottom: 0.5rem;
    }
    
    blockquote {
        margin: 2rem 0;
        padding: 1.5rem 2rem;
        border-left: 4px solid var(--primary);
        background: #f8f9fa;
        font-style: italic;
        font-size: 1.2rem;
        border-radius: 0 0.5rem 0.5rem 0;
    }
    
    img {
        max-width: 100%;
        height: auto;
        border-radius: 0.5rem;
        margin: 2rem 0;
    }
    
    a {
        color: var(--primary);
        text-decoration: underline;
        transition: color 0.3s ease;
        
        &:hover {
            color: var(--black);
        }
    }
    
    code {
        background: #f1f3f4;
        padding: 0.2rem 0.4rem;
        border-radius: 0.25rem;
        font-family: monospace;
        font-size: 0.9em;
    }
    
    pre {
        background: #f1f3f4;
        padding: 1rem;
        border-radius: 0.5rem;
        overflow-x: auto;
        margin: 1.5rem 0;
        
        code {
            background: none;
            padding: 0;
        }
    }
}

/* Author Box */
.blog-author-section {
    padding: 2rem 0;
    background: #f8f9fa;
}

.blog-author-box {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    
    @media (max-width: 768px) {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.author-avatar {
    flex-shrink: 0;
    
    img {
        border-radius: 50%;
        width: 80px;
        height: 80px;
    }
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 0.5rem 0;
}

.author-bio {
    color: var(--grey);
    margin: 0;
    line-height: 1.5;
}

/* Post Navigation */
.blog-post-navigation {
    padding: 3rem 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.post-nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    
    @media (max-width: 768px) {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.post-nav-item {
    flex: 1;
    
    a, .post-nav-disabled-content {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.5rem;
        border: 2px solid #e5e5e5;
        border-radius: 0.5rem;
        background: white;
        transition: all 0.3s ease;
        text-decoration: none;
        color: var(--black);
        
        @media (max-width: 768px) {
            padding: 1rem;
        }
    }
    
    a:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    &.post-nav-disabled {
        .post-nav-disabled-content {
            opacity: 0.5;
            cursor: not-allowed;
            color: var(--grey);
        }
    }
}

.post-nav-prev {
    a, .post-nav-disabled-content {
        justify-content: flex-start;
    }
}

.post-nav-next {
    a, .post-nav-disabled-content {
        justify-content: flex-end;
    }
    
    .post-nav-content {
        text-align: right;
        
        @media (max-width: 768px) {
            text-align: left;
        }
    }
}

.post-nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.post-nav-label {
    font-size: 0.85rem;
    color: var(--grey);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.3;
    
    .post-nav-disabled & {
        color: var(--grey);
    }
}

.post-nav-item svg {
    flex-shrink: 0;
    color: var(--primary);
    transition: transform 0.3s ease;
    
    .post-nav-disabled & {
        color: var(--grey);
    }
}

.post-nav-item a:hover svg {
    transform: translateX(3px);
}

.post-nav-prev a:hover svg {
    transform: translateX(-3px);
}

/* Case Study Grid Styles */
.flexi-case-study-grid {    
    .case-study-header {
        text-align: center;
        margin-bottom: 4rem;
        
        h2 {
            font-size: clamp(2.5rem, 6vw, 4rem);
            font-weight: 700;
            color: var(--black);
            margin: 0 auto 1.5rem;
            line-height: 1.1;
            max-width: 100%;
        }
        
        .case-study-subtitle {
            font-size: 1.2rem;
            color: var(--black);
            opacity: 0.8;
            line-height: 1.6;
            margin: 0 auto;
            max-width: 600px;
        }
    }
    
    .case-study-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        width: 100%;
        
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
    
    .case-study-item {
        aspect-ratio: 4/3;
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        
        @media (max-width: 768px) {
            aspect-ratio: 16/10;
        }
    }
    
    .case-study-link {
        display: block;
        width: 100%;
        height: 100%;
        text-decoration: none;
        color: inherit;
    }
    
    .case-study-background {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        transition: transform 0.3s ease;
        
        &.case-study-no-image {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
        }
    }
    
    .case-study-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .case-study-content {
        text-align: center;
        transform: translateY(20px);
        transition: transform 0.3s ease;
        
        h3 {
            color: white;
            font-size: 1.5rem;
            font-weight: 700;
            margin: 0 0 1.5rem 0;
            line-height: 1.3;
            
            @media (max-width: 768px) {
                font-size: 1.25rem;
            }
        }
    }
    
    .case-study-button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: var(--secondary-gradient);
        color: var(--black);
        padding: 0.875rem 2rem;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        border: 2px solid transparent;
        background-clip: padding-box;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--secondary-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: inherit;
        }
        
        span, svg {
            position: relative;
            z-index: 1;
        }
        
        svg {
            width: 16px;
            height: 16px;
            transition: transform 0.3s ease;
        }
        
        &:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(33, 197, 154, 0.4);
            
            &::before {
                opacity: 0.15;
            }
            
            svg {
                transform: translateX(3px);
            }
        }
    }
    
    .case-study-item:hover {
        .case-study-background {
            transform: scale(1.05);
        }
        
        .case-study-overlay {
            opacity: 1;
        }
        
        .case-study-content {
            transform: translateY(0);
        }
    }
    
    .no-case-studies {
        text-align: center;
        font-size: 1.1rem;
        color: var(--black);
        opacity: 0.7;
        margin: 3rem 0;
    }
}

/* ===========================
   SINGLE CASE STUDY STYLES
   =========================== */

/* Case Study Hero */
.case-study-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    
    @media (max-width: 768px) {
        min-height: 40vh;
    }
}

.case-study-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
}

.case-study-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: center;
    z-index: 2;
}

.case-study-hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    color: white;
    width: 100%;
    
    @media (max-width: 768px) {
        text-align: center;
    }
}

.case-study-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: white;
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.case-study-subtitle {
    font-size: 1.3rem;
    color: white;
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    
    @media (max-width: 768px) {
        font-size: 1.1rem;
    }
}

/* Case Study Content */
.case-study-content {
    position: relative;
    z-index: 1;
}

/* Case Study Navigation */
.case-study-navigation {
    padding: 3rem 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Project Overview Block */
section.flexi-project-overview {
    padding: 6rem 0;
    
    @media(max-width: 1300px) {
        padding: 5rem 0;
    }

    @media(max-width: 700px) {
        padding: 3rem 0;
    }

    @media(max-width: 480px) {
        padding: 2rem 0;
    }
    
    .project-overview-header {
        text-align: center;
        margin-bottom: 3rem;
        
        h2 {
            font-size: clamp(2rem, 5vw, 3rem);
            font-weight: 700;
            color: var(--black);
            margin: 0;
            line-height: 1.2;
        }
    }
    
    .project-overview-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        
        @media (max-width: 992px) {
            grid-template-columns: repeat(2, 1fr);
            gap: 1.25rem;
        }
        
        @media (max-width: 600px) {
            grid-template-columns: 1fr;
            gap: 1rem;
        }
    }
    
    .project-overview-item {
        background: #5cf7a8;
        color: var(--black);
        border-radius: 1rem;
        padding: 1.5rem 1.25rem;
        text-align: left;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        
        &:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(92, 247, 168, 0.3);
        }
        
        @media (max-width: 600px) {
            padding: 1.25rem 1rem;
        }
    }
    
    .overview-image {
        margin-bottom: 1rem;
        display: flex;
        justify-content: flex-start;
        
        img {
            width: 2.5rem;
            height: 2.5rem;
            object-fit: contain;
            filter: brightness(0);
            
            @media (max-width: 600px) {
                width: 2rem;
                height: 2rem;
            }
        }
    }
    
    .overview-content {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .overview-big-text {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        font-weight: 700;
        color: var(--black);
        margin: 0;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }
    
    .overview-little-text {
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--black);
        opacity: 0.8;
        margin: 0;
        line-height: 1.3;
        
        @media (max-width: 600px) {
            font-size: 0.85rem;
        }
    }
}
