/*
Theme Name: Craig Jamieson 2024
Theme URI: https://craigjamieson.com/wp-content/themes/craig
Author: Craig Jamieson
Author URI: https://craigjamieson.com/
Description: Portfolio theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-logo, custom-menu, featured-images, sticky-post
Text Domain: craig
*/

@import url('variables.css');

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}

body {
    font-family: var(--font-family);
}

[data-barba="container"] {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

main {
    flex: 1 0 auto;
    height: auto;
}

p {
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    text-align: left;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color var(--transition-speed) ease-in-out, filter var(--transition-speed) ease-in-out;
}

a:hover {
    filter: brightness(1.2);
}

h1 {
    flex-grow: 1;
    text-align: left;
    font-weight: 400;
    font-size: 1.4rem;
}

h2 {
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-align: left;
    padding: 0 1.5rem;
}

h3 {
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 300;
    margin-bottom: 1rem;
    max-width: 100%;
    text-align: left;
    padding: 0 1.5rem;
}

h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

ol, ul {
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 1rem;
    padding: 0 1.5rem 0 3.5rem;
}

.section {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    scroll-snap-align: start;
    margin: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Remove top margin to prevent pushing content down */
.section > * {
    margin-top: 0;
}

/* Mobile-first (default): No animations, full visibility */
.section h2,
.section h3,
.section h4,
.section p,
.section ul,
.section li,
.section small,
.section .post-date,
.section .post-categories,
.section blockquote,
.section img,
.image-container {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
    visibility: visible;
}

.case-study-background {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center; /* Center content vertically */
    align-items: flex-start;
    position: relative;
    background-repeat: no-repeat;
    color: var(--text-color);
}

.cases .work-link {
    margin-top: 1rem !important;
    display: inline-block !important;
    padding: 0 1.5rem;
    font-size: 1.4rem;
}

.cases {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    padding-bottom: 4rem;
}

.case-studies-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    padding-bottom: 10rem;
}

.case-study {
    padding-top: 0;
}

header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 1rem;
    box-sizing: border-box;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 1;
    transition: color 0.5s ease-in-out;
}

header > * {
    pointer-events: auto;
}

.header-content {
    display: flex;
    align-items: center;
}

.logo {
    width: 4rem;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    border-radius: 50%;
    margin-right: 1rem;
}

.logo img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    flex-grow: 1;
    position: fixed;
    bottom: 0;
    left: 0;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
}

nav a {
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.5rem;
    color: var(--text-color) !important;
    transition: color var(--transition-speed) ease-in-out;
}

nav a:hover {
    filter: brightness(1.2);
}

.snap-scroll-disabled .blog-main {
    padding-top: 10rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

.snap-scroll-disabled .blog-main .post-summary {
    max-width: 48rem;
    margin: 0 auto;
}

.snap-scroll-disabled p {
    padding: 1rem 0;
    margin: 0 auto;
}

.snap-scroll-disabled h2 {
    padding: 1rem 0;
    margin: 0 auto;
}

.transition-section {
    height: 5rem !important;
    min-height: 5rem !important;
}

footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0;
    min-height: 100vh;
}

.contact {
    display: flex;
    height: 100%;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    width: 100%;
    flex-grow: 1;
    padding: 0 1.5rem;
}

.footer-top p,
.footer-top a {
    text-align: left;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0;
    font-weight: 300;
    width: 100%;
    display: block;
}

.footer-bottom {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 11rem;
    padding: 0 1.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.footer-bottom .copyright {
    text-align: center;
}

.footer-bottom .social {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-bottom .social svg,
.other-svg-container svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--text-color);
    transition: fill var(--transition-speed) ease-in-out;
}

svg {
    fill: var(--text-color);
    transition: fill var(--transition-speed) ease-in-out;
}

.blog-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.blog-main h2 {
    font-size: clamp(2.4rem, 5vw, 6rem);
    line-height: 1.2;
    font-weight: 300;
    margin-bottom: 1.5rem;
    max-width: 100%;
    text-align: left;
    padding: 0;
}

.blog-main h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.3;
    font-weight: 300;
    margin-bottom: 1.2rem;
    max-width: 100%;
    text-align: left;
    padding: 0;
}

.blog-main p {
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    text-align: left;
    padding: 0;
}

.blog-main ol,
.blog-main ul {
    font-size: 1.4rem;
    line-height: 2rem;
    margin-left: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
    max-width: 48rem;
    text-align: left;
}

