/* Fixes for static CMS content */

/* Team member page image size fix */
.team-details-image {
    width: 100%;
    height: auto;
    max-width: 500px;
    object-fit: cover;
}

/* Blog detail page image sizing - use natural dimensions */
.blog-details-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-details-image-box {
    margin-bottom: 30px;
}

/* Portfolio grid image consistency - normalize heights for proper grid alignment */
.project-thumbnail {
    width: 100%;
    height: 250px; /* Increased height for better proportion */
    overflow: hidden;
    border-radius: 8px;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio while filling container */
}

/* Portfolio item block - ensure full width usage */
.project-item-block {
    width: 100%;
}

/* Responsive portfolio image heights */
@media (max-width: 991px) {
    .project-thumbnail {
        height: 220px; /* Larger on tablets to match Webflow */
    }
}

@media (max-width: 767px) {
    .project-thumbnail {
        height: 180px; /* Appropriate size for phones */
    }
}

/* Service hover animations on homepage */
.service-2-link-block {
    position: relative;
    overflow: hidden;
}

.service-2-block-inner {
    position: relative;
}

/* Initially hide the hover content */
.service-hover-item-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.2s ease-out;  /* Faster animation - 200ms */
    z-index: 2;
}

/* Show description by default */
.service-2-desc-box {
    opacity: 1;
    transition: opacity 0.15s ease-out;  /* Faster fade - 150ms */
}

/* On hover, slide in the hover content */
.service-2-link-block:hover .service-hover-item-box {
    transform: translateX(0);
    opacity: 1;
}

/* On hover, fade out the description */
.service-2-link-block:hover .service-2-desc-box {
    opacity: 0;
}

/* Style the service list */
.service-hover-item-box .service-list-item {
    flex: 1;
    padding-right: 20px;
}

.service-hover-item-box .service-hover-image {
    flex: 0 0 auto;
    max-width: 280px; /* Increased from 200px to match Webflow size */
}

.service-hover-item-box .service-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Direct targeting for service image in hover overlay */
.service-thumbnail {
    max-width: 280px; /* Ensure container is large enough */
}

.service-thumbnail .service-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-width: 280px; /* Match Webflow service image size */
}

/* Team member hover effect - image zoom */
.team-thumbnail {
    overflow: hidden;
    border-radius: var(--border-radius-10);
    width: 100%;
}

.team-image {
    transition: transform 0.3s ease-out;
    width: 100%;
    height: auto;
    display: block;
}

.team-link-block:hover .team-image {
    transform: scale(1.05) !important;
}

/* Let Webflow animations handle team details page visibility naturally */

/* Fix blog page layout jump by maintaining minimum height during content loading */
.blog-section-wrapper {
    min-height: 350px; /* Ensure section maintains height before content loads */
}

/* Fix portfolio page layout jump by maintaining minimum height during content loading */
.portfolio-section-wrapper {
    min-height: 300px; /* Ensure section maintains height before content loads */
}

/* Fix blog detail pages visibility - let Webflow animations handle timing */
/* Removed opacity overrides to allow proper slide-up animations */

/* Let Webflow animations handle service section visibility naturally on all devices */

/* On tablets/mobile, make bullet points and images visible after animations complete */
@media (max-width: 991px) {
    /* Make bullet points and image container visible on tablets/mobile after animation */
    .service-hover-item-box {
        opacity: 1 !important;
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0) !important;
        position: static !important; /* Override absolute positioning on mobile */
    }

    /* Hide description on mobile since we're showing bullet points */
    .service-2-desc-box {
        display: none;
    }

    /* Ensure blog multi-images are visible on mobile */
    .blog-details-multi-image-box {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .blog-multi-image-grid {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .blog-multi-image {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 15px;
    }

    .multi-image {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 8px;
    }
}