/**
 * Bio Section Widget Styles
 * Premium design with overlapping card layout
 */

/* Container */
.bio-section-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    width: 100%;
    padding: 20px 0 20px 0;
}

/* Bio Item - Main Container */
.bio-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    position: relative;
}

/* Image Wrapper - Tall image with name at bottom */
.bio-image-wrapper {
    display: flex;
    flex-direction: column;
    width: 180px;
    min-width: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #5D2E46;
    position: relative;
    z-index: 2;
    margin-right: -90px;
    /* Half the image width to allow border to show behind */
    margin-top: 0;
    align-self: flex-start;
    /* 5px left color strip effect using border */
    border-left: 5px solid #5D2E46;
}

.bio-image {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #87CEEB 0%, #c8e6c9 50%, #6B8E4E 100%);
    /* Slight left margin to show the background color strip */
    margin-left: 0;
}

.bio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bio-image-wrapper:hover .bio-image img {
    transform: scale(1.05);
}

/* Name & Designation */
.bio-name-designation {
    background-color: #5D2E46;
    padding: 15px 12px;
    text-align: center;
}

.bio-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bio-designation {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Bio Content Wrapper - Border extends behind image to half width */
.bio-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 2px solid #C4A962;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 20px 20px 20px 110px;
    /* Extra left padding to account for image overlap */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 180px;
    position: relative;
    z-index: 1;
    margin-top: 25px;
    margin-left: 0;
    /* No left margin - border starts from behind image */
    align-self: flex-start;
}

/* BIO Section Title */
.bio-section-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #5D2E46;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* Bio Content */
.bio-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* When JS truncation is active, disable CSS line-clamp */
.bio-content.js-truncated {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
}

.bio-content p {
    margin: 0 0 10px 0;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

/* Expanded State */
.bio-content-wrapper.expanded .bio-content {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    display: block;
}

/* Read More/Less Button */
.bio-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    background: transparent;
    border: none;
    color: #C4A962;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.bio-read-more-btn:hover {
    color: #5D2E46;
}

.bio-read-more-btn:focus {
    outline: none;
}

.bio-read-more-btn .arrow-icon {
    transition: transform 0.3s ease;
}

.bio-read-more-btn.expanded .arrow-icon {
    transform: rotate(180deg);
}

/* Responsive Design - Tablet */
@media screen and (max-width: 991px) {
    .bio-image-wrapper {
        width: 160px;
        min-width: 160px;
        border-left-width: 4px;
    }

    .bio-image {
        height: 160px;
    }

    .bio-content-wrapper {
        padding-top: 18px;
        padding-right: 18px;
        padding-bottom: 18px;
        min-height: 160px;
    }

    .bio-name {
        font-size: 13px;
    }

    .bio-designation {
        font-size: 10px;
    }

    .bio-content {
        font-size: 13px;
        line-height: 1.5;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* Responsive Design - Mobile */
@media screen and (max-width: 767px) {
    .bio-section-container {
        padding: 15px 0 15px 0;
    }

    .bio-item {
        flex-direction: row;
        align-items: flex-start;
    }

    .bio-image-wrapper {
        width: 130px;
        min-width: 130px;
        border-left-width: 4px;
    }

    .bio-image {
        height: 130px;
    }

    .bio-name-designation {
        padding: 10px 8px;
    }

    .bio-name {
        font-size: 11px;
    }

    .bio-designation {
        font-size: 9px;
    }

    .bio-content-wrapper {
        padding-top: 15px;
        padding-right: 15px;
        padding-bottom: 15px;
        min-height: 130px;
    }

    .bio-section-title {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .bio-content {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .bio-read-more-btn {
        font-size: 11px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .bio-image-wrapper {
        width: 110px;
        min-width: 110px;
        border-left-width: 3px;
    }

    .bio-image {
        height: 110px;
    }

    .bio-content-wrapper {
        padding-top: 12px;
        padding-right: 12px;
        padding-bottom: 12px;
        border-width: 1.5px;
        min-height: 110px;
    }

    .bio-section-title {
        font-size: 10px;
    }

    .bio-content {
        font-size: 11px;
        line-height: 1.4;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .bio-read-more-btn {
        font-size: 10px;
        padding: 4px 0;
    }
}

/* Very Small Mobile */
@media screen and (max-width: 380px) {
    .bio-image-wrapper {
        width: 95px;
        min-width: 95px;
        border-left-width: 3px;
    }

    .bio-image {
        height: 95px;
    }

    .bio-name {
        font-size: 10px;
    }

    .bio-designation {
        font-size: 8px;
    }

    .bio-name-designation {
        padding: 8px 6px;
    }

    .bio-content-wrapper {
        padding-top: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        min-height: 95px;
    }

    .bio-content {
        font-size: 10px;
    }
}

/* Editor Preview Styles */
.elementor-editor-active .bio-section-container {
    min-height: 200px;
}

/* Smooth transitions */
.bio-content-wrapper {
    will-change: height;
}

/* Loading State Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.bio-item.loading .bio-content {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Hover Effect for Content Card */
.bio-content-wrapper:hover {
    box-shadow: 0 4px 15px rgba(196, 169, 98, 0.2);
}

/* Focus States for Accessibility */
.bio-read-more-btn:focus-visible {
    outline: 2px solid #5D2E46;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .bio-read-more-btn {
        display: none;
    }

    .bio-content {
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        overflow: visible !important;
        display: block !important;
    }
}