.blog-main .post-summary {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.post-date {
    font-size: 0.8rem !important;
    line-height: 1rem;
    text-align: left;
}

.blog-post > * {
    margin-bottom: 0.1rem;
}

.blog-post > *:last-child {
    margin-bottom: 0;
}

#scroll-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 2rem;
    height: 2rem;
    text-align: center;
    line-height: 2rem;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity 0.2s, visibility 0.2s;
    opacity: 0;
    visibility: hidden;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.blog-main .pagination {
    display: flex;
    flex: 1;
    justify-content: left;
    align-items: center;
    padding: 2rem 0;
    flex-direction: row;
    gap: 1rem;
    height: 5rem;
}

.blog-main .pagination a,
.blog-main .pagination span {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--link-color);
    transition: background-color var(--transition-speed) ease-in-out;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-posts-section {
    padding: 0;
    max-width: 70rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.blog-post {
    display: flex;
    flex-direction: column;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.blog-post p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.blog-post h3,
.blog-post .post-excerpt {
    padding: 0;
}

.post-categories {
    font-size: 0.8rem !important;
    color: var(--link-color);
}

.work-section {
    padding: 0;
    max-width: 70rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.work-section h3 {
    font-size: 2.5rem;
    line-height: 2rem;
    margin-bottom: 1rem;
}

.work-section p {
    font-size: 1rem;
    line-height: 1.5rem;
}

/* Background images for various sections */
.perenna-bg {
    background-image: url('../../../img/perenna-mobile.webp');
    background-size: cover;
    background-position: center;
}

.taos-bg {
    background-image: url('../../../img/taos-mobile.webp');
    background-size: cover;
    background-position: center;
}

.taos-intro {
    background-image: url('../../../img/taos-mobile-intro.webp');
    background-size: cover;
    background-position: center;
}

.taos-macbook {
    background-image: url('../../../img/taos-mobile-macbook.webp');
    background-size: cover;
    background-position: center;
}

.taos-mobile {
    background-image: url('../../../img/taos-mobile-site.webp');
    background-size: cover;
    background-position: center;
}

.taos-mobile-1 {
    background-image: url('../../../img/taos-mobile-1.webp');
    background-size: cover;
    background-position: center;
}

.taos-mobile-2 {
    background-image: url('../../../img/taos-mobile-2.webp');
    background-size: cover;
    background-position: center;
}

.taos-end {
    background-image: url('../../../img/taos-mobile-end.webp');
    background-size: cover;
    background-position: center;
}

.muov-bg {
    background-image: url('../../../img/muov-mobile.webp');
    background-size: cover;
    background-position: center;
}

.fluint-bg {
    background-image: url('../../../img/fluint-mobile.webp');
    background-size: cover;
    background-position: center;
}

.alienware-bg {
    background-image: url('../../../img/alienware-mobile.webp');
    background-size: cover;
    background-position: center;
}

.evo-bg {
    background-image: url('../../../img/evo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.mohara-bg {
    background-image: url('../../../img/mohara-mobile.webp');
    background-size: cover;
    background-position: center;
}

.nedbank-bg {
    background-image: url('../../../img/nedbank-mobile.webp');
    background-size: cover;
    background-position: center;
}

.standardbank-bg {
    background-image: url('../../../img/kidz-banking-mobile.webp');
    background-size: cover;
    background-position: center;
}

.perenna-logo {
    background-image: url('../../../img/perenna-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.taos-logo {
    background-image: url('../../../img/taos-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.muov-logo {
    background-image: url('../../../img/muov-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.fluint-logo {
    background-image: url('../../../img/fluint-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.evo-logo {
    background-image: url('../../../img/evo-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.mohara-logo {
    background-image: url('../../../img/mohara-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.nedbank-logo {
    background-image: url('../../../img/nedbank-logo-mobile.webp');
    background-size: cover;
    background-position: center;
}

.agencies {
    background-image: url('https://craigjamieson.com/img/agencies-mobile.webp');
    background-size: cover;
    background-position: center;
}

.speaking {
    background-image: url('https://craigjamieson.com/img/speaking-mobile.webp');
    background-size: cover;
    background-position: center;
}

.awards {
    background-image: url('https://craigjamieson.com/img/awards-mobile.webp');
    background-size: cover;
    background-position: center;
}

.posts-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.posts-section .posts-wp-prev-next {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    padding: 1rem 1.5rem;
    text-decoration: none;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem !important;
}

.posts-wp-prev-next a {
    text-decoration: none;
    font-weight: 400;
    color: var(--text-color) !important;
    transition: color var(--transition-speed) ease-in-out;
}

.posts-left {
    justify-content: flex-start;
    flex: 1;
    text-align: left;
    padding-left: 1rem;
}

.posts-right {
    justify-content: flex-end;
    flex: 1;
    text-align: right;
    padding-right: 1rem;
}

.posts-middle {
    justify-content: center;
    flex: none;
}

.blog-main .posts-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    height: 5rem;
    padding: 1rem 2rem;
    box-sizing: border-box;
}

.posts {
    padding: 1rem;
    margin: 0 1.25rem;
    width: 100vw;
}

.posts li a {
    display: block;
    text-decoration: none;
    padding: 1rem;
}

.scroll-arrow-container {
    height: 5rem;
    margin-top: 1rem;
    padding-left: 1.5rem;
    display: flex;
    justify-content: center;
}

.scroll-arrow-svg {
    height: 100%;
    width: auto;
}

.arrow {
    fill: none;
    stroke: var(--text-color);
    transition: stroke var(--transition-speed) ease-in-out;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: pulse 2s infinite ease-in-out;
}

.left, .right, .center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    padding: 2rem;
}

.row {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

.row p {
    width: 100%;
    padding-top: 0;
    min-height: auto;
    box-sizing: border-box;
}

.row img {
    width: 100%;
    height: auto;
    margin: 0 auto;
}

#page-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #fff;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(0.25rem);
        opacity: 0.5;
    }
}

.blog-posts-section {
    align-items: flex-start;
}

.blog-posts-section > h3 {
    padding: 0 1.5rem;
}

.read-more-link {
    padding: 0 1.5rem;
    align-self: flex-start;
}

.read-more-link a {
    font-size: 1rem;
}

.section, footer {
    min-height: 100vh;
    min-height: 100svh;
}

@supports not (min-height: 100svh) {
    .section, footer {
        min-height: -webkit-fill-available;
    }
}

.wp-block-columns {
    max-width: 72rem !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.client-info {
    display: block;
    padding-top: 0;
}

.info-group {
    margin-bottom: 0.5rem;
}

.label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info {
    font-size: 1rem;
    margin-top: 0;
    padding-top: 0;
}

.cases h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.cases p {
    margin: 0;
}

.image-container {
    position: relative;
    padding: 10px;
    border-radius: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    display: inline-block;
}

.image-container img {
    border-radius: 25px;
    display: block;
    width: 100%;
    height: auto;
}

/* Adjust margin between h2 and h3 */
.section h2 {
    margin-bottom: 1rem;
}

.section h3 {
    margin-top: 0.5rem;
}

@media (min-width: 40rem) and (max-width: 55rem) {
    /* Tablet-specific styles go here */
}

@media (min-width: 56rem) {
    p {
        font-size: 1.4rem;
        line-height: 2rem;
        margin-bottom: 1.5rem;
        font-weight: 300;
        max-width: 48rem;
        text-align: left;
        padding: 0 7rem;
    }

    .blog-main p {
        font-size: 1.4rem;
        line-height: 2rem;
        margin-bottom: 2rem;
        font-weight: 300;
        max-width: 48rem;
        text-align: left;
        padding: 0;
    }

    .blog-post p {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .work-section p {
        font-size: 1.4rem;
        line-height: 2rem;
    }

    h1 {
        flex-grow: 1;
        text-align: left;
        font-weight: 300;
        font-size: 2rem;
    }

    h2 {
        font-size: clamp(2.4rem, 5vw, 6rem);
        line-height: 1.2;
        font-weight: 300;
        margin-bottom: 1.5rem;
        max-width: 100%;
        text-align: left;
        padding: 1rem 7rem;
    }
    
    h3 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
        line-height: 1.3;
        font-weight: 300;
        margin-bottom: 1.2rem;
        max-width: 100%;
        text-align: left;
        padding: 1.5rem 7rem;
        max-width: 48rem;
    }
    
    ol, ul {
        font-size: 1.4rem;
        line-height: 2rem;
        margin-bottom: 1rem;
        padding: 0 1.5rem 0 9rem;
        max-width: 48rem;
    }

    .scroll-arrow-container {
        padding-left: 7rem;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 7rem;
        padding: 2rem;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-grow: 1;
    }
    
    .logo {
        width: 4rem;
        height: 4rem;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(0.625rem);
        border-radius: 50%;
        margin-right: 1rem;
        transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    }
    
    .logo:hover {
        transform: scale(1.1);
    }
    
    .logo:active {
        transform: scale(0.95);
    }
    
    .logo img {
        width: 3rem;
        height: 3rem;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    }
    
    .logo:hover img {
        transform: scale(1.1);
    }
    
    .logo:active img {
        transform: scale(0.95);
    }

    nav {
        justify-content: center;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(0.625rem);
        border-radius: 1.5rem;
        padding: 0 1.5rem;
        height: 3rem;
        max-width: 20rem;
        width: fit-content;
        position: static;
    }

    nav a {
        color: var(--text-color) !important;
        transition: color var(--transition-speed) ease-in-out;
        padding: 0 0.8rem;
        height: 100%;
        display: flex;
        align-items: center;
        font-size: 1rem;
    }

    .section {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Vertically centers content */
        align-items: flex-start; /* Keeps content aligned to the left */
        min-height: 100vh;
        scroll-snap-align: start;
        margin: 0;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* This removes the 6rem margin on desktop */
    .section > * {
        margin-top: 0;
    }

    .case-study-background {
        width: 100vw; /* Full viewport width */
        height: 100vh; /* Full viewport height */
        background-size: cover;
        background-position: center;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        background-repeat: no-repeat;
        color: var(--text-color); /* Maintain color consistency */
    }

    .cases .work-link {
        margin-top: 2rem !important;
        display: inline-block !important;
        padding: 0 7rem;
        font-size: 1.4rem;
    }

    .cases {
        display: flex;
        flex-direction: column;
        padding-top: 0; /* Reset padding for desktop */
        justify-content: center; /* Center vertically */
        align-items: flex-start; /* Align items to the left */
        position: relative; /* Enable offset positioning */
        left: 0;
        height: 100vh; /* Ensure it takes the full viewport height */
    }

    .case-study {
        padding-top: 0;
    }

    #homeButton {
        display: none;
    }

    .footer-top p,
    .footer-top a {
        font-size: 1.4rem;
        line-height: 2rem;
        margin-bottom: 1.4rem;
        padding-left: 7rem;
        max-width: 45rem;
    }

    .footer-bottom .social {
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        height: 5rem;
        padding: 0 2rem;
    }

    .footer-bottom .copyright {
        text-align: left;
    }

    .footer-bottom .social {
        justify-content: flex-end;
        margin-bottom: 0;
    }

    /* Styles for blog pages (single.php and home.php) */
    .blog-main {
        max-width: 48rem;
        margin: 0 auto;
        padding: 3rem 0;
    }

    .blog-main h2,
    .blog-main h3 {
        padding: 0;
    }

    .blog-main .post-summary,
    .blog-main .blog-list {
        width: 100%;
        max-width: 48rem;
        margin: 0 auto;
    }

    .blog-main .post-title,
    .blog-main .post-date,
    .blog-main .post-categories,
    .blog-main .post-excerpt {
        text-align: left;
    }

    /* Styles for front page remain unchanged */
    .content-wrapper .blog-post {
        padding: 0 7rem;
    }

    .post-date {
        font-size: 1rem!important;
        line-height: 1.2rem;
        text-align: left;
    }

    .post-categories {
        font-size: 1rem!important;
        color: var(--link-color);
    }

    .blog-post > * {
        margin-bottom: 0.5rem;
    }
    
    .blog-post > *:last-child {
        margin-bottom: 0;
    }

    .left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 2rem;
    }
    
    .center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    
    .right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        padding: 2rem;
    }

    .row {
        flex-direction: row; /* Change to row layout on desktop */
        height: 100vh; /* Full height for desktop */
    }

    .row p {
        width: 50vw; /* 50% width for the text on desktop */
        padding-left: 7rem; /* Horizontal padding for desktop */
        padding-top: 0; /* No top padding for desktop */
        min-height: auto; /* No height constraint on desktop */
    }

    .row img {
        width: auto; /* Adjust image size for desktop */
        margin: auto; /* Center the image in the right column */
        max-width: 100%; /* Ensure it doesn't exceed its container */
    }

    .blog-posts-section > h3 {
        padding: 0 7rem; /* Match the desktop padding */
    }

    .read-more-link {
        padding: 0 7rem; /* Match the desktop padding */
    }

    .read-more-link a {
        font-size: 1.4rem;
    }

    .client-info {
        display: flex;
        flex-wrap: wrap; /* Keeps label-info pairs side by side */
        gap: 1rem; /* 20px space between groups */
    }

    .info-group {
        flex: 1 1 30%; /* Each group takes up 30% of the width */
    }

    .label {
        font-size: 0.8rem; /* 18px label size on desktop */
    }

    .info {
        font-size: 1.4rem; /* 24px info text size on desktop */
        margin-top: 0.25rem; /* 5px equivalent, reduced spacing between label and info */
    }

    .cases .work-link {
        margin-top: 2rem !important;
        display: inline-block !important;
    }

    @keyframes fadeInOut {
        0%, 100% { 
            opacity: 0; 
            transform: scale(0.95); /* Slightly larger to reduce early scaling out */
        }
        30%, 80% { 
            opacity: 1; 
            transform: scale(1); 
        }
    }
    
    /* Apply fadeInOut animation to all content */
    .section h2,
    .section h3,
    .section h4,
    .section p,
    .section ul,
    .section li,
    .section small,
    .section .post-date,
    .section .post-categories,
    .section blockquote,
    .section img {
        animation: fadeInOut 1.5s ease-in-out both;
        animation-timeline: view();
        animation-range: entry 15% exit 15%;
    }
    
    /* Apply fadeInOut to the container, not the image */
    .image-container {
        animation: fadeInOut 1.5s ease-in-out both; /* Apply animation to container */
        animation-timeline: view();
        animation-range: entry 15% exit 15%;
    }
    
    .image-container img {
        width: 100%;  /* Image fills the container */
        height: auto;
        animation: none; /* Remove animation from image to sync with container */
    }

    .end {
     justify-content: flex-end;
     padding: 2rem;
    }

    .posts-wp-prev-next {
        position: relative;
        text-decoration: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: calc(100vw - 4rem);
    }

    .perenna-end {
        background-image: url('../../../img/Perenna05@2x.webp');
    }

    .section .posts-wp-prev-next {
        justify-content: flex-end;
        background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    border-radius: 2.5rem;
    padding: 0 1.5rem;
    height: 3rem;
    }

    .perenna-bg {
        background-image: url('../../../img/perenna.webp');
    }
    .taos-bg {
        background-image: url('../../../img/taos.webp');
    }
    .taos-intro {
        background-image: url('../../../img/taos-intro.webp');
    }
    .taos-mobile {
        background-image: url('../../../img/taos-site-mobile.webp');
    }
    .taos-macbook {
        background-image: url('../../../img/taos-macbook.webp');
    }
    .taos-mobile-1 {
        background-image: url('../../../img/taos01-5.webp');
    }
    .taos-mobile-2 {
        background-image: url('../../../img/taos01-6.webp');
    }
    .taos-end {
        background-image: url('../../../img/taos-end.webp');
    }
    .muov-bg {
        background-image: url('../../../img/muov.webp');
    }
    .fluint-bg {
        background-image: url('../../../img/fluint.webp');
    }
    .alienware-bg {
        background-image: url('../../../img/alienware.webp');
    }
    .evo-bg {
        background-image: url('../../../img/evo.webp');
    }
    .mohara-bg {
        background-image: url('../../../img/mohara.webp');
    }
    .nedbank-bg {
        background-image: url('../../../img/nedbank.webp');
    }
    .standardbank-bg {
        background-image: url('../../../img/kidz-banking.webp');
    }
    .perenna-logo {
        background-image: url('../../../img/perenna-logo.webp');
    }
    .taos-logo {
        background-image: url('../../../img/taos-logo.webp');
    }
    .muov-logo {
        background-image: url('../../../img/muov-logo.webp');
    }
    .fluint-logo {
        background-image: url('../../../img/fluint-logo.webp');
    }
    .evo-logo {
        background-image: url('../../../img/evo-logo.webp');
    }
    .mohara-logo {
        background-image: url('../../../img/mohara-logo.webp');
    }
    .nedbank-logo {
        background-image: url('../../../img/nedbank-logo.webp');
    }
    .agencies {
        background-image: url('../../../img/agencies.webp');
    }
    .speaking {
        background-image: url('../../../img/craig-jamieson-speaking.webp');
    }
    .awards {
        background-image: url('../../../img/craig-jamieson-awards.webp');
    }
}